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

Unified Diff: runtime/vm/parser.cc

Issue 299263005: More reduction of accessing TLS by caching/passing isolate value. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 36586)
+++ runtime/vm/parser.cc (working copy)
@@ -5295,21 +5295,22 @@
if (current_block_ == NULL) {
if (!func.IsLocalFunction()) {
// We are compiling a non-nested function.
- outer_scope = new LocalScope(NULL, 0, 0);
+ outer_scope = new(isolate()) LocalScope(NULL, 0, 0);
} else {
// We are compiling the function of an invoked closure.
// Restore the outer scope containing all captured variables.
const ContextScope& context_scope =
- ContextScope::Handle(func.context_scope());
+ ContextScope::Handle(isolate(), func.context_scope());
ASSERT(!context_scope.IsNull());
- outer_scope =
- new LocalScope(LocalScope::RestoreOuterScope(context_scope), 0, 0);
+ outer_scope = new(isolate()) LocalScope(
+ LocalScope::RestoreOuterScope(context_scope), 0, 0);
}
} else {
// We are parsing a nested function while compiling the enclosing function.
- outer_scope = new LocalScope(current_block_->scope,
- current_block_->scope->function_level() + 1,
- 0);
+ outer_scope =
+ new(isolate()) LocalScope(current_block_->scope,
+ current_block_->scope->function_level() + 1,
+ 0);
}
ChainNewBlock(outer_scope);
}
« no previous file with comments | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698