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

Side by Side Diff: runtime/vm/intermediate_language_ia32.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_arm64.cc ('k') | runtime/vm/intermediate_language_mips.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) 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_IA32. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32.
6 #if defined(TARGET_ARCH_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 6722 matching lines...) Expand 10 before | Expand all | Expand 10 after
6733 } 6733 }
6734 6734
6735 6735
6736 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6736 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6737 if (!compiler->CanFallThroughTo(normal_entry())) { 6737 if (!compiler->CanFallThroughTo(normal_entry())) {
6738 __ jmp(compiler->GetJumpLabel(normal_entry())); 6738 __ jmp(compiler->GetJumpLabel(normal_entry()));
6739 } 6739 }
6740 } 6740 }
6741 6741
6742 6742
6743 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6744 __ Bind(compiler->GetJumpLabel(this));
6745 if (!compiler->is_optimizing()) {
6746 if (compiler->NeedsEdgeCounter(this)) {
6747 compiler->EmitEdgeCounter();
6748 }
6749 // The deoptimization descriptor points after the edge counter code for
6750 // uniformity with ARM and MIPS, where we can reuse pattern matching
6751 // code that matches backwards from the end of the pattern.
6752 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
6753 deopt_id_,
6754 Scanner::kNoSourcePos);
6755 }
6756 if (HasParallelMove()) {
6757 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
6758 }
6759 }
6760
6761
6762 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, 6743 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate,
6763 bool opt) const { 6744 bool opt) const {
6764 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); 6745 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall);
6765 } 6746 }
6766 6747
6767 6748
6768 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 6749 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
6769 if (!compiler->is_optimizing()) { 6750 if (!compiler->is_optimizing()) {
6770 if (FLAG_emit_edge_counters) { 6751 if (FLAG_emit_edge_counters) {
6771 compiler->EmitEdgeCounter(); 6752 compiler->EmitEdgeCounter();
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
7051 __ movl(EDX, Immediate(kInvalidObjectPointer)); 7032 __ movl(EDX, Immediate(kInvalidObjectPointer));
7052 __ movl(EDX, Immediate(kInvalidObjectPointer)); 7033 __ movl(EDX, Immediate(kInvalidObjectPointer));
7053 #endif 7034 #endif
7054 } 7035 }
7055 7036
7056 } // namespace dart 7037 } // namespace dart
7057 7038
7058 #undef __ 7039 #undef __
7059 7040
7060 #endif // defined TARGET_ARCH_IA32 7041 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm64.cc ('k') | runtime/vm/intermediate_language_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698