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

Side by Side Diff: runtime/vm/intermediate_language_arm64.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_arm.cc ('k') | runtime/vm/intermediate_language_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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64.
6 #if defined(TARGET_ARCH_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 5228 matching lines...) Expand 10 before | Expand all | Expand 10 after
5239 } 5239 }
5240 5240
5241 5241
5242 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5242 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5243 if (!compiler->CanFallThroughTo(normal_entry())) { 5243 if (!compiler->CanFallThroughTo(normal_entry())) {
5244 __ b(compiler->GetJumpLabel(normal_entry())); 5244 __ b(compiler->GetJumpLabel(normal_entry()));
5245 } 5245 }
5246 } 5246 }
5247 5247
5248 5248
5249 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5250 __ Bind(compiler->GetJumpLabel(this));
5251 if (!compiler->is_optimizing()) {
5252 if (compiler->NeedsEdgeCounter(this)) {
5253 compiler->EmitEdgeCounter();
5254 }
5255 // Add an edge counter.
5256 // On ARM64 the deoptimization descriptor points after the edge counter
5257 // code so that we can reuse the same pattern matching code as at call
5258 // sites, which matches backwards from the end of the pattern.
5259 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt,
5260 deopt_id_,
5261 Scanner::kNoSourcePos);
5262 }
5263 if (HasParallelMove()) {
5264 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
5265 }
5266 }
5267
5268
5269 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate, 5249 LocationSummary* GotoInstr::MakeLocationSummary(Isolate* isolate,
5270 bool opt) const { 5250 bool opt) const {
5271 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall); 5251 return new(isolate) LocationSummary(isolate, 0, 0, LocationSummary::kNoCall);
5272 } 5252 }
5273 5253
5274 5254
5275 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 5255 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
5276 if (!compiler->is_optimizing()) { 5256 if (!compiler->is_optimizing()) {
5277 if (FLAG_emit_edge_counters) { 5257 if (FLAG_emit_edge_counters) {
5278 compiler->EmitEdgeCounter(); 5258 compiler->EmitEdgeCounter();
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
5440 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs()); 5420 compiler->GenerateCall(token_pos(), &label, stub_kind_, locs());
5441 #if defined(DEBUG) 5421 #if defined(DEBUG)
5442 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP); 5422 __ LoadImmediate(R4, kInvalidObjectPointer, kNoPP);
5443 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP); 5423 __ LoadImmediate(R5, kInvalidObjectPointer, kNoPP);
5444 #endif 5424 #endif
5445 } 5425 }
5446 5426
5447 } // namespace dart 5427 } // namespace dart
5448 5428
5449 #endif // defined TARGET_ARCH_ARM64 5429 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_arm.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698