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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.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, 7 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (revision 23244)
+++ sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart (working copy)
@@ -100,6 +100,10 @@
HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
Compiler compiler) {
if (instruction.inputs[1].isMutableIndexable(compiler)) {
+ if (!instruction.inputs[2].isInteger() && compiler.enableTypeAssertions) {
+ // We want the right checked mode error.
+ return null;
+ }
return new HIndexAssign(instruction.inputs[1],
instruction.inputs[2],
instruction.inputs[3],
@@ -130,6 +134,10 @@
HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
Compiler compiler) {
if (instruction.inputs[1].isIndexable(compiler)) {
+ if (!instruction.inputs[2].isInteger() && compiler.enableTypeAssertions) {
+ // We want the right checked mode error.
+ return null;
+ }
HInstruction index = new HIndex(
instruction.inputs[1], instruction.inputs[2], instruction.selector);
index.instructionType =

Powered by Google App Engine
This is Rietveld 408576698