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

Unified Diff: runtime/vm/compiler.cc

Issue 868913002: Add Zone-based handle allocation interface and reduce use of Isolate-based interfaces. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/code_descriptors_test.cc ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 43075)
+++ runtime/vm/compiler.cc (working copy)
@@ -942,15 +942,17 @@
const Function& function,
bool optimized,
intptr_t osr_id) {
- Isolate* isolate = Isolate::Current();
- StackZone zone(isolate);
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
+ StackZone stack_zone(isolate);
+ Zone* zone = stack_zone.GetZone();
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
TIMERSCOPE(isolate, time_compilation);
Timer per_compile_timer(FLAG_trace_compiler, "Compilation time");
per_compile_timer.Start();
- ParsedFunction* parsed_function = new(isolate) ParsedFunction(
- isolate, Function::ZoneHandle(isolate, function.raw()));
+ ParsedFunction* parsed_function = new(zone) ParsedFunction(
+ thread, Function::ZoneHandle(zone, function.raw()));
if (FLAG_trace_compiler) {
OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n",
(osr_id == Isolate::kNoDeoptId ? "" : "osr "),
@@ -1147,7 +1149,8 @@
RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
- Isolate* isolate = Isolate::Current();
+ Thread* thread = Thread::Current();
+ Isolate* isolate = thread->isolate();
LongJumpScope jump;
if (setjmp(*jump.Set()) == 0) {
if (FLAG_trace_compiler) {
@@ -1180,7 +1183,7 @@
// We compile the function here, even though InvokeFunction() below
// would compile func automatically. We are checking fewer invariants
// here.
- ParsedFunction* parsed_function = new ParsedFunction(isolate, func);
+ ParsedFunction* parsed_function = new ParsedFunction(thread, func);
parsed_function->SetNodeSequence(fragment);
parsed_function->set_default_parameter_values(Object::null_array());
fragment->scope()->AddVariable(parsed_function->EnsureExpressionTemp());
« no previous file with comments | « runtime/vm/code_descriptors_test.cc ('k') | runtime/vm/constant_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698