Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: vm/flow_graph_compiler.cc

Issue 10783035: Create frequently used symbols in the vm isolate (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void FlowGraphCompiler::EmitComment(Instruction* instr) { 404 void FlowGraphCompiler::EmitComment(Instruction* instr) {
404 char buffer[256]; 405 char buffer[256];
405 BufferFormatter f(buffer, sizeof(buffer)); 406 BufferFormatter f(buffer, sizeof(buffer));
406 instr->PrintTo(&f); 407 instr->PrintTo(&f);
407 assembler()->Comment("@%d: %s", instr->cid(), buffer); 408 assembler()->Comment("@%d: %s", instr->cid(), buffer);
408 } 409 }
409 410
410 411
411 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) { 412 void FlowGraphCompiler::EmitLoadIndexedGeneric(LoadIndexedComp* comp) {
412 const String& function_name = 413 const String& function_name =
413 String::ZoneHandle(String::NewSymbol(Token::Str(Token::kINDEX))); 414 String::ZoneHandle(Symbols::New(Token::Str(Token::kINDEX)));
414 415
415 AddCurrentDescriptor(PcDescriptors::kDeopt, 416 AddCurrentDescriptor(PcDescriptors::kDeopt,
416 comp->cid(), 417 comp->cid(),
417 comp->token_pos(), 418 comp->token_pos(),
418 comp->try_index()); 419 comp->try_index());
419 420
420 const intptr_t kNumArguments = 2; 421 const intptr_t kNumArguments = 2;
421 const intptr_t kNumArgsChecked = 1; // Type-feedback. 422 const intptr_t kNumArgsChecked = 1; // Type-feedback.
422 GenerateInstanceCall(comp->cid(), 423 GenerateInstanceCall(comp->cid(),
423 comp->token_pos(), 424 comp->token_pos(),
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 return; 792 return;
792 } 793 }
793 } 794 }
794 795
795 // This move is not blocked. 796 // This move is not blocked.
796 EmitMove(index); 797 EmitMove(index);
797 } 798 }
798 799
799 800
800 } // namespace dart 801 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698