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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 14018036: Remove holders for runtime type information. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type annotation. Created 7 years, 7 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 | Annotate | Revision Log
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 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 2783 matching lines...) Expand 10 before | Expand all | Expand 10 after
2794 instruction = new HIs(type, <HInstruction>[expression, call], 2794 instruction = new HIs(type, <HInstruction>[expression, call],
2795 HIs.VARIABLE_CHECK); 2795 HIs.VARIABLE_CHECK);
2796 } else if (RuntimeTypes.hasTypeArguments(type)) { 2796 } else if (RuntimeTypes.hasTypeArguments(type)) {
2797 Element element = type.element; 2797 Element element = type.element;
2798 Element helper = backend.getCheckSubtype(); 2798 Element helper = backend.getCheckSubtype();
2799 HInstruction helperCall = new HStatic(helper); 2799 HInstruction helperCall = new HStatic(helper);
2800 add(helperCall); 2800 add(helperCall);
2801 HInstruction representations = 2801 HInstruction representations =
2802 buildTypeArgumentRepresentations(type); 2802 buildTypeArgumentRepresentations(type);
2803 add(representations); 2803 add(representations);
2804 HInstruction isFieldName = 2804 String operator =
2805 addConstantString(node, backend.namer.operatorIs(element)); 2805 backend.namer.operatorIs(backend.getImplementationClass(element));
2806 HInstruction isFieldName = addConstantString(node, operator);
2806 // TODO(karlklose): use [:null:] for [asField] if [element] does not 2807 // TODO(karlklose): use [:null:] for [asField] if [element] does not
2807 // have a subclass. 2808 // have a subclass.
2808 HInstruction asFieldName = 2809 HInstruction asFieldName =
2809 addConstantString(node, backend.namer.substitutionName(element)); 2810 addConstantString(node, backend.namer.substitutionName(element));
2810 List<HInstruction> inputs = <HInstruction>[helperCall, 2811 List<HInstruction> inputs = <HInstruction>[helperCall,
2811 expression, 2812 expression,
2812 isFieldName, 2813 isFieldName,
2813 representations, 2814 representations,
2814 asFieldName]; 2815 asFieldName];
2815 HInstruction call = new HInvokeStatic(inputs, HType.BOOLEAN); 2816 HInstruction call = new HInvokeStatic(inputs, HType.BOOLEAN);
(...skipping 2461 matching lines...) Expand 10 before | Expand all | Expand 10 after
5277 new HSubGraphBlockInformation(elseBranch.graph)); 5278 new HSubGraphBlockInformation(elseBranch.graph));
5278 5279
5279 HBasicBlock conditionStartBlock = conditionBranch.block; 5280 HBasicBlock conditionStartBlock = conditionBranch.block;
5280 conditionStartBlock.setBlockFlow(info, joinBlock); 5281 conditionStartBlock.setBlockFlow(info, joinBlock);
5281 SubGraph conditionGraph = conditionBranch.graph; 5282 SubGraph conditionGraph = conditionBranch.graph;
5282 HIf branch = conditionGraph.end.last; 5283 HIf branch = conditionGraph.end.last;
5283 assert(branch is HIf); 5284 assert(branch is HIf);
5284 branch.blockInformation = conditionStartBlock.blockFlow; 5285 branch.blockInformation = conditionStartBlock.blockFlow;
5285 } 5286 }
5286 } 5287 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698