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

Unified Diff: runtime/vm/compiler.cc

Issue 11778013: Cleanup handles more efficiently, ensures we don't have to iterate over them (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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/class_finalizer.cc ('k') | runtime/vm/handles_impl.h » ('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 16679)
+++ runtime/vm/compiler.cc (working copy)
@@ -70,12 +70,12 @@
RawError* Compiler::Compile(const Library& library, const Script& script) {
Isolate* isolate = Isolate::Current();
+ StackZone zone(isolate);
LongJump* base = isolate->long_jump_base();
LongJump jump;
isolate->set_long_jump_base(&jump);
if (setjmp(*jump.Set()) == 0) {
if (FLAG_trace_compiler) {
- HANDLESCOPE(isolate);
const String& script_url = String::Handle(script.url());
// TODO(iposva): Extract script kind.
OS::Print("Compiling %s '%s'\n", "", script_url.ToCString());
@@ -118,6 +118,7 @@
TimerScope timer(FLAG_compiler_stats, &CompilerStats::codegen_timer);
bool is_compiled = false;
Isolate* isolate = Isolate::Current();
+ HANDLESCOPE(isolate);
ASSERT(isolate->ic_data_array() == Array::null()); // Must be reset to null.
const intptr_t prev_deopt_id = isolate->deopt_id();
isolate->set_deopt_id(0);
@@ -444,6 +445,7 @@
static RawError* CompileFunctionHelper(const Function& function,
bool optimized) {
Isolate* isolate = Isolate::Current();
+ StackZone zone(isolate);
LongJump* base = isolate->long_jump_base();
LongJump jump;
isolate->set_long_jump_base(&jump);
@@ -465,8 +467,11 @@
function.ToFullyQualifiedCString(),
function.token_pos());
}
- Parser::ParseFunction(parsed_function);
- parsed_function->AllocateVariables();
+ {
+ HANDLESCOPE(isolate);
+ Parser::ParseFunction(parsed_function);
+ parsed_function->AllocateVariables();
+ }
const bool success =
CompileParsedFunctionHelper(*parsed_function, optimized);
@@ -552,7 +557,6 @@
RawError* Compiler::CompileAllFunctions(const Class& cls) {
- Isolate* isolate = Isolate::Current();
Error& error = Error::Handle();
Array& functions = Array::Handle(cls.functions());
Function& func = Function::Handle();
@@ -568,8 +572,6 @@
if (!func.HasCode() &&
!func.is_abstract() &&
!func.IsRedirectingFactory()) {
- StackZone zone(isolate);
- HANDLESCOPE(isolate);
error = CompileFunction(func);
if (!error.IsNull()) {
return error.raw();
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/handles_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698