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 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 // Skips parsing if we need to only install unoptimized code. | 732 // Skips parsing if we need to only install unoptimized code. |
733 if (!optimized && !Code::Handle(function.unoptimized_code()).IsNull()) { | 733 if (!optimized && !Code::Handle(function.unoptimized_code()).IsNull()) { |
734 InstallUnoptimizedCode(function); | 734 InstallUnoptimizedCode(function); |
735 isolate->set_long_jump_base(base); | 735 isolate->set_long_jump_base(base); |
736 return Error::null(); | 736 return Error::null(); |
737 } | 737 } |
738 if (setjmp(*jump.Set()) == 0) { | 738 if (setjmp(*jump.Set()) == 0) { |
739 TIMERSCOPE(time_compilation); | 739 TIMERSCOPE(time_compilation); |
740 Timer per_compile_timer(FLAG_trace_compiler, "Compilation time"); | 740 Timer per_compile_timer(FLAG_trace_compiler, "Compilation time"); |
741 per_compile_timer.Start(); | 741 per_compile_timer.Start(); |
742 ParsedFunction* parsed_function = new ParsedFunction( | 742 ParsedFunction* parsed_function = |
743 Function::ZoneHandle(function.raw())); | 743 new ParsedFunction(Function::ZoneHandle(function.raw())); |
744 if (FLAG_trace_compiler) { | 744 if (FLAG_trace_compiler) { |
745 OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n", | 745 OS::Print("Compiling %s%sfunction: '%s' @ token %" Pd ", size %" Pd "\n", |
746 (osr_id == Isolate::kNoDeoptId ? "" : "osr "), | 746 (osr_id == Isolate::kNoDeoptId ? "" : "osr "), |
747 (optimized ? "optimized " : ""), | 747 (optimized ? "optimized " : ""), |
748 function.ToFullyQualifiedCString(), | 748 function.ToFullyQualifiedCString(), |
749 function.token_pos(), | 749 function.token_pos(), |
750 (function.end_token_pos() - function.token_pos())); | 750 (function.end_token_pos() - function.token_pos())); |
751 } | 751 } |
752 { | 752 { |
753 HANDLESCOPE(isolate); | 753 HANDLESCOPE(isolate); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 Object::Handle(isolate->object_store()->sticky_error()); | 924 Object::Handle(isolate->object_store()->sticky_error()); |
925 isolate->object_store()->clear_sticky_error(); | 925 isolate->object_store()->clear_sticky_error(); |
926 isolate->set_long_jump_base(base); | 926 isolate->set_long_jump_base(base); |
927 return result.raw(); | 927 return result.raw(); |
928 } | 928 } |
929 UNREACHABLE(); | 929 UNREACHABLE(); |
930 return Object::null(); | 930 return Object::null(); |
931 } | 931 } |
932 | 932 |
933 } // namespace dart | 933 } // namespace dart |
OLD | NEW |