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

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

Issue 1408043002: Move native and js interop properties from the element model to the JS backend (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 1 month 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 * This phase simplifies interceptors in multiple ways: 8 * This phase simplifies interceptors in multiple ways:
9 * 9 *
10 * 1) If the interceptor is for an object whose type is known, it 10 * 1) If the interceptor is for an object whose type is known, it
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // interceptor directly. 160 // interceptor directly.
161 161
162 // TODO(sra): Key DOM classes like Node, Element and Event are not leaf 162 // TODO(sra): Key DOM classes like Node, Element and Event are not leaf
163 // classes. When the receiver type is not a leaf class, we might still be 163 // classes. When the receiver type is not a leaf class, we might still be
164 // able to use the receiver class as a constant interceptor. It is 164 // able to use the receiver class as a constant interceptor. It is
165 // usually the case that methods defined on a non-leaf class don't test 165 // usually the case that methods defined on a non-leaf class don't test
166 // for a subclass or call methods defined on a subclass. Provided the 166 // for a subclass or call methods defined on a subclass. Provided the
167 // code is completely insensitive to the specific instance subclasses, we 167 // code is completely insensitive to the specific instance subclasses, we
168 // can use the non-leaf class directly. 168 // can use the non-leaf class directly.
169 ClassElement element = type.singleClass(classWorld); 169 ClassElement element = type.singleClass(classWorld);
170 if (element != null && element.isNative) { 170 if (element != null && backend.isNative(element)) {
171 return element; 171 return element;
172 } 172 }
173 } 173 }
174 174
175 return null; 175 return null;
176 } 176 }
177 177
178 HInstruction findDominator(Iterable<HInstruction> instructions) { 178 HInstruction findDominator(Iterable<HInstruction> instructions) {
179 HInstruction result; 179 HInstruction result;
180 L1: for (HInstruction candidate in instructions) { 180 L1: for (HInstruction candidate in instructions) {
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 instruction = new HInvokeDynamicMethod( 403 instruction = new HInvokeDynamicMethod(
404 selector, mask, inputs, node.instructionType, true); 404 selector, mask, inputs, node.instructionType, true);
405 } 405 }
406 406
407 HBasicBlock block = node.block; 407 HBasicBlock block = node.block;
408 block.addAfter(node, instruction); 408 block.addAfter(node, instruction);
409 block.rewrite(node, instruction); 409 block.rewrite(node, instruction);
410 return true; 410 return true;
411 } 411 }
412 } 412 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/codegen.dart ('k') | pkg/compiler/lib/src/ssa/optimize.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698