Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Unified Diff: runtime/vm/simulator_dbc.cc

Issue 2399333003: DBC: Support large offsets in optimized field access. (Closed)
Patch Set: update comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/simulator_dbc.cc
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index 67c172866491999fea77fb29f5e5a6c145eb1760..b27a63cbef5e8d9f5bcbe50a576451625bc9e426 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -2376,6 +2376,19 @@ RawObject* Simulator::Call(const Code& code,
}
{
+ BYTECODE(StoreFieldExt, A_D);
+ // The offset is stored in the following nop-instruction which is skipped.
+ const uint16_t offset_in_words = Bytecode::DecodeD(*pc++);
+ RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]);
+ RawObject* value = reinterpret_cast<RawObject*>(FP[rD]);
zra 2016/10/07 20:43:16 FP is already a RawObject**
Florian Schneider 2016/10/07 20:57:18 Done here and for StoreField.
+
+ instance->StorePointer(
+ reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
+ value);
+ DISPATCH();
+ }
+
+ {
BYTECODE(StoreFieldTOS, A_D);
const uint16_t offset_in_words = rD;
RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
@@ -2398,6 +2411,16 @@ RawObject* Simulator::Call(const Code& code,
}
{
+ BYTECODE(LoadFieldExt, A_D);
+ // The offset is stored in the following nop-instruction which is skipped.
+ const uint16_t offset_in_words = Bytecode::DecodeD(*pc++);
+ const uint16_t instance_reg = rD;
+ RawInstance* instance = reinterpret_cast<RawInstance*>(FP[instance_reg]);
+ FP[rA] = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+ DISPATCH();
+ }
+
+ {
BYTECODE(LoadUntagged, A_B_C);
const uint16_t instance_reg = rB;
const uint16_t offset_in_words = rC;
« no previous file with comments | « runtime/vm/intermediate_language_dbc.cc ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698