Index: src/rewriter.cc |
diff --git a/src/rewriter.cc b/src/rewriter.cc |
index 27f03dc7a483e935e09b89bee9a8fc93a3693f3d..835dc2f773dbe192b5975d14620c8bec22a81eb4 100644 |
--- a/src/rewriter.cc |
+++ b/src/rewriter.cc |
@@ -20,7 +20,9 @@ class Processor: public AstVisitor { |
result_assigned_(false), |
is_set_(false), |
in_try_(false), |
- factory_(zone) { |
+ // Passing a null AstStringTable is fine, because Processor doesn't |
+ // need to create strings or literals. |
+ factory_(zone, NULL) { |
InitializeAstVisitor(zone); |
} |
@@ -234,8 +236,10 @@ 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->string_table()->dot_result_string()); |
+ // The name string must be internalized at this point. |
+ ASSERT(!result->name().is_null()); |
Processor processor(result, info->zone()); |
processor.Process(body); |
if (processor.HasStackOverflow()) return false; |
@@ -250,7 +254,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); |