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

Unified Diff: pkg/compiler/lib/src/ssa/builder.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.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 1b44c1d95d22937bcf4378d2bca0ca41bcbcabfe..e6ae55ecbb57ac243cadf4ada9ec879bec921f36 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -301,13 +301,6 @@ class SsaBuilder extends ast.Visitor
add(attachPosition(instruction, node));
}
- HTypeConversion buildFunctionTypeConversion(
- HInstruction original, ResolutionDartType type, int kind) {
- HInstruction reifiedType = buildFunctionType(type);
- return new HTypeConversion.viaMethodOnType(
- type, kind, original.instructionType, reifiedType, original);
- }
-
/**
* Returns a complete argument list for a call of [function].
*/
@@ -2414,14 +2407,16 @@ class SsaBuilder extends ast.Visitor
HInstruction call = pop();
return new HIs.compound(type, expression, call, commonMasks.boolType);
} else if (type.isFunctionType) {
- List arguments = [buildFunctionType(type), expression];
- pushInvokeDynamic(
- node,
- new Selector.call(new PrivateName('_isTest', helpers.jsHelperLibrary),
- CallStructure.ONE_ARG),
- null,
- arguments);
- return new HIs.compound(type, expression, pop(), commonMasks.boolType);
+ HInstruction representation =
+ typeBuilder.analyzeTypeArgument(type, sourceElement);
+ List<HInstruction> inputs = <HInstruction>[
+ expression,
+ representation,
+ ];
+ pushInvokeStatic(node, helpers.functionTypeTest, inputs,
+ typeMask: commonMasks.boolType);
+ HInstruction call = pop();
+ return new HIs.compound(type, expression, call, commonMasks.boolType);
} else if (type.isTypeVariable) {
HInstruction runtimeType =
typeBuilder.addTypeVariableReference(type, sourceElement);

Powered by Google App Engine
This is Rietveld 408576698