OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |