| 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/debugger.h" | 9 #include "vm/debugger.h" |
| 10 #include "vm/il_printer.h" | 10 #include "vm/il_printer.h" |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 | 358 |
| 359 | 359 |
| 360 void FlowGraphCompiler::EmitComment(Instruction* instr) { | 360 void FlowGraphCompiler::EmitComment(Instruction* instr) { |
| 361 char buffer[80]; | 361 char buffer[80]; |
| 362 BufferFormatter f(buffer, sizeof(buffer)); | 362 BufferFormatter f(buffer, sizeof(buffer)); |
| 363 instr->PrintTo(&f); | 363 instr->PrintTo(&f); |
| 364 assembler()->Comment("@%d: %s", instr->cid(), buffer); | 364 assembler()->Comment("@%d: %s", instr->cid(), buffer); |
| 365 } | 365 } |
| 366 | 366 |
| 367 |
| 368 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { |
| 369 const String& function_name = |
| 370 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX))); |
| 371 |
| 372 AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 373 comp->cid(), |
| 374 comp->token_index(), |
| 375 comp->try_index()); |
| 376 |
| 377 const intptr_t kNumArguments = 2; |
| 378 const intptr_t kNumArgsChecked = 1; // Type-feedback. |
| 379 GenerateInstanceCall(comp->cid(), |
| 380 comp->token_index(), |
| 381 comp->try_index(), |
| 382 function_name, |
| 383 kNumArguments, |
| 384 Array::ZoneHandle(), // No optional arguments. |
| 385 kNumArgsChecked); |
| 386 } |
| 387 |
| 388 |
| 389 |
| 390 |
| 367 } // namespace dart | 391 } // namespace dart |
| OLD | NEW |