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

Unified Diff: src/rewriter.cc

Issue 345513003: Revert "Parser: Delay internalizing strings and values." (r21841) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/prettyprinter.cc ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/rewriter.cc
diff --git a/src/rewriter.cc b/src/rewriter.cc
index 8ec5c5476c45a5de4a16773990c6e79b12b76f3c..c92ccda730fbe604d04434ab7f7abf6257748eb0 100644
--- a/src/rewriter.cc
+++ b/src/rewriter.cc
@@ -20,9 +20,7 @@ class Processor: public AstVisitor {
result_assigned_(false),
is_set_(false),
in_try_(false),
- // Passing a null AstValueFactory is fine, because Processor doesn't
- // need to create strings or literals.
- factory_(zone, NULL) {
+ factory_(zone) {
InitializeAstVisitor(zone);
}
@@ -236,10 +234,8 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
ZoneList<Statement*>* body = function->body();
if (!body->is_empty()) {
- Variable* result =
- scope->NewTemporary(info->ast_value_factory()->dot_result_string());
- // The name string must be internalized at this point.
- ASSERT(!result->name().is_null());
+ Variable* result = scope->NewTemporary(
+ info->isolate()->factory()->dot_result_string());
Processor processor(result, info->zone());
processor.Process(body);
if (processor.HasStackOverflow()) return false;
@@ -254,7 +250,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->raw_name(), false, result->interface(), pos);
+ result->name(), false, result->interface(), pos);
result_proxy->BindTo(result);
Statement* result_statement =
processor.factory()->NewReturnStatement(result_proxy, pos);
« no previous file with comments | « src/prettyprinter.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698