| 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_XXX. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 6 |
| 7 #include "vm/flow_graph_compiler.h" | 7 #include "vm/flow_graph_compiler.h" |
| 8 | 8 |
| 9 #include "vm/dart_entry.h" | 9 #include "vm/dart_entry.h" |
| 10 #include "vm/debugger.h" | 10 #include "vm/debugger.h" |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 char* chars = reinterpret_cast<char*>( | 134 char* chars = reinterpret_cast<char*>( |
| 135 Isolate::Current()->current_zone()->Allocate(len)); | 135 Isolate::Current()->current_zone()->Allocate(len)); |
| 136 OS::SNPrint(chars, len, kFormat, function_name, reason); | 136 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 137 const Error& error = Error::Handle( | 137 const Error& error = Error::Handle( |
| 138 LanguageError::New(String::Handle(String::New(chars)))); | 138 LanguageError::New(String::Handle(String::New(chars)))); |
| 139 Isolate::Current()->long_jump_base()->Jump(1, error); | 139 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 140 } | 140 } |
| 141 | 141 |
| 142 | 142 |
| 143 intptr_t FlowGraphCompiler::StackSize() const { | 143 intptr_t FlowGraphCompiler::StackSize() const { |
| 144 return parsed_function_.stack_local_count() + | 144 if (is_ssa_) { |
| 145 parsed_function_.copied_parameter_count(); | 145 return block_order_[0]->AsGraphEntry()->spill_slot_count(); |
| 146 } else { |
| 147 return parsed_function_.stack_local_count() + |
| 148 parsed_function_.copied_parameter_count(); |
| 149 } |
| 146 } | 150 } |
| 147 | 151 |
| 148 | 152 |
| 149 Label* FlowGraphCompiler::GetBlockLabel( | 153 Label* FlowGraphCompiler::GetBlockLabel( |
| 150 BlockEntryInstr* block_entry) const { | 154 BlockEntryInstr* block_entry) const { |
| 151 intptr_t block_index = block_entry->postorder_number(); | 155 intptr_t block_index = block_entry->postorder_number(); |
| 152 return &block_info_[block_index]->label; | 156 return &block_info_[block_index]->label; |
| 153 } | 157 } |
| 154 | 158 |
| 155 | 159 |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 return; | 798 return; |
| 795 } | 799 } |
| 796 } | 800 } |
| 797 | 801 |
| 798 // This move is not blocked. | 802 // This move is not blocked. |
| 799 EmitMove(index); | 803 EmitMove(index); |
| 800 } | 804 } |
| 801 | 805 |
| 802 | 806 |
| 803 } // namespace dart | 807 } // namespace dart |
| OLD | NEW |