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

Unified Diff: runtime/vm/object.cc

Issue 1247783002: Make array allocation stub shared between isolates. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index f674cd4b80669a4b9a64444e12601acb5135aed4..8f28be470a94121c1295e2419e14e0db8723121f 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5177,18 +5177,16 @@ void Function::AttachCode(const Code& value) const {
bool Function::HasCode() const {
ASSERT(raw_ptr()->instructions_ != Instructions::null());
- StubCode* stub_code = Isolate::Current()->stub_code();
return raw_ptr()->instructions_ !=
- stub_code->LazyCompile_entry()->code()->ptr()->instructions_;
+ StubCode::LazyCompile_entry()->code()->ptr()->instructions_;
}
void Function::ClearCode() const {
ASSERT(ic_data_array() == Array::null());
StorePointer(&raw_ptr()->unoptimized_code_, Code::null());
- StubCode* stub_code = Isolate::Current()->stub_code();
StorePointer(&raw_ptr()->instructions_,
- Code::Handle(stub_code->LazyCompile_entry()->code()).instructions());
+ Code::Handle(StubCode::LazyCompile_entry()->code()).instructions());
}
@@ -6251,8 +6249,7 @@ RawFunction* Function::New(const String& name,
result.set_is_inlinable(true);
result.set_allows_hoisting_check_class(true);
result.set_allows_bounds_check_generalization(true);
- StubCode* stub_code = Isolate::Current()->stub_code();
- result.SetInstructions(Code::Handle(stub_code->LazyCompile_entry()->code()));
+ result.SetInstructions(Code::Handle(StubCode::LazyCompile_entry()->code()));
if (kind == RawFunction::kClosureFunction) {
const ClosureData& data = ClosureData::Handle(ClosureData::New());
result.set_data(data);

Powered by Google App Engine
This is Rietveld 408576698