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

Unified Diff: src/rewriter.cc

Issue 7383013: Avoid TLS load in AstNode constructor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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/parser.cc ('k') | src/scopes.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 64d7b3684c4d9f67c9b61fca5316ff2d8aa2318f..1ac2bb890aa868b4bf08e58a77455d28de6b5b76 100644
--- a/src/rewriter.cc
+++ b/src/rewriter.cc
@@ -66,9 +66,10 @@ class Processor: public AstVisitor {
Expression* SetResult(Expression* value) {
result_assigned_ = true;
- VariableProxy* result_proxy = new VariableProxy(result_);
- return new Assignment(Token::ASSIGN, result_proxy, value,
- RelocInfo::kNoPosition);
+ Zone* zone = isolate()->zone();
+ VariableProxy* result_proxy = new(zone) VariableProxy(result_);
+ return new(zone) Assignment(Token::ASSIGN, result_proxy, value,
+ RelocInfo::kNoPosition);
}
// Node visitors.
@@ -229,8 +230,9 @@ bool Rewriter::Rewrite(CompilationInfo* info) {
if (processor.HasStackOverflow()) return false;
if (processor.result_assigned()) {
- VariableProxy* result_proxy = new VariableProxy(result);
- body->Add(new ReturnStatement(result_proxy));
+ Zone* zone = info->isolate()->zone();
+ VariableProxy* result_proxy = new(zone) VariableProxy(result);
+ body->Add(new(zone) ReturnStatement(result_proxy));
}
}
« no previous file with comments | « src/parser.cc ('k') | src/scopes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698