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

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

Issue 12457034: Ensure that all goto instructions have deoptimization target. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Delete UNREACHABLE Created 7 years, 8 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_ia32.cc ('k') | runtime/vm/isolate.h » ('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_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 "lib/error.h" 10 #include "lib/error.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 } 327 }
328 328
329 329
330 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler, 330 static void EmitEqualityAsInstanceCall(FlowGraphCompiler* compiler,
331 intptr_t deopt_id, 331 intptr_t deopt_id,
332 intptr_t token_pos, 332 intptr_t token_pos,
333 Token::Kind kind, 333 Token::Kind kind,
334 LocationSummary* locs, 334 LocationSummary* locs,
335 const ICData& original_ic_data) { 335 const ICData& original_ic_data) {
336 if (!compiler->is_optimizing()) { 336 if (!compiler->is_optimizing()) {
337 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 337 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
338 deopt_id, 338 deopt_id,
339 token_pos); 339 token_pos);
340 } 340 }
341 const int kNumberOfArguments = 2; 341 const int kNumberOfArguments = 2;
342 const Array& kNoArgumentNames = Array::Handle(); 342 const Array& kNoArgumentNames = Array::Handle();
343 const int kNumArgumentsChecked = 2; 343 const int kNumArgumentsChecked = 2;
344 344
345 const Immediate& raw_null = 345 const Immediate& raw_null =
346 Immediate(reinterpret_cast<intptr_t>(Object::null())); 346 Immediate(reinterpret_cast<intptr_t>(Object::null()));
347 Label check_identity; 347 Label check_identity;
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 Array::Handle(), // No named arguments. 836 Array::Handle(), // No named arguments.
837 deopt, // Deoptimize target. 837 deopt, // Deoptimize target.
838 deopt_id(), 838 deopt_id(),
839 token_pos(), 839 token_pos(),
840 locs()); 840 locs());
841 return; 841 return;
842 } 842 }
843 const String& function_name = 843 const String& function_name =
844 String::ZoneHandle(Symbols::New(Token::Str(kind()))); 844 String::ZoneHandle(Symbols::New(Token::Str(kind())));
845 if (!compiler->is_optimizing()) { 845 if (!compiler->is_optimizing()) {
846 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 846 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
847 deopt_id(), 847 deopt_id(),
848 token_pos()); 848 token_pos());
849 } 849 }
850 const intptr_t kNumArguments = 2; 850 const intptr_t kNumArguments = 2;
851 const intptr_t kNumArgsChecked = 2; // Type-feedback. 851 const intptr_t kNumArgsChecked = 2; // Type-feedback.
852 ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw()); 852 ICData& relational_ic_data = ICData::ZoneHandle(ic_data()->raw());
853 if (compiler->is_optimizing() && FLAG_propagate_ic_data) { 853 if (compiler->is_optimizing() && FLAG_propagate_ic_data) {
854 ASSERT(!ic_data()->IsNull()); 854 ASSERT(!ic_data()->IsNull());
855 if (ic_data()->NumberOfChecks() == 0) { 855 if (ic_data()->NumberOfChecks() == 0) {
856 // IC call for reoptimization populates original ICData. 856 // IC call for reoptimization populates original ICData.
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3073 3073
3074 LocationSummary* GotoInstr::MakeLocationSummary() const { 3074 LocationSummary* GotoInstr::MakeLocationSummary() const {
3075 return new LocationSummary(0, 0, LocationSummary::kNoCall); 3075 return new LocationSummary(0, 0, LocationSummary::kNoCall);
3076 } 3076 }
3077 3077
3078 3078
3079 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 3079 void GotoInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
3080 // Add deoptimization descriptor for deoptimizing instructions 3080 // Add deoptimization descriptor for deoptimizing instructions
3081 // that may be inserted before this instruction. 3081 // that may be inserted before this instruction.
3082 if (!compiler->is_optimizing()) { 3082 if (!compiler->is_optimizing()) {
3083 compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore, 3083 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
3084 GetDeoptId(), 3084 GetDeoptId(),
3085 0); // No token position. 3085 0); // No token position.
3086 } 3086 }
3087 3087
3088 if (HasParallelMove()) { 3088 if (HasParallelMove()) {
3089 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move()); 3089 compiler->parallel_move_resolver()->EmitNativeCode(parallel_move());
3090 } 3090 }
3091 3091
3092 // We can fall through if the successor is the next block in the list. 3092 // We can fall through if the successor is the next block in the list.
3093 // Otherwise, we need a jump. 3093 // Otherwise, we need a jump.
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
3357 PcDescriptors::kOther, 3357 PcDescriptors::kOther,
3358 locs()); 3358 locs());
3359 __ Drop(2); // Discard type arguments and receiver. 3359 __ Drop(2); // Discard type arguments and receiver.
3360 } 3360 }
3361 3361
3362 } // namespace dart 3362 } // namespace dart
3363 3363
3364 #undef __ 3364 #undef __
3365 3365
3366 #endif // defined TARGET_ARCH_X64 3366 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698