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

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

Issue 566853005: Fix to allocation stub invalidation: we cannot just remove it as it will be collected even though c… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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
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 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 } 1371 }
1372 const Instructions& instrs = 1372 const Instructions& instrs =
1373 Instructions::Handle(isolate, caller_code.instructions()); 1373 Instructions::Handle(isolate, caller_code.instructions());
1374 { 1374 {
1375 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size()); 1375 WritableInstructionsScope writable(instrs.EntryPoint(), instrs.size());
1376 CodePatcher::PatchStaticCallAt(frame->pc(), 1376 CodePatcher::PatchStaticCallAt(frame->pc(),
1377 caller_code, 1377 caller_code,
1378 alloc_stub.EntryPoint()); 1378 alloc_stub.EntryPoint());
1379 } 1379 }
1380 if (FLAG_trace_patching) { 1380 if (FLAG_trace_patching) {
1381 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " " 1381 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " alloc-class %s "
1382 " -> %#" Px "\n", 1382 " -> %#" Px "\n",
1383 frame->pc(), 1383 frame->pc(),
1384 alloc_class.ToCString(),
1384 alloc_stub.EntryPoint()); 1385 alloc_stub.EntryPoint());
1385 } 1386 }
1386 arguments.SetReturn(alloc_stub); 1387 arguments.SetReturn(alloc_stub);
1387 } 1388 }
1388 1389
1389 1390
1390 const char* DeoptReasonToCString(ICData::DeoptReasonId deopt_reason) { 1391 const char* DeoptReasonToCString(ICData::DeoptReasonId deopt_reason) {
1391 switch (deopt_reason) { 1392 switch (deopt_reason) {
1392 #define DEOPT_REASON_TO_TEXT(name) case ICData::kDeopt##name: return #name; 1393 #define DEOPT_REASON_TO_TEXT(name) case ICData::kDeopt##name: return #name;
1393 DEOPT_REASONS(DEOPT_REASON_TO_TEXT) 1394 DEOPT_REASONS(DEOPT_REASON_TO_TEXT)
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 field.RecordStore(value); 1622 field.RecordStore(value);
1622 } 1623 }
1623 1624
1624 1625
1625 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) { 1626 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
1626 const Field& field = Field::CheckedHandle(arguments.ArgAt(0)); 1627 const Field& field = Field::CheckedHandle(arguments.ArgAt(0));
1627 field.EvaluateInitializer(); 1628 field.EvaluateInitializer();
1628 } 1629 }
1629 1630
1630 } // namespace dart 1631 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698