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" |
11 #include "vm/il_printer.h" | 11 #include "vm/il_printer.h" |
12 #include "vm/intrinsifier.h" | 12 #include "vm/intrinsifier.h" |
13 #include "vm/locations.h" | 13 #include "vm/locations.h" |
14 #include "vm/longjump.h" | 14 #include "vm/longjump.h" |
15 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
16 #include "vm/parser.h" | 16 #include "vm/parser.h" |
17 #include "vm/stub_code.h" | 17 #include "vm/stub_code.h" |
| 18 #include "vm/symbols.h" |
18 | 19 |
19 namespace dart { | 20 namespace dart { |
20 | 21 |
21 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); | 22 DEFINE_FLAG(bool, print_scopes, false, "Print scopes of local variables."); |
22 DEFINE_FLAG(bool, trace_functions, false, "Trace entry of each function."); | 23 DEFINE_FLAG(bool, trace_functions, false, "Trace entry of each function."); |
23 DECLARE_FLAG(bool, code_comments); | 24 DECLARE_FLAG(bool, code_comments); |
24 DECLARE_FLAG(bool, enable_type_checks); | 25 DECLARE_FLAG(bool, enable_type_checks); |
25 DECLARE_FLAG(bool, intrinsify); | 26 DECLARE_FLAG(bool, intrinsify); |
26 DECLARE_FLAG(bool, report_usage_count); | 27 DECLARE_FLAG(bool, report_usage_count); |
27 DECLARE_FLAG(bool, trace_functions); | 28 DECLARE_FLAG(bool, trace_functions); |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 void FlowGraphCompiler::EmitComment(Instruction* instr) { | 406 void FlowGraphCompiler::EmitComment(Instruction* instr) { |
406 char buffer[256]; | 407 char buffer[256]; |
407 BufferFormatter f(buffer, sizeof(buffer)); | 408 BufferFormatter f(buffer, sizeof(buffer)); |
408 instr->PrintTo(&f); | 409 instr->PrintTo(&f); |
409 assembler()->Comment("@%d: %s", instr->cid(), buffer); | 410 assembler()->Comment("@%d: %s", instr->cid(), buffer); |
410 } | 411 } |
411 | 412 |
412 | 413 |
413 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { | 414 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { |
414 const String& function_name = | 415 const String& function_name = |
415 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX))); | 416 String::ZoneHandle(Symbols::New(Token::Str(Token::kINDEX))); |
416 | 417 |
417 AddCurrentDescriptor(PcDescriptors::kDeopt, | 418 AddCurrentDescriptor(PcDescriptors::kDeopt, |
418 comp->cid(), | 419 comp->cid(), |
419 comp->token_pos(), | 420 comp->token_pos(), |
420 comp->try_index()); | 421 comp->try_index()); |
421 | 422 |
422 const intptr_t kNumArguments = 2; | 423 const intptr_t kNumArguments = 2; |
423 const intptr_t kNumArgsChecked = 1; // Type-feedback. | 424 const intptr_t kNumArgsChecked = 1; // Type-feedback. |
424 GenerateInstanceCall(comp->cid(), | 425 GenerateInstanceCall(comp->cid(), |
425 comp->token_pos(), | 426 comp->token_pos(), |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 return; | 794 return; |
794 } | 795 } |
795 } | 796 } |
796 | 797 |
797 // This move is not blocked. | 798 // This move is not blocked. |
798 EmitMove(index); | 799 EmitMove(index); |
799 } | 800 } |
800 | 801 |
801 | 802 |
802 } // namespace dart | 803 } // namespace dart |
OLD | NEW |