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

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: 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 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2787 instruction = new HIs(type, <HInstruction>[expression, call], 2787 instruction = new HIs(type, <HInstruction>[expression, call],
2788 HIs.VARIABLE_CHECK); 2788 HIs.VARIABLE_CHECK);
2789 } else if (RuntimeTypes.hasTypeArguments(type)) { 2789 } else if (RuntimeTypes.hasTypeArguments(type)) {
2790 Element element = type.element; 2790 Element element = type.element;
2791 Element helper = backend.getCheckSubtype(); 2791 Element helper = backend.getCheckSubtype();
2792 HInstruction helperCall = new HStatic(helper); 2792 HInstruction helperCall = new HStatic(helper);
2793 add(helperCall); 2793 add(helperCall);
2794 HInstruction representations = 2794 HInstruction representations =
2795 buildTypeArgumentRepresentations(type); 2795 buildTypeArgumentRepresentations(type);
2796 add(representations); 2796 add(representations);
2797 HInstruction isFieldName = 2797 String operator =
2798 addConstantString(node, backend.namer.operatorIs(element)); 2798 backend.namer.operatorIs(backend.getImplementationClass(element));
2799 HInstruction isFieldName = addConstantString(node, operator);
2799 // TODO(karlklose): use [:null:] for [asField] if [element] does not 2800 // TODO(karlklose): use [:null:] for [asField] if [element] does not
2800 // have a subclass. 2801 // have a subclass.
2801 HInstruction asFieldName = 2802 HInstruction asFieldName =
2802 addConstantString(node, backend.namer.substitutionName(element)); 2803 addConstantString(node, backend.namer.substitutionName(element));
2803 List<HInstruction> inputs = <HInstruction>[helperCall, 2804 List<HInstruction> inputs = <HInstruction>[helperCall,
2804 expression, 2805 expression,
2805 isFieldName, 2806 isFieldName,
2806 representations, 2807 representations,
2807 asFieldName]; 2808 asFieldName];
2808 HInstruction call = new HInvokeStatic(inputs, HType.BOOLEAN); 2809 HInstruction call = new HInvokeStatic(inputs, HType.BOOLEAN);
(...skipping 2439 matching lines...) Expand 10 before | Expand all | Expand 10 after
5248 new HSubGraphBlockInformation(elseBranch.graph)); 5249 new HSubGraphBlockInformation(elseBranch.graph));
5249 5250
5250 HBasicBlock conditionStartBlock = conditionBranch.block; 5251 HBasicBlock conditionStartBlock = conditionBranch.block;
5251 conditionStartBlock.setBlockFlow(info, joinBlock); 5252 conditionStartBlock.setBlockFlow(info, joinBlock);
5252 SubGraph conditionGraph = conditionBranch.graph; 5253 SubGraph conditionGraph = conditionBranch.graph;
5253 HIf branch = conditionGraph.end.last; 5254 HIf branch = conditionGraph.end.last;
5254 assert(branch is HIf); 5255 assert(branch is HIf);
5255 branch.blockInformation = conditionStartBlock.blockFlow; 5256 branch.blockInformation = conditionStartBlock.blockFlow;
5256 } 5257 }
5257 } 5258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698