OLD | NEW |
---|---|
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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_DBC. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_DBC. |
6 #if defined(TARGET_ARCH_DBC) | 6 #if defined(TARGET_ARCH_DBC) |
7 | 7 |
8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
9 | 9 |
10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 // In optimized code this descriptor is needed for exception handling. | 202 // In optimized code this descriptor is needed for exception handling. |
203 AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 203 AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
204 deopt_id_after, | 204 deopt_id_after, |
205 instr->token_pos()); | 205 instr->token_pos()); |
206 } | 206 } |
207 } | 207 } |
208 | 208 |
209 | 209 |
210 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, | 210 void CompilerDeoptInfoWithStub::GenerateCode(FlowGraphCompiler* compiler, |
211 intptr_t stub_ix) { | 211 intptr_t stub_ix) { |
212 UNIMPLEMENTED(); | 212 // Calls do not need stubs, they share a deoptimization trampoline. |
Vyacheslav Egorov (Google)
2016/06/08 11:58:53
I don't think we really need DeoptInfoWithStub on
zra
2016/06/08 17:46:30
Done.
| |
213 ASSERT(reason() != ICData::kDeoptAtCall); | |
214 Assembler* assembler = compiler->assembler(); | |
215 #define __ assembler-> | |
216 __ Comment("%s", Name()); | |
217 __ Bind(entry_label()); | |
218 if (FLAG_trap_on_deoptimization) { | |
219 __ Trap(); | |
220 } | |
221 | |
222 ASSERT(deopt_env() != NULL); | |
223 set_pc_offset(assembler->CodeSize()); | |
zra
2016/06/07 22:31:28
On other architectures this comes after the Deopt
| |
224 __ Deopt(0, deopt_id()); | |
225 #undef __ | |
213 } | 226 } |
214 | 227 |
215 | 228 |
216 #define __ assembler()-> | 229 #define __ assembler()-> |
217 | 230 |
218 | 231 |
219 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, | 232 void FlowGraphCompiler::GenerateAssertAssignable(TokenPosition token_pos, |
220 intptr_t deopt_id, | 233 intptr_t deopt_id, |
221 const AbstractType& dst_type, | 234 const AbstractType& dst_type, |
222 const String& dst_name, | 235 const String& dst_name, |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
380 void FlowGraphCompiler::CompileGraph() { | 393 void FlowGraphCompiler::CompileGraph() { |
381 InitCompiler(); | 394 InitCompiler(); |
382 | 395 |
383 if (TryIntrinsify()) { | 396 if (TryIntrinsify()) { |
384 // Skip regular code generation. | 397 // Skip regular code generation. |
385 return; | 398 return; |
386 } | 399 } |
387 | 400 |
388 EmitFrameEntry(); | 401 EmitFrameEntry(); |
389 VisitBlocks(); | 402 VisitBlocks(); |
403 __ Trap(); | |
404 GenerateDeferredCode(); | |
390 } | 405 } |
391 | 406 |
392 | 407 |
393 #undef __ | 408 #undef __ |
394 #define __ compiler_->assembler()-> | 409 #define __ compiler_->assembler()-> |
395 | 410 |
396 | 411 |
397 void ParallelMoveResolver::EmitMove(int index) { | 412 void ParallelMoveResolver::EmitMove(int index) { |
398 MoveOperands* move = moves_[index]; | 413 MoveOperands* move = moves_[index]; |
399 const Location source = move->src(); | 414 const Location source = move->src(); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 513 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
499 UNIMPLEMENTED(); | 514 UNIMPLEMENTED(); |
500 } | 515 } |
501 | 516 |
502 | 517 |
503 #undef __ | 518 #undef __ |
504 | 519 |
505 } // namespace dart | 520 } // namespace dart |
506 | 521 |
507 #endif // defined TARGET_ARCH_DBC | 522 #endif // defined TARGET_ARCH_DBC |
OLD | NEW |