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

Side by Side Diff: vm/compiler.cc

Issue 10083046: Fix issue 2621: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast_printer.h" 8 #include "vm/ast_printer.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/code_patcher.h" 10 #include "vm/code_patcher.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 static RawError* CompileFunctionHelper(const Function& function, 130 static RawError* CompileFunctionHelper(const Function& function,
131 bool optimized) { 131 bool optimized) {
132 Isolate* isolate = Isolate::Current(); 132 Isolate* isolate = Isolate::Current();
133 Error& error = Error::Handle(); 133 Error& error = Error::Handle();
134 LongJump* base = isolate->long_jump_base(); 134 LongJump* base = isolate->long_jump_base();
135 LongJump jump; 135 LongJump jump;
136 isolate->set_long_jump_base(&jump); 136 isolate->set_long_jump_base(&jump);
137 // Skips parsing if we need to only install unoptimized code. 137 // Skips parsing if we need to only install unoptimized code.
138 if (!optimized && !Code::Handle(function.unoptimized_code()).IsNull()) { 138 if (!optimized && !Code::Handle(function.unoptimized_code()).IsNull()) {
139 InstallUnoptimizedCode(function); 139 InstallUnoptimizedCode(function);
140 isolate->set_long_jump_base(base);
srdjan 2012/04/18 15:43:47 Thanks for fixing this, and sorry about introducin
140 return Error::null(); 141 return Error::null();
141 } 142 }
142 if (setjmp(*jump.Set()) == 0) { 143 if (setjmp(*jump.Set()) == 0) {
143 TIMERSCOPE(time_compilation); 144 TIMERSCOPE(time_compilation);
144 ParsedFunction parsed_function(function); 145 ParsedFunction parsed_function(function);
145 const char* function_fullname = function.ToFullyQualifiedCString(); 146 const char* function_fullname = function.ToFullyQualifiedCString();
146 if (FLAG_trace_compiler) { 147 if (FLAG_trace_compiler) {
147 OS::Print("Compiling %sfunction: '%s' @ token %d\n", 148 OS::Print("Compiling %sfunction: '%s' @ token %d\n",
148 (optimized ? "optimized " : ""), 149 (optimized ? "optimized " : ""),
149 function_fullname, 150 function_fullname,
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 } else { 392 } else {
392 result = isolate->object_store()->sticky_error(); 393 result = isolate->object_store()->sticky_error();
393 isolate->object_store()->clear_sticky_error(); 394 isolate->object_store()->clear_sticky_error();
394 } 395 }
395 isolate->set_long_jump_base(base); 396 isolate->set_long_jump_base(base);
396 return result.raw(); 397 return result.raw();
397 } 398 }
398 399
399 400
400 } // namespace dart 401 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698