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/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 void FlowGraphCompiler::Bailout(const char* reason) { | 14 void FlowGraphCompiler::Bailout(const char* reason) { |
15 const char* kFormat = "FlowGraphCompiler Bailout: %s."; | 15 const char* kFormat = "FlowGraphCompiler Bailout: %s."; |
16 intptr_t len = OS::SNPrint(NULL, 0, kFormat, reason) + 1; | 16 intptr_t len = OS::SNPrint(NULL, 0, kFormat, reason) + 1; |
17 char* chars = reinterpret_cast<char*>( | 17 char* chars = reinterpret_cast<char*>( |
18 Isolate::Current()->current_zone()->Allocate(len)); | 18 Isolate::Current()->current_zone()->Allocate(len)); |
19 OS::SNPrint(chars, len, kFormat, reason); | 19 OS::SNPrint(chars, len, kFormat, reason); |
20 const Error& error = Error::Handle( | 20 const Error& error = Error::Handle( |
21 LanguageError::New(String::Handle(String::New(chars)))); | 21 LanguageError::New(String::Handle(String::New(chars)))); |
22 Isolate::Current()->long_jump_base()->Jump(1, error); | 22 Isolate::Current()->long_jump_base()->Jump(1, error); |
23 } | 23 } |
24 | 24 |
25 | 25 |
26 void FlowGraphCompiler::CompileGraph() { | 26 void FlowGraphCompiler::CompileGraph() { |
27 TimerScope timer(FLAG_compiler_stats, &CompilerStats::graphcompiler_timer); | |
28 Bailout("CompileGraph"); | 27 Bailout("CompileGraph"); |
29 } | 28 } |
30 | 29 |
31 | 30 |
32 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { | 31 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { |
33 UNIMPLEMENTED(); | 32 UNIMPLEMENTED(); |
34 } | 33 } |
35 | 34 |
36 | 35 |
37 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { | 36 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
38 UNIMPLEMENTED(); | 37 UNIMPLEMENTED(); |
39 } | 38 } |
40 | 39 |
41 | 40 |
42 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { | 41 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
43 UNIMPLEMENTED(); | 42 UNIMPLEMENTED(); |
44 } | 43 } |
45 | 44 |
46 | 45 |
47 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 46 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
48 UNIMPLEMENTED(); | 47 UNIMPLEMENTED(); |
49 } | 48 } |
50 | 49 |
51 | 50 |
52 } // namespace dart | 51 } // namespace dart |
53 | 52 |
54 #endif // defined TARGET_ARCH_ARM | 53 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |