Chromium Code Reviews| 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 310 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); | 310 char* chars = Isolate::Current()->current_zone()->Alloc<char>(len); |
| 311 OS::SNPrint(chars, len, kFormat, function_name, reason); | 311 OS::SNPrint(chars, len, kFormat, function_name, reason); |
| 312 const Error& error = Error::Handle( | 312 const Error& error = Error::Handle( |
| 313 LanguageError::New(String::Handle(String::New(chars)))); | 313 LanguageError::New(String::Handle(String::New(chars)))); |
| 314 Isolate::Current()->long_jump_base()->Jump(1, error); | 314 Isolate::Current()->long_jump_base()->Jump(1, error); |
| 315 } | 315 } |
| 316 | 316 |
| 317 | 317 |
| 318 intptr_t FlowGraphCompiler::StackSize() const { | 318 intptr_t FlowGraphCompiler::StackSize() const { |
| 319 if (is_optimizing_) { | 319 if (is_optimizing_) { |
| 320 return block_order_[0]->AsGraphEntry()->spill_slot_count(); | 320 GraphEntryInstr* entry = block_order_[0]->AsGraphEntry(); |
|
Kevin Millikin (Google)
2013/05/08 11:42:00
Not your code, but I don't like using a property o
Florian Schneider
2013/05/08 17:10:55
Done.
| |
| 321 return entry->fixed_slot_count() + entry->spill_slot_count(); | |
| 321 } else { | 322 } else { |
| 322 return parsed_function_.num_stack_locals() + | 323 return parsed_function_.num_stack_locals() + |
| 323 parsed_function_.num_copied_params(); | 324 parsed_function_.num_copied_params(); |
| 324 } | 325 } |
| 325 } | 326 } |
| 326 | 327 |
| 327 | 328 |
| 328 Label* FlowGraphCompiler::GetJumpLabel( | 329 Label* FlowGraphCompiler::GetJumpLabel( |
| 329 BlockEntryInstr* block_entry) const { | 330 BlockEntryInstr* block_entry) const { |
| 330 const intptr_t block_index = block_entry->postorder_number(); | 331 const intptr_t block_index = block_entry->postorder_number(); |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1141 | 1142 |
| 1142 for (int i = 0; i < len; i++) { | 1143 for (int i = 0; i < len; i++) { |
| 1143 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), | 1144 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), |
| 1144 &Function::ZoneHandle(ic_data.GetTargetAt(i)), | 1145 &Function::ZoneHandle(ic_data.GetTargetAt(i)), |
| 1145 ic_data.GetCountAt(i))); | 1146 ic_data.GetCountAt(i))); |
| 1146 } | 1147 } |
| 1147 sorted->Sort(HighestCountFirst); | 1148 sorted->Sort(HighestCountFirst); |
| 1148 } | 1149 } |
| 1149 | 1150 |
| 1150 } // namespace dart | 1151 } // namespace dart |
| OLD | NEW |