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

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

Issue 1376963002: Cleanup: we are not patching entries any longer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 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
« no previous file with comments | « no previous file | runtime/vm/code_patcher.h » ('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 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1535 ASSERT(frame->IsDartFrame()); 1535 ASSERT(frame->IsDartFrame());
1536 const Code& caller_code = Code::Handle(isolate, frame->LookupDartCode()); 1536 const Code& caller_code = Code::Handle(isolate, frame->LookupDartCode());
1537 ASSERT(!caller_code.IsNull()); 1537 ASSERT(!caller_code.IsNull());
1538 const Code& stub = Code::Handle( 1538 const Code& stub = Code::Handle(
1539 CodePatcher::GetStaticCallTargetAt(frame->pc(), caller_code)); 1539 CodePatcher::GetStaticCallTargetAt(frame->pc(), caller_code));
1540 Class& alloc_class = Class::ZoneHandle(zone); 1540 Class& alloc_class = Class::ZoneHandle(zone);
1541 alloc_class ^= stub.owner(); 1541 alloc_class ^= stub.owner();
1542 Code& alloc_stub = Code::Handle(isolate, alloc_class.allocation_stub()); 1542 Code& alloc_stub = Code::Handle(isolate, alloc_class.allocation_stub());
1543 if (alloc_stub.IsNull()) { 1543 if (alloc_stub.IsNull()) {
1544 alloc_stub = StubCode::GetAllocationStubForClass(alloc_class); 1544 alloc_stub = StubCode::GetAllocationStubForClass(alloc_class);
1545 ASSERT(!CodePatcher::IsEntryPatched(alloc_stub)); 1545 ASSERT(!alloc_stub.IsDisabled());
1546 } 1546 }
1547 CodePatcher::PatchStaticCallAt(frame->pc(), 1547 CodePatcher::PatchStaticCallAt(frame->pc(),
1548 caller_code, 1548 caller_code,
1549 alloc_stub); 1549 alloc_stub);
1550 caller_code.SetStubCallTargetCodeAt(frame->pc(), alloc_stub); 1550 caller_code.SetStubCallTargetCodeAt(frame->pc(), alloc_stub);
1551 if (FLAG_trace_patching) { 1551 if (FLAG_trace_patching) {
1552 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " alloc-class %s " 1552 OS::PrintErr("FixAllocationStubTarget: caller %#" Px " alloc-class %s "
1553 " -> %#" Px "\n", 1553 " -> %#" Px "\n",
1554 frame->pc(), 1554 frame->pc(),
1555 alloc_class.ToCString(), 1555 alloc_class.ToCString(),
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1825 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1825 const intptr_t elm_size = old_data.ElementSizeInBytes();
1826 const TypedData& new_data = 1826 const TypedData& new_data =
1827 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1827 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1828 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1828 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1829 typed_data_cell.SetAt(0, new_data); 1829 typed_data_cell.SetAt(0, new_data);
1830 arguments.SetReturn(new_data); 1830 arguments.SetReturn(new_data);
1831 } 1831 }
1832 1832
1833 1833
1834 } // namespace dart 1834 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/code_patcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698