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

Unified Diff: src/contexts.cc

Issue 1895973002: Remove all non-function-name uses of CONST_LEGACY (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove now-unused bits in TF and CS Created 4 years, 8 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/crankshaft/hydrogen.cc » ('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 67a9fea8b896d2be7115b7fb56ad724cc02c4e0b..b2c13684404061aabce9c0dc5cd34627e955bd8b 100644
--- a/src/contexts.cc
+++ b/src/contexts.cc
@@ -184,29 +184,24 @@ static void GetAttributesAndBindingFlags(VariableMode mode,
switch (mode) {
case VAR:
*attributes = NONE;
- *binding_flags = MUTABLE_IS_INITIALIZED;
+ *binding_flags = BINDING_IS_INITIALIZED;
break;
case LET:
*attributes = NONE;
*binding_flags = (init_flag == kNeedsInitialization)
- ? MUTABLE_CHECK_INITIALIZED
- : MUTABLE_IS_INITIALIZED;
+ ? BINDING_CHECK_INITIALIZED
+ : BINDING_IS_INITIALIZED;
break;
case CONST_LEGACY:
+ DCHECK_EQ(kCreatedInitialized, init_flag);
*attributes = READ_ONLY;
- *binding_flags = (init_flag == kNeedsInitialization)
- ? IMMUTABLE_CHECK_INITIALIZED
- : IMMUTABLE_IS_INITIALIZED;
+ *binding_flags = BINDING_IS_INITIALIZED;
break;
case CONST:
*attributes = READ_ONLY;
*binding_flags = (init_flag == kNeedsInitialization)
- ? IMMUTABLE_CHECK_INITIALIZED_HARMONY
- : IMMUTABLE_IS_INITIALIZED_HARMONY;
- break;
- case IMPORT:
- // TODO(ES6)
- UNREACHABLE();
+ ? BINDING_CHECK_INITIALIZED
+ : BINDING_IS_INITIALIZED;
break;
case DYNAMIC:
case DYNAMIC_GLOBAL:
@@ -362,8 +357,7 @@ Handle<Object> Context::Lookup(Handle<String> name,
*index = function_index;
*attributes = READ_ONLY;
DCHECK(mode == CONST_LEGACY || mode == CONST);
- *binding_flags = (mode == CONST_LEGACY)
- ? IMMUTABLE_IS_INITIALIZED : IMMUTABLE_IS_INITIALIZED_HARMONY;
+ *binding_flags = BINDING_IS_INITIALIZED;
return context;
}
}
@@ -376,7 +370,7 @@ Handle<Object> Context::Lookup(Handle<String> name,
}
*index = Context::THROWN_OBJECT_INDEX;
*attributes = NONE;
- *binding_flags = MUTABLE_IS_INITIALIZED;
+ *binding_flags = BINDING_IS_INITIALIZED;
return context;
}
} else if (context->IsDebugEvaluateContext()) {
« no previous file with comments | « src/contexts.h ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698