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

Side by Side Diff: runtime/vm/code_generator.cc

Issue 608913002: Track references to allocation stubs via static_calls_table, instead of keeping two referencers ali… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after
1370 alloc_stub = isolate->stub_code()->GetAllocationStubForClass(alloc_class); 1370 alloc_stub = isolate->stub_code()->GetAllocationStubForClass(alloc_class);
1371 ASSERT(!CodePatcher::IsEntryPatched(alloc_stub)); 1371 ASSERT(!CodePatcher::IsEntryPatched(alloc_stub));
1372 } 1372 }
1373 const Instructions& instrs = 1373 const Instructions& instrs =
1374 Instructions::Handle(isolate, caller_code.instructions()); 1374 Instructions::Handle(isolate, caller_code.instructions());
1375 { 1375 {
1376 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); 1376 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size());
1377 CodePatcher::PatchStaticCallAt(frame->pc(), 1377 CodePatcher::PatchStaticCallAt(frame->pc(),
1378 caller_code, 1378 caller_code,
1379 alloc_stub.EntryPoint()); 1379 alloc_stub.EntryPoint());
1380 caller_code.SetStubCallTargetCodeAt(frame->pc(), alloc_stub);
1380 } 1381 }
1381 if (FLAG_trace_patching) { 1382 if (FLAG_trace_patching) {
1382 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " alloc-class %s " 1383 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " alloc-class %s "
1383 " -> %#" Px "\n", 1384 " -> %#" Px "\n",
1384 frame->pc(), 1385 frame->pc(),
1385 alloc_class.ToCString(), 1386 alloc_class.ToCString(),
1386 alloc_stub.EntryPoint()); 1387 alloc_stub.EntryPoint());
1387 } 1388 }
1388 arguments.SetReturn(alloc_stub); 1389 arguments.SetReturn(alloc_stub);
1389 } 1390 }
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 field.RecordStore(value); 1624 field.RecordStore(value);
1624 } 1625 }
1625 1626
1626 1627
1627 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1628 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1628 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1629 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1629 field.EvaluateInitializer(); 1630 field.EvaluateInitializer();
1630 } 1631 }
1631 1632
1632 } // namespace dart 1633 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698