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

Unified Diff: runtime/vm/assembler_x64.cc

Issue 1229283002: VM: Share some stub code between isolates. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/assembler_x64.cc
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index 9058c747381e8ee6dd20affd0847d8e4790adc22..f727f38dd1c65ca6dd3aa1ea7178c2481ec1e484 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -93,13 +93,9 @@ void Assembler::CallPatchable(const ExternalLabel* label) {
void Assembler::Call(const ExternalLabel* label, Register pp) {
- if (Isolate::Current() == Dart::vm_isolate()) {
- call(label);
- } else {
- const int32_t offset = ObjectPool::element_offset(
- object_pool_wrapper_.FindExternalLabel(label, kNotPatchable));
- call(Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
- }
+ const int32_t offset = ObjectPool::element_offset(
+ object_pool_wrapper_.FindExternalLabel(label, kNotPatchable));
+ call(Address::AddressBaseImm32(pp, offset - kHeapObjectTag));
}
@@ -2787,7 +2783,7 @@ bool Assembler::CanLoadFromObjectPool(const Object& object) const {
}
ASSERT(object.IsNotTemporaryScopedHandle());
ASSERT(object.IsOld());
- return (Isolate::Current() != Dart::vm_isolate());
+ return true;
}
@@ -2816,9 +2812,7 @@ void Assembler::LoadObjectHelper(Register dst,
: object_pool_wrapper_.FindObject(object));
LoadWordFromPoolOffset(dst, pp, offset - kHeapObjectTag);
} else {
- ASSERT((Isolate::Current() == Dart::vm_isolate()) ||
- object.IsSmi() ||
- object.InVMHeap());
+ ASSERT(object.IsSmi() || object.InVMHeap());
LoadImmediate(dst, Immediate(reinterpret_cast<int64_t>(object.raw())), pp);
}
}
@@ -2877,7 +2871,6 @@ void Assembler::CompareObject(Register reg, const Object& object, Register pp) {
intptr_t Assembler::FindImmediate(int64_t imm) {
- ASSERT(Isolate::Current() != Dart::vm_isolate());
return object_pool_wrapper_.FindImmediate(imm);
}
@@ -2886,9 +2879,7 @@ bool Assembler::CanLoadImmediateFromPool(const Immediate& imm, Register pp) {
if (!allow_constant_pool()) {
return false;
}
- return !imm.is_int32() &&
- (pp != kNoRegister) &&
- (Isolate::Current() != Dart::vm_isolate());
+ return !imm.is_int32() && (pp != kNoRegister);
}
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698