Chromium Code Reviews| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 deopt_id, | 230 deopt_id, |
| 231 token_pos, | 231 token_pos, |
| 232 try_index); | 232 try_index); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { | 236 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { |
| 237 if (is_optimizing()) { | 237 if (is_optimizing()) { |
| 238 BitmapBuilder* bitmap = locs->stack_bitmap(); | 238 BitmapBuilder* bitmap = locs->stack_bitmap(); |
| 239 ASSERT(bitmap != NULL); | 239 ASSERT(bitmap != NULL); |
| 240 ASSERT(bitmap->Length() <= StackSize()); | |
| 241 // Pad the bitmap out to describe all the spill slots. | |
| 240 bitmap->SetLength(StackSize()); | 242 bitmap->SetLength(StackSize()); |
| 241 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), bitmap); | 243 |
| 244 // Slow path code can have registers at the safepoint. | |
| 245 if (!locs->always_calls()) { | |
| 246 for (intptr_t i = 0; i < kNumberOfCpuRegisters; ++i) { | |
|
Vyacheslav Egorov (Google)
2012/08/27 14:54:51
This is tightly couple with the way we push regist
Kevin Millikin (Google)
2012/08/29 12:40:41
Done.
| |
| 247 Register reg = static_cast<Register>(i); | |
| 248 if (locs->live_registers()->ContainsRegister(reg)) { | |
| 249 bitmap->Set(bitmap->Length(), true); | |
| 250 } | |
| 251 } | |
|
Vyacheslav Egorov (Google)
2012/08/27 14:54:51
Also please handle XMMRegisters here and remove a
| |
| 252 } | |
| 253 | |
| 254 intptr_t register_count = bitmap->Length() - StackSize(); | |
| 255 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), | |
| 256 bitmap, | |
| 257 register_count); | |
| 242 } | 258 } |
| 243 } | 259 } |
| 244 | 260 |
| 245 | 261 |
| 246 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, | 262 Label* FlowGraphCompiler::AddDeoptStub(intptr_t deopt_id, |
| 247 intptr_t try_index, | 263 intptr_t try_index, |
| 248 DeoptReasonId reason) { | 264 DeoptReasonId reason) { |
| 249 DeoptimizationStub* stub = | 265 DeoptimizationStub* stub = |
| 250 new DeoptimizationStub(deopt_id, try_index, reason); | 266 new DeoptimizationStub(deopt_id, try_index, reason); |
| 251 ASSERT(is_optimizing_); | 267 ASSERT(is_optimizing_); |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 738 return; | 754 return; |
| 739 } | 755 } |
| 740 } | 756 } |
| 741 | 757 |
| 742 // This move is not blocked. | 758 // This move is not blocked. |
| 743 EmitMove(index); | 759 EmitMove(index); |
| 744 } | 760 } |
| 745 | 761 |
| 746 | 762 |
| 747 } // namespace dart | 763 } // namespace dart |
| OLD | NEW |