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

Unified Diff: runtime/vm/aot_optimizer.cc

Issue 1760153003: VM: Don't do inline context allocation in precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/aot_optimizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/aot_optimizer.cc
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index f813eb8e43afc2327b09cc92e758a11d34e6f233..0b49a1534b2b11b6b4b280b97ac91df10b160a39 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -2712,41 +2712,6 @@ void AotOptimizer::VisitStaticCall(StaticCallInstr* call) {
}
-void AotOptimizer::VisitAllocateContext(AllocateContextInstr* instr) {
- // Replace generic allocation with a sequence of inlined allocation and
- // explicit initalizing stores.
- AllocateUninitializedContextInstr* replacement =
- new AllocateUninitializedContextInstr(instr->token_pos(),
- instr->num_context_variables());
- instr->ReplaceWith(replacement, current_iterator());
-
- StoreInstanceFieldInstr* store =
- new(Z) StoreInstanceFieldInstr(Context::parent_offset(),
- new Value(replacement),
- new Value(flow_graph_->constant_null()),
- kNoStoreBarrier,
- instr->token_pos());
- // Storing into uninitialized memory; remember to prevent dead store
- // elimination and ensure proper GC barrier.
- store->set_is_object_reference_initialization(true);
- flow_graph_->InsertAfter(replacement, store, NULL, FlowGraph::kEffect);
- Definition* cursor = store;
- for (intptr_t i = 0; i < instr->num_context_variables(); ++i) {
- store =
- new(Z) StoreInstanceFieldInstr(Context::variable_offset(i),
- new Value(replacement),
- new Value(flow_graph_->constant_null()),
- kNoStoreBarrier,
- instr->token_pos());
- // Storing into uninitialized memory; remember to prevent dead store
- // elimination and ensure proper GC barrier.
- store->set_is_object_reference_initialization(true);
- flow_graph_->InsertAfter(cursor, store, NULL, FlowGraph::kEffect);
- cursor = store;
- }
-}
-
-
void AotOptimizer::VisitLoadCodeUnits(LoadCodeUnitsInstr* instr) {
// TODO(zerny): Use kUnboxedUint32 once it is fully supported/optimized.
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM)
« no previous file with comments | « runtime/vm/aot_optimizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698