| 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 | 500 |
| 501 | 501 |
| 502 void FlowGraphCompiler::EmitComment(Instruction* instr) { | 502 void FlowGraphCompiler::EmitComment(Instruction* instr) { |
| 503 char buffer[256]; | 503 char buffer[256]; |
| 504 BufferFormatter f(buffer, sizeof(buffer)); | 504 BufferFormatter f(buffer, sizeof(buffer)); |
| 505 instr->PrintTo(&f); | 505 instr->PrintTo(&f); |
| 506 assembler()->Comment("%s", buffer); | 506 assembler()->Comment("%s", buffer); |
| 507 } | 507 } |
| 508 | 508 |
| 509 | 509 |
| 510 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { | |
| 511 const String& function_name = | |
| 512 String::ZoneHandle(Symbols::New(Token::Str(Token::kINDEX))); | |
| 513 | |
| 514 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 515 comp->deopt_id(), | |
| 516 comp->token_pos(), | |
| 517 comp->try_index()); | |
| 518 | |
| 519 const intptr_t kNumArguments = 2; | |
| 520 const intptr_t kNumArgsChecked = 1; // Type-feedback. | |
| 521 GenerateInstanceCall(comp->deopt_id(), | |
| 522 comp->token_pos(), | |
| 523 comp->try_index(), | |
| 524 function_name, | |
| 525 kNumArguments, | |
| 526 Array::ZoneHandle(), // No optional arguments. | |
| 527 kNumArgsChecked, | |
| 528 comp->locs()->stack_bitmap()); | |
| 529 } | |
| 530 | |
| 531 | |
| 532 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, | 510 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, |
| 533 Register class_id_reg, | 511 Register class_id_reg, |
| 534 intptr_t arg_count, | 512 intptr_t arg_count, |
| 535 const Array& arg_names, | 513 const Array& arg_names, |
| 536 Label* deopt, | 514 Label* deopt, |
| 537 Label* done, | 515 Label* done, |
| 538 intptr_t deopt_id, | 516 intptr_t deopt_id, |
| 539 intptr_t token_index, | 517 intptr_t token_index, |
| 540 intptr_t try_index, | 518 intptr_t try_index, |
| 541 BitmapBuilder* stack_bitmap) { | 519 BitmapBuilder* stack_bitmap) { |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 return; | 875 return; |
| 898 } | 876 } |
| 899 } | 877 } |
| 900 | 878 |
| 901 // This move is not blocked. | 879 // This move is not blocked. |
| 902 EmitMove(index); | 880 EmitMove(index); |
| 903 } | 881 } |
| 904 | 882 |
| 905 | 883 |
| 906 } // namespace dart | 884 } // namespace dart |
| OLD | NEW |