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

Side by Side Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1318043005: Support user generated custom native JS classes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: ptal Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 class SsaFunctionCompiler implements FunctionCompiler { 7 class SsaFunctionCompiler implements FunctionCompiler {
8 final SsaCodeGeneratorTask generator; 8 final SsaCodeGeneratorTask generator;
9 final SsaBuilderTask builder; 9 final SsaBuilderTask builder;
10 final SsaOptimizerTask optimizer; 10 final SsaOptimizerTask optimizer;
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 Selector selector, 1294 Selector selector,
1295 TypeMask mask, 1295 TypeMask mask,
1296 List<HInstruction> providedArguments, 1296 List<HInstruction> providedArguments,
1297 ast.Node currentNode, 1297 ast.Node currentNode,
1298 {InterfaceType instanceType}) { 1298 {InterfaceType instanceType}) {
1299 // TODO(johnniwinther): Register this on the [registry]. Currently the 1299 // TODO(johnniwinther): Register this on the [registry]. Currently the
1300 // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be 1300 // [CodegenRegistry] calls the enqueuer, but [element] should _not_ be
1301 // enqueued. 1301 // enqueued.
1302 backend.registerStaticUse(element, compiler.enqueuer.codegen); 1302 backend.registerStaticUse(element, compiler.enqueuer.codegen);
1303 1303
1304 if (element.isJsInterop && !element.isFactoryConstructor) {
1305 // We only inline factory JavaScript interop constructors.
1306 return false;
1307 }
1308
1304 // Ensure that [element] is an implementation element. 1309 // Ensure that [element] is an implementation element.
1305 element = element.implementation; 1310 element = element.implementation;
1306 1311
1307 if (compiler.elementHasCompileTimeError(element)) return false; 1312 if (compiler.elementHasCompileTimeError(element)) return false;
1308 1313
1309 FunctionElement function = element; 1314 FunctionElement function = element;
1310 bool insideLoop = loopNesting > 0 || graph.calledInLoop; 1315 bool insideLoop = loopNesting > 0 || graph.calledInLoop;
1311 1316
1312 // Bail out early if the inlining decision is in the cache and we can't 1317 // Bail out early if the inlining decision is in the cache and we can't
1313 // inline (no need to check the hard constraints). 1318 // inline (no need to check the hard constraints).
(...skipping 10 matching lines...) Expand all
1324 Elements.isStaticOrTopLevel(element) || 1329 Elements.isStaticOrTopLevel(element) ||
1325 element.isGenerativeConstructorBody, 1330 element.isGenerativeConstructorBody,
1326 message: "Missing selector for inlining of $element.")); 1331 message: "Missing selector for inlining of $element."));
1327 if (selector != null) { 1332 if (selector != null) {
1328 if (!selector.applies(function, compiler.world)) return false; 1333 if (!selector.applies(function, compiler.world)) return false;
1329 if (mask != null && !mask.canHit(function, selector, compiler.world)) { 1334 if (mask != null && !mask.canHit(function, selector, compiler.world)) {
1330 return false; 1335 return false;
1331 } 1336 }
1332 } 1337 }
1333 1338
1339 if (element.isJsInterop) return false;
1340
1334 // Don't inline operator== methods if the parameter can be null. 1341 // Don't inline operator== methods if the parameter can be null.
1335 if (element.name == '==') { 1342 if (element.name == '==') {
1336 if (element.enclosingClass != compiler.objectClass 1343 if (element.enclosingClass != compiler.objectClass
1337 && providedArguments[1].canBeNull()) { 1344 && providedArguments[1].canBeNull()) {
1338 return false; 1345 return false;
1339 } 1346 }
1340 } 1347 }
1341 1348
1342 // Generative constructors of native classes should not be called directly 1349 // Generative constructors of native classes should not be called directly
1343 // and have an extra argument that causes problems with inlining. 1350 // and have an extra argument that causes problems with inlining.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1503 sourceInformationBuilder = 1510 sourceInformationBuilder =
1504 sourceInformationBuilder.forContext(element.implementation); 1511 sourceInformationBuilder.forContext(element.implementation);
1505 sourceElementStack.add(element.declaration); 1512 sourceElementStack.add(element.declaration);
1506 var result = f(); 1513 var result = f();
1507 sourceInformationBuilder = oldSourceInformationBuilder; 1514 sourceInformationBuilder = oldSourceInformationBuilder;
1508 sourceElementStack.removeLast(); 1515 sourceElementStack.removeLast();
1509 return result; 1516 return result;
1510 }); 1517 });
1511 } 1518 }
1512 1519
1520 /**
1521 * Return null so it is simple to remove the optional parameters completely
1522 * from interop methods to match JavaScript semantics for ommitted arguments.
1523 */
1524 HInstruction handleConstantForOptionalParameterJsInterop(Element parameter) =>
1525 null;
Siggi Cherem (dart-lang) 2015/10/06 22:38:02 do we need `null`, or the null-constant object? (g
Jacob 2015/10/13 01:19:24 this is intentional and not something I'm particul
1526
1513 HInstruction handleConstantForOptionalParameter(Element parameter) { 1527 HInstruction handleConstantForOptionalParameter(Element parameter) {
1514 ConstantValue constantValue = 1528 ConstantValue constantValue =
1515 backend.constants.getConstantValueForVariable(parameter); 1529 backend.constants.getConstantValueForVariable(parameter);
1516 assert(invariant(parameter, constantValue != null, 1530 assert(invariant(parameter, constantValue != null,
1517 message: 'No constant computed for $parameter')); 1531 message: 'No constant computed for $parameter'));
1518 return graph.addConstant(constantValue, compiler); 1532 return graph.addConstant(constantValue, compiler);
1519 } 1533 }
1520 1534
1521 Element get currentNonClosureClass { 1535 Element get currentNonClosureClass {
1522 ClassElement cls = sourceElement.enclosingClass; 1536 ClassElement cls = sourceElement.enclosingClass;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 /** 1611 /**
1598 * Documentation wanted -- johnniwinther 1612 * Documentation wanted -- johnniwinther
1599 * 1613 *
1600 * Invariant: [functionElement] must be an implementation element. 1614 * Invariant: [functionElement] must be an implementation element.
1601 */ 1615 */
1602 HGraph buildMethod(FunctionElement functionElement) { 1616 HGraph buildMethod(FunctionElement functionElement) {
1603 assert(invariant(functionElement, functionElement.isImplementation)); 1617 assert(invariant(functionElement, functionElement.isImplementation));
1604 graph.calledInLoop = compiler.world.isCalledInLoop(functionElement); 1618 graph.calledInLoop = compiler.world.isCalledInLoop(functionElement);
1605 ast.FunctionExpression function = functionElement.node; 1619 ast.FunctionExpression function = functionElement.node;
1606 assert(function != null); 1620 assert(function != null);
1607 assert(!function.modifiers.isExternal);
1608 assert(elements.getFunctionDefinition(function) != null); 1621 assert(elements.getFunctionDefinition(function) != null);
1609 openFunction(functionElement, function); 1622 openFunction(functionElement, function);
1610 String name = functionElement.name; 1623 String name = functionElement.name;
1624 if (functionElement.isJsInterop) {
1625 push(invokeJsInteropFunction(functionElement, parameters.values.toList(),
1626 sourceInformationBuilder.buildGeneric(function)));
1627 var value = pop();
1628 closeAndGotoExit(new HReturn(value,
1629 sourceInformationBuilder.buildReturn(functionElement.node)));
1630 return closeFunction();
1631 } else if (function.modifiers.isExternal) {
1632 compiler.reportErrorMessage(
1633 function, MessageKind.PATCH_EXTERNAL_WITHOUT_IMPLEMENTATION);
Siggi Cherem (dart-lang) 2015/10/06 22:38:02 it would be nice to produce these errors elsewhere
Jacob 2015/10/13 01:19:24 added TODO
1634 }
1635
1611 // If [functionElement] is `operator==` we explicitely add a null check at 1636 // If [functionElement] is `operator==` we explicitely add a null check at
1612 // the beginning of the method. This is to avoid having call sites do the 1637 // the beginning of the method. This is to avoid having call sites do the
1613 // null check. 1638 // null check.
1614 if (name == '==') { 1639 if (name == '==') {
1615 if (!backend.operatorEqHandlesNullArgument(functionElement)) { 1640 if (!backend.operatorEqHandlesNullArgument(functionElement)) {
1616 handleIf( 1641 handleIf(
1617 function, 1642 function,
1618 visitCondition: () { 1643 visitCondition: () {
1619 HParameterValue parameter = parameters.values.first; 1644 HParameterValue parameter = parameters.values.first;
1620 push(new HIdentity( 1645 push(new HIdentity(
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1805 returnType = state.oldReturnType; 1830 returnType = state.oldReturnType;
1806 assert(stack.isEmpty); 1831 assert(stack.isEmpty);
1807 stack = state.oldStack; 1832 stack = state.oldStack;
1808 } 1833 }
1809 1834
1810 /** 1835 /**
1811 * Run this builder on the body of the [function] to be inlined. 1836 * Run this builder on the body of the [function] to be inlined.
1812 */ 1837 */
1813 void visitInlinedFunction(FunctionElement function) { 1838 void visitInlinedFunction(FunctionElement function) {
1814 potentiallyCheckInlinedParameterTypes(function); 1839 potentiallyCheckInlinedParameterTypes(function);
1840
1815 if (function.isGenerativeConstructor) { 1841 if (function.isGenerativeConstructor) {
1816 buildFactory(function); 1842 buildFactory(function);
1817 } else { 1843 } else {
1818 ast.FunctionExpression functionNode = function.node; 1844 ast.FunctionExpression functionNode = function.node;
1819 functionNode.body.accept(this); 1845 functionNode.body.accept(this);
1820 } 1846 }
1821 } 1847 }
1822 1848
1823 1849
1824 addInlinedInstantiation(DartType type) { 1850 addInlinedInstantiation(DartType type) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 * current constructor and super constructors or constructors redirected 2134 * current constructor and super constructors or constructors redirected
2109 * to, starting from the current constructor. 2135 * to, starting from the current constructor.
2110 * - Call the constructor bodies, starting from the constructor(s) in the 2136 * - Call the constructor bodies, starting from the constructor(s) in the
2111 * super class(es). 2137 * super class(es).
2112 */ 2138 */
2113 HGraph buildFactory(ConstructorElement functionElement) { 2139 HGraph buildFactory(ConstructorElement functionElement) {
2114 functionElement = functionElement.implementation; 2140 functionElement = functionElement.implementation;
2115 ClassElement classElement = 2141 ClassElement classElement =
2116 functionElement.enclosingClass.implementation; 2142 functionElement.enclosingClass.implementation;
2117 bool isNativeUpgradeFactory = 2143 bool isNativeUpgradeFactory =
2118 Elements.isNativeOrExtendsNative(classElement); 2144 Elements.isNativeOrExtendsNative(classElement)
2145 && !classElement.isJsInterop;
2119 ast.FunctionExpression function = functionElement.node; 2146 ast.FunctionExpression function = functionElement.node;
2120 // Note that constructors (like any other static function) do not need 2147 // Note that constructors (like any other static function) do not need
2121 // to deal with optional arguments. It is the callers job to provide all 2148 // to deal with optional arguments. It is the callers job to provide all
2122 // arguments as if they were positional. 2149 // arguments as if they were positional.
2123 2150
2124 if (inliningStack.isEmpty) { 2151 if (inliningStack.isEmpty) {
2125 // The initializer list could contain closures. 2152 // The initializer list could contain closures.
2126 openFunction(functionElement, function); 2153 openFunction(functionElement, function);
2127 } 2154 }
2128 2155
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
3918 3945
3919 HInstruction compileArgument(ast.Node argument) { 3946 HInstruction compileArgument(ast.Node argument) {
3920 visit(argument); 3947 visit(argument);
3921 return pop(); 3948 return pop();
3922 } 3949 }
3923 3950
3924 return callStructure.makeArgumentsList( 3951 return callStructure.makeArgumentsList(
3925 arguments, 3952 arguments,
3926 element, 3953 element,
3927 compileArgument, 3954 compileArgument,
3928 handleConstantForOptionalParameter); 3955 element.isJsInterop ?
3956 handleConstantForOptionalParameterJsInterop :
3957 handleConstantForOptionalParameter
3958 );
Siggi Cherem (dart-lang) 2015/10/06 22:38:02 style nit: move this back to the line above? even
Jacob 2015/10/13 01:19:24 Done.
3929 } 3959 }
3930 3960
3931 void addGenericSendArgumentsToList(Link<ast.Node> link, List<HInstruction> lis t) { 3961 void addGenericSendArgumentsToList(Link<ast.Node> link, List<HInstruction> lis t) {
3932 for (; !link.isEmpty; link = link.tail) { 3962 for (; !link.isEmpty; link = link.tail) {
3933 visit(link.head); 3963 visit(link.head);
3934 list.add(pop()); 3964 list.add(pop());
3935 } 3965 }
3936 } 3966 }
3937 3967
3938 /// Generate a dynamic method, getter or setter invocation. 3968 /// Generate a dynamic method, getter or setter invocation.
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after
5065 5095
5066 if (compiler.elementHasCompileTimeError(constructor)) { 5096 if (compiler.elementHasCompileTimeError(constructor)) {
5067 // TODO(ahe): Do something like [generateWrongArgumentCountError]. 5097 // TODO(ahe): Do something like [generateWrongArgumentCountError].
5068 stack.add(graph.addConstantNull(compiler)); 5098 stack.add(graph.addConstantNull(compiler));
5069 return; 5099 return;
5070 } 5100 }
5071 if (checkTypeVariableBounds(node, type)) return; 5101 if (checkTypeVariableBounds(node, type)) return;
5072 5102
5073 var inputs = <HInstruction>[]; 5103 var inputs = <HInstruction>[];
5074 if (constructor.isGenerativeConstructor && 5104 if (constructor.isGenerativeConstructor &&
5075 Elements.isNativeOrExtendsNative(constructor.enclosingClass)) { 5105 Elements.isNativeOrExtendsNative(constructor.enclosingClass) &&
5106 !constructor.isJsInterop) {
5076 // Native class generative constructors take a pre-constructed object. 5107 // Native class generative constructors take a pre-constructed object.
5077 inputs.add(graph.addConstantNull(compiler)); 5108 inputs.add(graph.addConstantNull(compiler));
5078 } 5109 }
5079 // TODO(5347): Try to avoid the need for calling [implementation] before 5110 // TODO(5347): Try to avoid the need for calling [implementation] before
5080 // calling [makeStaticArgumentList]. 5111 // calling [makeStaticArgumentList].
5081 constructorImplementation = constructor.implementation; 5112 constructorImplementation = constructor.implementation;
5082 if (constructorImplementation.isErroneous || 5113 if (constructorImplementation.isErroneous ||
5083 !callStructure.signatureApplies( 5114 !callStructure.signatureApplies(
5084 constructorImplementation.functionSignature)) { 5115 constructorImplementation.functionSignature)) {
5085 generateWrongArgumentCountError(send, constructor, send.arguments); 5116 generateWrongArgumentCountError(send, constructor, send.arguments);
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
5781 push( 5812 push(
5782 new HInvokeDynamicSetter(selector, mask, null, inputs, type) 5813 new HInvokeDynamicSetter(selector, mask, null, inputs, type)
5783 ..sourceInformation = sourceInformation); 5814 ..sourceInformation = sourceInformation);
5784 } else { 5815 } else {
5785 push( 5816 push(
5786 new HInvokeDynamicMethod(selector, mask, inputs, type, isIntercepted) 5817 new HInvokeDynamicMethod(selector, mask, inputs, type, isIntercepted)
5787 ..sourceInformation = sourceInformation); 5818 ..sourceInformation = sourceInformation);
5788 } 5819 }
5789 } 5820 }
5790 5821
5822 HForeignCode invokeJsInteropFunction(Element element,
5823 List<HInstruction> arguments,
5824 SourceInformation sourceInformation) {
5825 assert(element.isJsInterop);
5826 nativeEmitter.nativeMethods.add(element);
5827 String templateString;
5828
5829 if (element.isFactoryConstructor) {
5830 // Treat factory constructors as syntactic sugar for creating object
5831 // literals.
5832 ConstructorElement constructor = element;
5833 FunctionSignature params = constructor.functionSignature;
5834 int i = 0;
5835 int positions = 0;
5836 var filteredArguments = <HInstruction>[];
5837 var parameterNameMap = new Map<String, js.Expression>();
5838 params.orderedForEachParameter((ParameterElement parameter) {
5839 // TODO(jacobr): throw if parameter names do not match names of property
5840 // names in the class.
5841 assert (parameter.isNamed);
5842 if (!parameter.isNamed) {
5843 compiler.reportErrorMessage(
5844 parameter, MessageKind.GENERIC,
5845 {'text': 'Error: all arguments to external constructors of'
Siggi Cherem (dart-lang) 2015/10/06 22:38:02 nit: add trailing spaces here and below (to avoid
Jacob 2015/10/13 01:19:24 Done.
5846 'JavaScript interop classes must be named as these'
5847 'constructors are syntactic sugar for object literals'});
5848 }
5849 HInstruction argument = arguments[i];
5850 if (argument != null) {
5851 filteredArguments.add(argument);
5852 parameterNameMap[parameter.name] =
5853 new js.InterpolatedExpression(positions++);
5854 }
5855 i++;
5856 });
5857 var codeTemplate = new js.Template(null,
5858 js.objectLiteral(parameterNameMap));
5859
5860 var nativeBehavior = new native.NativeBehavior()
5861 ..codeTemplate = codeTemplate;
5862 return new HForeignCode(
5863 codeTemplate,
5864 backend.dynamicType, filteredArguments,
5865 nativeBehavior: nativeBehavior)
5866 ..sourceInformation = sourceInformation;
5867 }
5868 var target = new HForeignCode(js.js.parseForeignJS(
5869 "${backend.namer.fixedBackendPath(element)}."
5870 "${element.fixedBackendName}"),
5871 backend.dynamicType,
5872 <HInstruction>[]);
5873 add(target);
5874 // Strip off trailing arguments that were not specified.
5875 // we could assert that the trailing arguments are all null.
5876 // TODO(jacobr): rewrite named arguments to an object literal matching
5877 // the factory constructor case.
5878 arguments = arguments.where((arg) => arg != null).toList();
5879 var inputs = <HInstruction>[target]..addAll(arguments);
5880
5881 js.Template codeTemplate;
5882 if (element.isGetter) {
5883 codeTemplate = js.js.parseForeignJS("#");
5884 } else if (element.isSetter) {
5885 codeTemplate = js.js.parseForeignJS("# = #");
5886 } else {
5887 var argsStub = <String>[];
5888 for (int i = 0; i < arguments.length; i++) {
5889 argsStub.add('#');
5890 }
5891 if (element.isConstructor) {
5892 codeTemplate = js.js.parseForeignJS("new #(${argsStub.join(",")})");
5893 } else {
5894 codeTemplate = js.js.parseForeignJS("#(${argsStub.join(",")})");
5895 }
5896 }
5897
5898 var nativeBehavior = new native.NativeBehavior()
5899 ..codeTemplate = codeTemplate
5900 ..typesReturned.add(
5901 backend.jsJavaScriptObjectClass.thisType)
5902 ..typesInstantiated.add(
5903 backend.jsJavaScriptObjectClass.thisType)
5904 ..sideEffects.setAllSideEffects();
5905 return new HForeignCode(
5906 codeTemplate,
5907 backend.dynamicType, inputs,
5908 nativeBehavior: nativeBehavior)
5909 ..sourceInformation = sourceInformation;
5910 }
5911
5791 void pushInvokeStatic(ast.Node location, 5912 void pushInvokeStatic(ast.Node location,
5792 Element element, 5913 Element element,
5793 List<HInstruction> arguments, 5914 List<HInstruction> arguments,
5794 {TypeMask typeMask, 5915 {TypeMask typeMask,
5795 InterfaceType instanceType, 5916 InterfaceType instanceType,
5796 SourceInformation sourceInformation}) { 5917 SourceInformation sourceInformation}) {
5797 // TODO(johnniwinther): Use [sourceInformation] instead of [location]. 5918 // TODO(johnniwinther): Use [sourceInformation] instead of [location].
5798 if (tryInlineMethod(element, null, null, arguments, location, 5919 if (tryInlineMethod(element, null, null, arguments, location,
5799 instanceType: instanceType)) { 5920 instanceType: instanceType)) {
5800 return; 5921 return;
5801 } 5922 }
5802 5923
5803 if (typeMask == null) { 5924 if (typeMask == null) {
5804 typeMask = 5925 typeMask =
5805 TypeMaskFactory.inferredReturnTypeForElement(element, compiler); 5926 TypeMaskFactory.inferredReturnTypeForElement(element, compiler);
5806 } 5927 }
5807 bool targetCanThrow = !compiler.world.getCannotThrow(element); 5928 bool targetCanThrow = !compiler.world.getCannotThrow(element);
5808 // TODO(5346): Try to avoid the need for calling [declaration] before 5929 // TODO(5346): Try to avoid the need for calling [declaration] before
5809 // creating an [HInvokeStatic]. 5930 var instruction;
5810 HInvokeStatic instruction = new HInvokeStatic( 5931 if (element.isJsInterop) {
5811 element.declaration, arguments, typeMask, 5932 instruction = invokeJsInteropFunction(element, arguments,
5812 targetCanThrow: targetCanThrow) 5933 sourceInformation);
5813 ..sourceInformation = sourceInformation; 5934 } else {
5814 if (!currentInlinedInstantiations.isEmpty) { 5935 // creating an [HInvokeStatic].
5815 instruction.instantiatedTypes = new List<DartType>.from( 5936 instruction = new HInvokeStatic(
5816 currentInlinedInstantiations); 5937 element.declaration, arguments, typeMask,
5938 targetCanThrow: targetCanThrow)
5939 ..sourceInformation = sourceInformation;
5940 if (!currentInlinedInstantiations.isEmpty) {
5941 instruction.instantiatedTypes = new List<DartType>.from(
5942 currentInlinedInstantiations);
5943 }
5944 instruction.sideEffects = compiler.world.getSideEffectsOfElement(element);
5817 } 5945 }
5818 instruction.sideEffects = compiler.world.getSideEffectsOfElement(element);
5819 if (location == null) { 5946 if (location == null) {
5820 push(instruction); 5947 push(instruction);
5821 } else { 5948 } else {
5822 pushWithPosition(instruction, location); 5949 pushWithPosition(instruction, location);
5823 } 5950 }
5824 } 5951 }
5825 5952
5826 HInstruction buildInvokeSuper(Selector selector, 5953 HInstruction buildInvokeSuper(Selector selector,
5827 Element element, 5954 Element element,
5828 List<HInstruction> arguments, 5955 List<HInstruction> arguments,
(...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after
8991 if (unaliased is TypedefType) throw 'unable to unalias $type'; 9118 if (unaliased is TypedefType) throw 'unable to unalias $type';
8992 unaliased.accept(this, builder); 9119 unaliased.accept(this, builder);
8993 } 9120 }
8994 9121
8995 void visitDynamicType(DynamicType type, SsaBuilder builder) { 9122 void visitDynamicType(DynamicType type, SsaBuilder builder) {
8996 JavaScriptBackend backend = builder.compiler.backend; 9123 JavaScriptBackend backend = builder.compiler.backend;
8997 ClassElement cls = backend.findHelper('DynamicRuntimeType'); 9124 ClassElement cls = backend.findHelper('DynamicRuntimeType');
8998 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld))); 9125 builder.push(new HDynamicType(type, new TypeMask.exact(cls, classWorld)));
8999 } 9126 }
9000 } 9127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698