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

Unified Diff: src/contexts.cc

Issue 2301913002: Rename SloppyBlockWithEvalContextExtension to ContextExtension (Closed)
Patch Set: updates Created 4 years, 3 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/contexts.h ('k') | src/factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/contexts.cc
diff --git a/src/contexts.cc b/src/contexts.cc
index 0822e45cd0ed71e4a878acf92ba84da04f67760d..ea4730042fc468ed0623b9a0198a6e095411895c 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -64,8 +64,8 @@ bool Context::is_declaration_context() {
Object* ext = extension();
// If we have the special extension, we immediately know it must be a
// declaration scope. That's just a small performance shortcut.
- return ext->IsSloppyBlockWithEvalContextExtension()
- || ScopeInfo::cast(ext)->is_declaration_scope();
+ return ext->IsContextExtension() ||
+ ScopeInfo::cast(ext)->is_declaration_scope();
}
@@ -93,8 +93,8 @@ JSObject* Context::extension_object() {
HeapObject* object = extension();
if (object->IsTheHole(GetIsolate())) return nullptr;
if (IsBlockContext()) {
- if (!object->IsSloppyBlockWithEvalContextExtension()) return nullptr;
- object = SloppyBlockWithEvalContextExtension::cast(object)->extension();
+ if (!object->IsContextExtension()) return nullptr;
+ object = JSObject::cast(ContextExtension::cast(object)->extension());
}
DCHECK(object->IsJSContextExtensionObject() ||
(IsNativeContext() && object->IsJSGlobalObject()));
@@ -112,9 +112,9 @@ JSReceiver* Context::extension_receiver() {
ScopeInfo* Context::scope_info() {
DCHECK(IsModuleContext() || IsScriptContext() || IsBlockContext());
HeapObject* object = extension();
- if (object->IsSloppyBlockWithEvalContextExtension()) {
+ if (object->IsContextExtension()) {
DCHECK(IsBlockContext());
- object = SloppyBlockWithEvalContextExtension::cast(object)->scope_info();
+ object = ContextExtension::cast(object)->scope_info();
}
return ScopeInfo::cast(object);
}
« no previous file with comments | « src/contexts.h ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698