| 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 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 token_pos, | 231 token_pos, |
| 232 CurrentTryIndex()); | 232 CurrentTryIndex()); |
| 233 } | 233 } |
| 234 | 234 |
| 235 | 235 |
| 236 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, | 236 void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, |
| 237 intptr_t token_pos) { | 237 intptr_t token_pos) { |
| 238 // TODO(srdjan): Temporary use deopt stubs to maintain deopt-indexes. | 238 // TODO(srdjan): Temporary use deopt stubs to maintain deopt-indexes. |
| 239 // kDeoptAtCall will not emit code, but will only generate deoptimization | 239 // kDeoptAtCall will not emit code, but will only generate deoptimization |
| 240 // information. | 240 // information. |
| 241 ASSERT(is_optimizing()); |
| 241 const intptr_t deopt_index = deopt_stubs_.length(); | 242 const intptr_t deopt_index = deopt_stubs_.length(); |
| 242 AddDeoptStub(deopt_id, kDeoptAtCall); | 243 AddDeoptStub(deopt_id, kDeoptAtCall); |
| 243 pc_descriptors_list()->AddDescriptor(PcDescriptors::kDeoptIndex, | 244 pc_descriptors_list()->AddDeoptIndex(assembler()->CodeSize(), |
| 244 assembler()->CodeSize(), | |
| 245 deopt_id, | 245 deopt_id, |
| 246 token_pos, | 246 kDeoptAtCall, |
| 247 deopt_index); | 247 deopt_index); |
| 248 } | 248 } |
| 249 | 249 |
| 250 | 250 |
| 251 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { | 251 void FlowGraphCompiler::RecordSafepoint(LocationSummary* locs) { |
| 252 if (is_optimizing()) { | 252 if (is_optimizing()) { |
| 253 BitmapBuilder* bitmap = locs->stack_bitmap(); | 253 BitmapBuilder* bitmap = locs->stack_bitmap(); |
| 254 ASSERT(bitmap != NULL); | 254 ASSERT(bitmap != NULL); |
| 255 ASSERT(bitmap->Length() <= StackSize()); | 255 ASSERT(bitmap->Length() <= StackSize()); |
| 256 // Pad the bitmap out to describe all the spill slots. | 256 // Pad the bitmap out to describe all the spill slots. |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 return; | 784 return; |
| 785 } | 785 } |
| 786 } | 786 } |
| 787 | 787 |
| 788 // This move is not blocked. | 788 // This move is not blocked. |
| 789 EmitMove(index); | 789 EmitMove(index); |
| 790 } | 790 } |
| 791 | 791 |
| 792 | 792 |
| 793 } // namespace dart | 793 } // namespace dart |
| OLD | NEW |