| 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); |
| 27 Bailout("CompileGraph"); | 28 Bailout("CompileGraph"); |
| 28 } | 29 } |
| 29 | 30 |
| 30 | 31 |
| 31 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { | 32 void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { |
| 32 UNIMPLEMENTED(); | 33 UNIMPLEMENTED(); |
| 33 } | 34 } |
| 34 | 35 |
| 35 | 36 |
| 37 void FlowGraphCompiler::FinalizeStackmaps(const Code& code) { |
| 38 UNIMPLEMENTED(); |
| 39 } |
| 40 |
| 41 |
| 36 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { | 42 void FlowGraphCompiler::FinalizeVarDescriptors(const Code& code) { |
| 37 UNIMPLEMENTED(); | 43 UNIMPLEMENTED(); |
| 38 } | 44 } |
| 39 | 45 |
| 40 | 46 |
| 41 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { | 47 void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { |
| 42 UNIMPLEMENTED(); | 48 UNIMPLEMENTED(); |
| 43 } | 49 } |
| 44 | 50 |
| 45 | 51 |
| 46 } // namespace dart | 52 } // namespace dart |
| 47 | 53 |
| 48 #endif // defined TARGET_ARCH_ARM | 54 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |