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

Unified Diff: src/stub-cache.cc

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 4 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 | « src/string-stream.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/stub-cache.cc
===================================================================
--- src/stub-cache.cc (revision 5190)
+++ src/stub-cache.cc (working copy)
@@ -107,7 +107,8 @@
String* cache_name = HEAP->empty_string();
if (receiver->IsGlobalObject()) cache_name = name;
JSObject* last = receiver;
- while (last->GetPrototype() != HEAP->null_value()) {
+ Heap* heap = HEAP;
+ while (last->GetPrototype() != heap->null_value()) {
last = JSObject::cast(last->GetPrototype());
if (last->IsGlobalObject()) cache_name = name;
}
@@ -663,16 +664,17 @@
static Object* ProbeCache(Code::Flags flags) {
+ Heap* heap = HEAP;
Object* probe = GetProbeValue(flags);
- if (probe != HEAP->undefined_value()) return probe;
+ if (probe != heap->undefined_value()) return probe;
// Seed the cache with an undefined value to make sure that any
// generated code object can always be inserted into the cache
// without causing allocation failures.
Object* result =
- HEAP->non_monomorphic_cache()->AtNumberPut(flags,
- HEAP->undefined_value());
+ heap->non_monomorphic_cache()->AtNumberPut(flags,
+ heap->undefined_value());
if (result->IsFailure()) return result;
- HEAP->public_set_non_monomorphic_cache(NumberDictionary::cast(result));
+ heap->public_set_non_monomorphic_cache(NumberDictionary::cast(result));
return probe;
}
@@ -1218,7 +1220,7 @@
if (!lookup->IsProperty()) {
lookup->NotFound();
Object* proto = holder->GetPrototype();
- if (proto != HEAP->null_value()) {
+ if (!proto->IsNull()) {
proto->Lookup(name, lookup);
}
}
« no previous file with comments | « src/string-stream.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698