| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/cha.h" | 9 #include "vm/cha.h" |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 248 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 249 OS::SNPrint(chars, len, kFormat, function_name, reason); | 249 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 250 const Error& error = Error::Handle( | 250 const Error& error = Error::Handle( |
| 251 LanguageError::New(String::Handle(String::New(chars)))); | 251 LanguageError::New(String::Handle(String::New(chars)))); |
| 252 Isolate::Current()->long_jump_base()->Jump(1, error); | 252 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 253 } | 253 } |
| 254 | 254 |
| 255 | 255 |
| 256 intptr_t FlowGraphCompiler::StackSize() const { | 256 intptr_t FlowGraphCompiler::StackSize() const { |
| 257 if (is_optimizing_) { | 257 if (is_optimizing_) { |
| 258 GraphEntryInstr* entry = flow_graph_.graph_entry(); | 258 return flow_graph_.graph_entry()->spill_slot_count(); |
| 259 return entry->fixed_slot_count() + entry->spill_slot_count(); | |
| 260 } else { | 259 } else { |
| 261 return parsed_function_.num_stack_locals() + | 260 return parsed_function_.num_stack_locals() + |
| 262 parsed_function_.num_copied_params(); | 261 parsed_function_.num_copied_params(); |
| 263 } | 262 } |
| 264 } | 263 } |
| 265 | 264 |
| 266 | 265 |
| 267 Label* FlowGraphCompiler::GetJumpLabel( | 266 Label* FlowGraphCompiler::GetJumpLabel( |
| 268 BlockEntryInstr* block_entry) const { | 267 BlockEntryInstr* block_entry) const { |
| 269 const intptr_t block_index = block_entry->postorder_number(); | 268 const intptr_t block_index = block_entry->postorder_number(); |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 | 1080 |
| 1082 for (int i = 0; i < len; i++) { | 1081 for (int i = 0; i < len; i++) { |
| 1083 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1082 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1084 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1083 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1085 ic_data.GetCountAt(i))); | 1084 ic_data.GetCountAt(i))); |
| 1086 } | 1085 } |
| 1087 sorted->Sort(HighestCountFirst); | 1086 sorted->Sort(HighestCountFirst); |
| 1088 } | 1087 } |
| 1089 | 1088 |
| 1090 } // namespace dart | 1089 } // namespace dart |
| OLD | NEW |