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

Unified Diff: src/ast-value-factory.cc

Issue 1154103005: Refactor lexical home object binding (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 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/ast-value-factory.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast-value-factory.cc
diff --git a/src/ast-value-factory.cc b/src/ast-value-factory.cc
index 1174460af527e0720095c8fe72ad837132c8538c..a819483eccbc417ea76e5e687dc59a3f304461d9 100644
--- a/src/ast-value-factory.cc
+++ b/src/ast-value-factory.cc
@@ -167,8 +167,13 @@ void AstValue::Internalize(Isolate* isolate) {
DCHECK(!string_->string().is_null());
break;
case SYMBOL:
- DCHECK_EQ(0, strcmp(symbol_name_, "iterator_symbol"));
- value_ = isolate->factory()->iterator_symbol();
+ if (symbol_name_[0] == 'i') {
+ DCHECK_EQ(0, strcmp(symbol_name_, "iterator_symbol"));
+ value_ = isolate->factory()->iterator_symbol();
+ } else {
+ DCHECK_EQ(0, strcmp(symbol_name_, "home_object_symbol"));
+ value_ = isolate->factory()->home_object_symbol();
+ }
break;
case NUMBER:
value_ = isolate->factory()->NewNumber(number_, TENURED);
« no previous file with comments | « src/ast-value-factory.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698