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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.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 | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/codegen.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_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 6a5ee2c5238237761ab0cfd6ee5b5d8cedddf340..6bc8a4189ed8dd71c8e7e9fae8a1a7cf9e6d4825 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -308,18 +308,9 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
HTypeConversion buildFunctionTypeConversion(
HInstruction original, DartType type, int kind) {
- String name =
- kind == HTypeConversion.CAST_TYPE_CHECK ? '_asCheck' : '_assertCheck';
-
- List<HInstruction> arguments = <HInstruction>[
- buildFunctionType(type),
- original
- ];
- _pushDynamicInvocation(null, null, arguments,
- selector: new Selector.call(
- new Name(name, astAdapter.jsHelperLibrary), CallStructure.ONE_ARG));
-
- return new HTypeConversion(type, kind, original.instructionType, pop());
+ HInstruction reifiedType = buildFunctionType(type);
+ return new HTypeConversion.viaMethodOnType(
+ type, kind, original.instructionType, reifiedType, original);
}
/// Builds a SSA graph for [procedure].
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698