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

Unified Diff: src/rewriter.cc

Issue 231073002: WIP: Parser: delay string internalization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: internalizing better Created 6 years, 7 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
Index: src/rewriter.cc
diff --git a/src/rewriter.cc b/src/rewriter.cc
index 27f03dc7a483e935e09b89bee9a8fc93a3693f3d..e420bcdcb5b7e59d05a4a273b1ff5dc64f26dd16 100644
--- a/src/rewriter.cc
+++ b/src/rewriter.cc
@@ -234,8 +234,9 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
ZoneList<Statement*>* body = function->body();
if (!body->is_empty()) {
- Variable* result = scope->NewTemporary(
- info->isolate()->factory()->dot_result_string());
+ Variable* result =
+ scope->NewTemporary(info->symbol_table()->dot_result_string());
+ ASSERT(!result->name().is_null()); // Gets internalized right away.
Processor processor(result, info->zone());
processor.Process(body);
if (processor.HasStackOverflow()) return false;
@@ -250,7 +251,7 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
// coincides with the end of the with scope which is the position of '1'.
int pos = function->end_position();
VariableProxy* result_proxy = processor.factory()->NewVariableProxy(
- result->name(), false, result->interface(), pos);
+ result->raw_name(), false, result->interface(), pos);
result_proxy->BindTo(result);
Statement* result_statement =
processor.factory()->NewReturnStatement(result_proxy, pos);

Powered by Google App Engine
This is Rietveld 408576698