summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
author Andra Danciu <andradanciu@google.com> 2020-09-01 13:17:05 +0000
committer Vladimir Marko <vmarko@google.com> 2020-09-07 10:31:32 +0000
commit73c3180e6355ce82fc40b3ded2c6eec0fee199f9 (patch)
treeb793b5066fa9f3fd3fe3297e867a11be207d2541 /compiler/optimizing/nodes.h
parentf96ef4d4253adbc1418ed02386463e37027f998c (diff)
X86: Implement VarHandle.set() for fields.
This commit implements VarHandle set access mode for fields (both static and instance). This also implied refactorizing the common parts of get and set access modes (e.g. coordinate type checks). Non-constant Int64 set value is not implemented. Test: ART_HEAP_POISONING=true art/test.py --host --32 -r -t 712-varhandle-invocations Test: ART_HEAP_POISONING=false art/test.py --host --32 -r -t 712-varhandle-invocations Bug: 65872996 Change-Id: I384c09e08f7a772fc7ec372b1ebb5f882ecc5586
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 3ad987e3f0..bece0acea3 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -4520,7 +4520,8 @@ class HInvokePolymorphic final : public HInvoke {
// resolved_method is the ArtMethod object corresponding to the polymorphic
// method (e.g. VarHandle.get), resolved using the class linker. It is needed
// to pass intrinsic information to the HInvokePolymorphic node.
- ArtMethod* resolved_method)
+ ArtMethod* resolved_method,
+ dex::ProtoIndex proto_idx)
: HInvoke(kInvokePolymorphic,
allocator,
number_of_arguments,
@@ -4529,14 +4530,18 @@ class HInvokePolymorphic final : public HInvoke {
dex_pc,
dex_method_index,
resolved_method,
- kPolymorphic) {
+ kPolymorphic),
+ proto_idx_(proto_idx) {
}
bool IsClonable() const override { return true; }
+ dex::ProtoIndex GetProtoIndex() { return proto_idx_; }
+
DECLARE_INSTRUCTION(InvokePolymorphic);
protected:
+ dex::ProtoIndex proto_idx_;
DEFAULT_COPY_CONSTRUCTOR(InvokePolymorphic);
};