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

Unified Diff: src/compilation-cache.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 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/codegen.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compilation-cache.cc
diff --git a/src/compilation-cache.cc b/src/compilation-cache.cc
index aca8cee9cae861a148be20ffe859752b5e746914..53e2190b2dc144f6b33d86d14a1c1ce4f23e1fb4 100644
--- a/src/compilation-cache.cc
+++ b/src/compilation-cache.cc
@@ -41,7 +41,7 @@ CompilationCache::~CompilationCache() {}
Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) {
DCHECK(generation < generations_);
Handle<CompilationCacheTable> result;
- if (tables_[generation]->IsUndefined()) {
+ if (tables_[generation]->IsUndefined(isolate())) {
result = CompilationCacheTable::New(isolate(), kInitialCacheSize);
tables_[generation] = *result;
} else {
@@ -56,7 +56,7 @@ Handle<CompilationCacheTable> CompilationSubCache::GetTable(int generation) {
void CompilationSubCache::Age() {
// Don't directly age single-generation caches.
if (generations_ == 1) {
- if (tables_[0] != isolate()->heap()->undefined_value()) {
+ if (!tables_[0]->IsUndefined(isolate())) {
CompilationCacheTable::cast(tables_[0])->Age();
}
return;
@@ -121,7 +121,7 @@ bool CompilationCacheScript::HasOrigin(Handle<SharedFunctionInfo> function_info,
// If the script name isn't set, the boilerplate script should have
// an undefined name to have the same origin.
if (name.is_null()) {
- return script->name()->IsUndefined();
+ return script->name()->IsUndefined(isolate());
}
// Do the fast bailout checks first.
if (line_offset != script->line_offset()) return false;
« no previous file with comments | « src/codegen.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698