| 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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 | 471 |
| 472 | 472 |
| 473 void FlowGraphCompiler::EmitComment(Instruction* instr) { | 473 void FlowGraphCompiler::EmitComment(Instruction* instr) { |
| 474 char buffer[256]; | 474 char buffer[256]; |
| 475 BufferFormatter f(buffer, sizeof(buffer)); | 475 BufferFormatter f(buffer, sizeof(buffer)); |
| 476 instr->PrintTo(&f); | 476 instr->PrintTo(&f); |
| 477 assembler()->Comment("%s", buffer); | 477 assembler()->Comment("%s", buffer); |
| 478 } | 478 } |
| 479 | 479 |
| 480 | 480 |
| 481 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { | |
| 482 const String& function_name = | |
| 483 String::ZoneHandle(Symbols::New(Token::Str(Token::kINDEX))); | |
| 484 | |
| 485 AddCurrentDescriptor(PcDescriptors::kDeopt, | |
| 486 comp->deopt_id(), | |
| 487 comp->token_pos(), | |
| 488 comp->try_index()); | |
| 489 | |
| 490 const intptr_t kNumArguments = 2; | |
| 491 const intptr_t kNumArgsChecked = 1; // Type-feedback. | |
| 492 GenerateInstanceCall(comp->deopt_id(), | |
| 493 comp->token_pos(), | |
| 494 comp->try_index(), | |
| 495 function_name, | |
| 496 kNumArguments, | |
| 497 Array::ZoneHandle(), // No optional arguments. | |
| 498 kNumArgsChecked, | |
| 499 comp->locs()->stack_bitmap()); | |
| 500 } | |
| 501 | |
| 502 | |
| 503 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, | 481 void FlowGraphCompiler::EmitTestAndCall(const ICData& ic_data, |
| 504 Register class_id_reg, | 482 Register class_id_reg, |
| 505 intptr_t arg_count, | 483 intptr_t arg_count, |
| 506 const Array& arg_names, | 484 const Array& arg_names, |
| 507 Label* deopt, | 485 Label* deopt, |
| 508 Label* done, | 486 Label* done, |
| 509 intptr_t deopt_id, | 487 intptr_t deopt_id, |
| 510 intptr_t token_index, | 488 intptr_t token_index, |
| 511 intptr_t try_index, | 489 intptr_t try_index, |
| 512 BitmapBuilder* stack_bitmap) { | 490 BitmapBuilder* stack_bitmap) { |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 return; | 846 return; |
| 869 } | 847 } |
| 870 } | 848 } |
| 871 | 849 |
| 872 // This move is not blocked. | 850 // This move is not blocked. |
| 873 EmitMove(index); | 851 EmitMove(index); |
| 874 } | 852 } |
| 875 | 853 |
| 876 | 854 |
| 877 } // namespace dart | 855 } // namespace dart |
| OLD | NEW |