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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/bailout.dart

Issue 15988003: Fix issue 9228, by nopt doing some optimizations in checked mode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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 | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of ssa; 5 part of ssa;
6 6
7 class BailoutInfo { 7 class BailoutInfo {
8 int instructionId; 8 int instructionId;
9 int bailoutId; 9 int bailoutId;
10 BailoutInfo(this.instructionId, this.bailoutId); 10 BailoutInfo(this.instructionId, this.bailoutId);
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 // will throw [NoSuchMethodError] or [ArgumentError]. 288 // will throw [NoSuchMethodError] or [ArgumentError].
289 Selector selector = firstUser.selector; 289 Selector selector = firstUser.selector;
290 Selector receiverSelectorOnThrow = null; 290 Selector receiverSelectorOnThrow = null;
291 HInstruction receiver = firstUser.getDartReceiver(compiler); 291 HInstruction receiver = firstUser.getDartReceiver(compiler);
292 bool willThrow = false; 292 bool willThrow = false;
293 if (receiver == instruction) { 293 if (receiver == instruction) {
294 if (willThrowNoSuchMethodErrorIfNot(selector, speculativeType)) { 294 if (willThrowNoSuchMethodErrorIfNot(selector, speculativeType)) {
295 receiverSelectorOnThrow = selector; 295 receiverSelectorOnThrow = selector;
296 willThrow = true; 296 willThrow = true;
297 } 297 }
298 } else if (willThrowArgumentError(selector, receiver, speculativeType)) { 298 // We need to call the actual method in checked mode to get
299 // the right type error.
300 } else if (!compiler.enableTypeAssertions
301 && willThrowArgumentError(selector, receiver, speculativeType)) {
299 willThrow = true; 302 willThrow = true;
300 } 303 }
301 304
302 if (!willThrow) return false; 305 if (!willThrow) return false;
303 306
304 HTypeConversion check = new HTypeConversion( 307 HTypeConversion check = new HTypeConversion(
305 null, 308 null,
306 receiverSelectorOnThrow == null 309 receiverSelectorOnThrow == null
307 ? HTypeConversion.ARGUMENT_TYPE_CHECK 310 ? HTypeConversion.ARGUMENT_TYPE_CHECK
308 : HTypeConversion.RECEIVER_TYPE_CHECK, 311 : HTypeConversion.RECEIVER_TYPE_CHECK,
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 hasComplexBailoutTargets = true; 740 hasComplexBailoutTargets = true;
738 } 741 }
739 } else { 742 } else {
740 hasComplexBailoutTargets = true; 743 hasComplexBailoutTargets = true;
741 blocks.forEach((HBasicBlock block) { 744 blocks.forEach((HBasicBlock block) {
742 block.bailoutTargets.add(target); 745 block.bailoutTargets.add(target);
743 }); 746 });
744 } 747 }
745 } 748 }
746 } 749 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698