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

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

Issue 2722753002: Remove HRuntimeType implementation (Closed)
Patch Set: Created 3 years, 10 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: 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 66888f4c1e81eb81a3e19a03f608dd48f0005b91..1d899017ec730a9359fad35331eb72b90f516a77 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -476,13 +476,6 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
_buildInitializers(constructor, constructorChain, fieldValues);
}
- HTypeConversion buildFunctionTypeConversion(
- HInstruction original, ResolutionDartType type, int kind) {
- HInstruction reifiedType = buildFunctionType(type);
- return new HTypeConversion.viaMethodOnType(
- type, kind, original.instructionType, reifiedType, original);
- }
-
/// Builds generative constructor body.
void buildConstructorBody(ir.Constructor constructor) {
openFunction();
@@ -2856,14 +2849,18 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
ResolutionDartType typeValue =
localsHandler.substInContext(astAdapter.getDartType(type));
+
if (type is ir.FunctionType) {
- List arguments = [buildFunctionType(typeValue), expression];
- _pushDynamicInvocation(node, null, arguments,
- selector: new Selector.call(
- new PrivateName('_isTest', backend.helpers.jsHelperLibrary),
- CallStructure.ONE_ARG));
- push(
- new HIs.compound(typeValue, expression, pop(), commonMasks.boolType));
+ HInstruction representation =
+ typeBuilder.analyzeTypeArgument(typeValue, sourceElement);
+ List<HInstruction> inputs = <HInstruction>[
+ expression,
+ representation,
+ ];
+ _pushStaticInvocation(
+ astAdapter.functionTypeTest, inputs, commonMasks.boolType);
+ HInstruction call = pop();
+ push(new HIs.compound(typeValue, expression, call, commonMasks.boolType));
return;
}

Powered by Google App Engine
This is Rietveld 408576698