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

Side by Side Diff: runtime/vm/intermediate_language_x64.cc

Issue 311993007: VM: Reduce the number of edge counters in generated code. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
11 #include "vm/flow_graph.h"
11 #include "vm/flow_graph_compiler.h" 12 #include "vm/flow_graph_compiler.h"
12 #include "vm/locations.h" 13 #include "vm/locations.h"
13 #include "vm/object_store.h" 14 #include "vm/object_store.h"
14 #include "vm/parser.h" 15 #include "vm/parser.h"
15 #include "vm/stack_frame.h" 16 #include "vm/stack_frame.h"
16 #include "vm/stub_code.h" 17 #include "vm/stub_code.h"
17 #include "vm/symbols.h" 18 #include "vm/symbols.h"
18 19
19 #define __ compiler->assembler()-> 20 #define __ compiler->assembler()->
20 21
(...skipping 5562 matching lines...) Expand 10 before | Expand all | Expand 10 after
5583 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5584 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5584 if (!compiler->CanFallThroughTo(normal_entry())) { 5585 if (!compiler->CanFallThroughTo(normal_entry())) {
5585 __ jmp(compiler->GetJumpLabel(normal_entry())); 5586 __ jmp(compiler->GetJumpLabel(normal_entry()));
5586 } 5587 }
5587 } 5588 }
5588 5589
5589 5590
5590 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5591 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5591 __ Bind(compiler->GetJumpLabel(this)); 5592 __ Bind(compiler->GetJumpLabel(this));
5592 if (!compiler->is_optimizing()) { 5593 if (!compiler->is_optimizing()) {
5593 if (FLAG_emit_edge_counters) { 5594 if (compiler->NeedsEdgeCounter(this)) {
5594 compiler->EmitEdgeCounter(); 5595 compiler->EmitEdgeCounter();
5595 } 5596 }
5596 // The deoptimization descriptor points after the edge counter code for 5597 // The deoptimization descriptor points after the edge counter code for
5597 // uniformity with ARM and MIPS, where we can reuse pattern matching 5598 // uniformity with ARM and MIPS, where we can reuse pattern matching
5598 // code that matches backwards from the end of the pattern. 5599 // code that matches backwards from the end of the pattern.
5599 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, 5600 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
5600 deopt_id_, 5601 deopt_id_,
5601 Scanner::kNoSourcePos); 5602 Scanner::kNoSourcePos);
5602 } 5603 }
5603 if (HasParallelMove()) { 5604 if (HasParallelMove()) {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
5820 PcDescriptors::kOther, 5821 PcDescriptors::kOther,
5821 locs()); 5822 locs());
5822 __ Drop(ArgumentCount()); // Discard arguments. 5823 __ Drop(ArgumentCount()); // Discard arguments.
5823 } 5824 }
5824 5825
5825 } // namespace dart 5826 } // namespace dart
5826 5827
5827 #undef __ 5828 #undef __
5828 5829
5829 #endif // defined TARGET_ARCH_X64 5830 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698