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

Side by Side Diff: runtime/vm/intermediate_language_arm.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.cc ('k') | runtime/vm/intermediate_language_arm64.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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 7031 matching lines...) Expand 10 before | Expand all | Expand 10 after
7042 } 7042 }
7043 7043
7044 7044
7045 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 7045 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
7046 if (!compiler->CanFallThroughTo(normal_entry())) { 7046 if (!compiler->CanFallThroughTo(normal_entry())) {
7047 __ b(compiler->GetJumpLabel(normal_entry())); 7047 __ b(compiler->GetJumpLabel(normal_entry()));
7048 } 7048 }
7049 } 7049 }
7050 7050
7051 7051
7052 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
7053 __ Bind(compiler->GetJumpLabel(this));
7054 if (!compiler->is_optimizing()) {
7055 if (compiler->NeedsEdgeCounter(this)) {
7056 compiler->EmitEdgeCounter();
7057 }
7058 // Add an edge counter.
7059 // On ARM the deoptimization descriptor points after the edge counter
7060 // code so that we can reuse the same pattern matching code as at call
7061 // sites, which matches backwards from the end of the pattern.
7062 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
7063 deopt_id_,
7064 Scanner::kNoSourcePos);
7065 }
7066 if (HasParallelMove()) {
7067 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
7068 }
7069 }
7070
7071
7072 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, 7052 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate,
7073 bool opt) const { 7053 bool opt) const {
7074 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); 7054 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall);
7075 } 7055 }
7076 7056
7077 7057
7078 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 7058 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
7079 if (!compiler->is_optimizing()) { 7059 if (!compiler->is_optimizing()) {
7080 if (FLAG_emit_edge_counters) { 7060 if (FLAG_emit_edge_counters) {
7081 compiler->EmitEdgeCounter(); 7061 compiler->EmitEdgeCounter();
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
7249 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 7229 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
7250 #if defined(DEBUG) 7230 #if defined(DEBUG)
7251 __ LoadImmediate(R4, kInvalidObjectPointer); 7231 __ LoadImmediate(R4, kInvalidObjectPointer);
7252 __ LoadImmediate(R5, kInvalidObjectPointer); 7232 __ LoadImmediate(R5, kInvalidObjectPointer);
7253 #endif 7233 #endif
7254 } 7234 }
7255 7235
7256 } // namespace dart 7236 } // namespace dart
7257 7237
7258 #endif // defined TARGET_ARCH_ARM 7238 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698