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

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

Issue 565643002: Refactor emitting of deoptimization descriptors for calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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"
(...skipping 5592 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 } 5603 }
5604 5604
5605 5605
5606 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5606 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5607 if (!compiler->CanFallThroughTo(normal_entry())) { 5607 if (!compiler->CanFallThroughTo(normal_entry())) {
5608 __ jmp(compiler->GetJumpLabel(normal_entry())); 5608 __ jmp(compiler->GetJumpLabel(normal_entry()));
5609 } 5609 }
5610 } 5610 }
5611 5611
5612 5612
5613 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5614 __ Bind(compiler->GetJumpLabel(this));
5615 if (!compiler->is_optimizing()) {
5616 if (compiler->NeedsEdgeCounter(this)) {
5617 compiler->EmitEdgeCounter();
5618 }
5619 // The deoptimization descriptor points after the edge counter code for
5620 // uniformity with ARM and MIPS, where we can reuse pattern matching
5621 // code that matches backwards from the end of the pattern.
5622 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
5623 deopt_id_,
5624 Scanner::kNoSourcePos);
5625 }
5626 if (HasParallelMove()) {
5627 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
5628 }
5629 }
5630
5631
5632 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, 5613 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate,
5633 bool opt) const { 5614 bool opt) const {
5634 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); 5615 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall);
5635 } 5616 }
5636 5617
5637 5618
5638 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5619 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5639 if (!compiler->is_optimizing()) { 5620 if (!compiler->is_optimizing()) {
5640 if (FLAG_emit_edge_counters) { 5621 if (FLAG_emit_edge_counters) {
5641 compiler->EmitEdgeCounter(); 5622 compiler->EmitEdgeCounter();
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
5858 __ movq(R10, Immediate(kInvalidObjectPointer)); 5839 __ movq(R10, Immediate(kInvalidObjectPointer));
5859 __ movq(RBX, Immediate(kInvalidObjectPointer)); 5840 __ movq(RBX, Immediate(kInvalidObjectPointer));
5860 #endif 5841 #endif
5861 } 5842 }
5862 5843
5863 } // namespace dart 5844 } // namespace dart
5864 5845
5865 #undef __ 5846 #undef __
5866 5847
5867 #endif // defined TARGET_ARCH_X64 5848 #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