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

Unified Diff: src/parser.cc

Issue 62143002: Add three string constants from parser to the root-set. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/heap.h ('k') | src/rewriter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 9a68bd7b4223e54bf9dd408665acb26bf4c305a1..0b1bf63f5da1d9db58b1bd3d720eee8d4eeb50ca 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -2623,13 +2623,10 @@ void Parser::InitializeForEachStatement(ForEachStatement* stmt,
if (for_of != NULL) {
Factory* heap_factory = isolate()->factory();
- Handle<String> iterator_str = heap_factory->InternalizeOneByteString(
- STATIC_ASCII_VECTOR(".iterator"));
- Handle<String> result_str = heap_factory->InternalizeOneByteString(
- STATIC_ASCII_VECTOR(".result"));
- Variable* iterator =
- top_scope_->DeclarationScope()->NewTemporary(iterator_str);
- Variable* result = top_scope_->DeclarationScope()->NewTemporary(result_str);
+ Variable* iterator = top_scope_->DeclarationScope()->NewTemporary(
+ heap_factory->dot_iterator_string());
+ Variable* result = top_scope_->DeclarationScope()->NewTemporary(
+ heap_factory->dot_result_string());
Expression* assign_iterator;
Expression* next_result;
@@ -4100,9 +4097,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
// in a temporary variable, a definition that is used by "yield"
// expressions. Presence of a variable for the generator object in the
// FunctionState indicates that this function is a generator.
- Handle<String> tempname = isolate()->factory()->InternalizeOneByteString(
- STATIC_ASCII_VECTOR(".generator_object"));
- Variable* temp = top_scope_->DeclarationScope()->NewTemporary(tempname);
+ Variable* temp = top_scope_->DeclarationScope()->NewTemporary(
+ isolate()->factory()->dot_generator_object_string());
function_state.set_generator_object_variable(temp);
}
« no previous file with comments | « src/heap.h ('k') | src/rewriter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698