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

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

Issue 1713853003: VM: Share object pool entries for optimized static calls. (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 unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.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/globals.h" // NOLINT 5 #include "vm/globals.h" // NOLINT
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 Patchability patchable) { 529 Patchability patchable) {
530 BranchLink(Code::Handle(stub_entry.code()), patchable); 530 BranchLink(Code::Handle(stub_entry.code()), patchable);
531 } 531 }
532 532
533 533
534 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { 534 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
535 BranchLink(Code::Handle(stub_entry.code()), kPatchable); 535 BranchLink(Code::Handle(stub_entry.code()), kPatchable);
536 } 536 }
537 537
538 538
539 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
540 const Object& equivalence) {
541 const Code& target = Code::Handle(stub_entry.code());
542 ASSERT(!in_delay_slot_);
543 const int32_t offset = ObjectPool::element_offset(
544 object_pool_wrapper_.FindObject(target, equivalence));
545 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
546 lw(T9, FieldAddress(CODE_REG, Code::entry_point_offset()));
547 jalr(T9);
548 delay_slot_available_ = false; // CodePatcher expects a nop.
549 }
550
551
539 bool Assembler::CanLoadFromObjectPool(const Object& object) const { 552 bool Assembler::CanLoadFromObjectPool(const Object& object) const {
540 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal()); 553 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal());
541 ASSERT(!Thread::CanLoadFromThread(object)); 554 ASSERT(!Thread::CanLoadFromThread(object));
542 if (!constant_pool_allowed()) { 555 if (!constant_pool_allowed()) {
543 return false; 556 return false;
544 } 557 }
545 558
546 ASSERT(object.IsNotTemporaryScopedHandle()); 559 ASSERT(object.IsNotTemporaryScopedHandle());
547 ASSERT(object.IsOld()); 560 ASSERT(object.IsOld());
548 return true; 561 return true;
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1341 Label stop; 1354 Label stop;
1342 b(&stop); 1355 b(&stop);
1343 Emit(reinterpret_cast<int32_t>(message)); 1356 Emit(reinterpret_cast<int32_t>(message));
1344 Bind(&stop); 1357 Bind(&stop);
1345 break_(Instr::kStopMessageCode); 1358 break_(Instr::kStopMessageCode);
1346 } 1359 }
1347 1360
1348 } // namespace dart 1361 } // namespace dart
1349 1362
1350 #endif // defined TARGET_ARCH_MIPS 1363 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698