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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 2497313003: Fix HTypeConversion.checkedInput (Closed)
Patch Set: Add some comments Created 4 years, 1 month 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 2b6ff2c03032d97b2cd8630c5d18a249f2f112bf..42107128c2c139bd740e41673fb0054a65c9cc5c 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -300,21 +300,9 @@ class SsaBuilder extends ast.Visitor
HTypeConversion buildFunctionTypeConversion(
HInstruction original, DartType type, int kind) {
- String name =
- kind == HTypeConversion.CAST_TYPE_CHECK ? '_asCheck' : '_assertCheck';
-
- List<HInstruction> arguments = <HInstruction>[
- buildFunctionType(type),
- original
- ];
- pushInvokeDynamic(
- null,
- new Selector.call(
- new Name(name, helpers.jsHelperLibrary), CallStructure.ONE_ARG),
- null,
- arguments);
-
- return new HTypeConversion(type, kind, original.instructionType, pop());
+ HInstruction reifiedType = buildFunctionType(type);
+ return new HTypeConversion.viaMethodOnType(
+ type, kind, original.instructionType, reifiedType, original);
}
/**
@@ -3470,12 +3458,8 @@ class SsaBuilder extends ast.Visitor
TypeMask elementType = computeType(constructor);
if (isFixedListConstructorCall) {
if (!inputs[0].isNumber(compiler)) {
- HTypeConversion conversion = new HTypeConversion(
- null,
- HTypeConversion.ARGUMENT_TYPE_CHECK,
- backend.numType,
- inputs[0],
- null);
+ HTypeConversion conversion = new HTypeConversion(null,
+ HTypeConversion.ARGUMENT_TYPE_CHECK, backend.numType, inputs[0]);
add(conversion);
inputs[0] = conversion;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698