| OLD | NEW |
| 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_index_table.h" | 10 #include "vm/code_index_table.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 TIMERSCOPE(time_compilation); | 120 TIMERSCOPE(time_compilation); |
| 121 ParsedFunction parsed_function(function); | 121 ParsedFunction parsed_function(function); |
| 122 const char* function_fullname = function.ToFullyQualifiedCString(); | 122 const char* function_fullname = function.ToFullyQualifiedCString(); |
| 123 if (FLAG_trace_compiler) { | 123 if (FLAG_trace_compiler) { |
| 124 OS::Print("Compiling %sfunction: '%s' @ token %d\n", | 124 OS::Print("Compiling %sfunction: '%s' @ token %d\n", |
| 125 (optimized ? "optimized " : ""), | 125 (optimized ? "optimized " : ""), |
| 126 function_fullname, | 126 function_fullname, |
| 127 function.token_index()); | 127 function.token_index()); |
| 128 } | 128 } |
| 129 Parser::ParseFunction(&parsed_function); | 129 Parser::ParseFunction(&parsed_function); |
| 130 parsed_function.AllocateVariables(); |
| 130 | 131 |
| 131 CodeIndexTable* code_index_table = isolate->code_index_table(); | 132 CodeIndexTable* code_index_table = isolate->code_index_table(); |
| 132 ASSERT(code_index_table != NULL); | 133 ASSERT(code_index_table != NULL); |
| 133 bool is_compiled = false; | 134 bool is_compiled = false; |
| 134 if (FLAG_use_new_compiler) { | 135 if (FLAG_use_new_compiler) { |
| 135 ASSERT(!optimized); | 136 ASSERT(!optimized); |
| 136 LongJump* old_base = isolate->long_jump_base(); | 137 LongJump* old_base = isolate->long_jump_base(); |
| 137 LongJump bailout_jump; | 138 LongJump bailout_jump; |
| 138 isolate->set_long_jump_base(&bailout_jump); | 139 isolate->set_long_jump_base(&bailout_jump); |
| 139 if (setjmp(*bailout_jump.Set()) == 0) { | 140 if (setjmp(*bailout_jump.Set()) == 0) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 } else { | 396 } else { |
| 396 result = isolate->object_store()->sticky_error(); | 397 result = isolate->object_store()->sticky_error(); |
| 397 isolate->object_store()->clear_sticky_error(); | 398 isolate->object_store()->clear_sticky_error(); |
| 398 } | 399 } |
| 399 isolate->set_long_jump_base(base); | 400 isolate->set_long_jump_base(base); |
| 400 return result.raw(); | 401 return result.raw(); |
| 401 } | 402 } |
| 402 | 403 |
| 403 | 404 |
| 404 } // namespace dart | 405 } // namespace dart |
| OLD | NEW |