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

Unified Diff: runtime/vm/flow_graph_compiler_dbc.cc

Issue 2399333003: DBC: Support large offsets in optimized field access. (Closed)
Patch Set: addressed comments 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/constants_dbc.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_dbc.cc
diff --git a/runtime/vm/flow_graph_compiler_dbc.cc b/runtime/vm/flow_graph_compiler_dbc.cc
index 2b1763eaa1e370191cd0070c6fb8bcef9ad73c13..aa6efacef9624211156fd6862f2bbabd20512915 100644
--- a/runtime/vm/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/flow_graph_compiler_dbc.cc
@@ -271,7 +271,13 @@ void FlowGraphCompiler::EmitInstructionEpilogue(Instruction* instr) {
void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) {
__ Move(0, -(1 + kParamEndSlotFromFp));
- __ LoadField(0, 0, offset / kWordSize);
+ ASSERT(offset % kWordSize == 0);
+ if (Utils::IsInt(8, offset/ kWordSize)) {
+ __ LoadField(0, 0, offset / kWordSize);
+ } else {
+ __ LoadFieldExt(0, 0);
+ __ Nop(offset / kWordSize);
+ }
__ Return(0);
}
@@ -279,7 +285,13 @@ void FlowGraphCompiler::GenerateInlinedGetter(intptr_t offset) {
void FlowGraphCompiler::GenerateInlinedSetter(intptr_t offset) {
__ Move(0, -(2 + kParamEndSlotFromFp));
__ Move(1, -(1 + kParamEndSlotFromFp));
- __ StoreField(0, offset / kWordSize, 1);
+ ASSERT(offset % kWordSize == 0);
+ if (Utils::IsInt(8, offset/ kWordSize)) {
+ __ StoreField(0, offset / kWordSize, 1);
+ } else {
+ __ StoreFieldExt(0, 1);
+ __ Nop(offset / kWordSize);
+ }
__ LoadConstant(0, Object::Handle());
__ Return(0);
}
« no previous file with comments | « runtime/vm/constants_dbc.h ('k') | runtime/vm/intermediate_language_dbc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698