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

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

Issue 1755823003: Replace TypeMask.isEmpty by isEmptyOrNull, use isEmpty when it's really empty. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/nodes.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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ConstantValue constant = 128 ConstantValue constant =
129 new InterceptorConstantValue(constantInterceptor.thisType); 129 new InterceptorConstantValue(constantInterceptor.thisType);
130 return graph.addConstant(constant, compiler); 130 return graph.addConstant(constant, compiler);
131 } 131 }
132 132
133 ClassElement tryComputeConstantInterceptorFromType( 133 ClassElement tryComputeConstantInterceptorFromType(
134 TypeMask type, 134 TypeMask type,
135 Set<ClassElement> interceptedClasses) { 135 Set<ClassElement> interceptedClasses) {
136 136
137 if (type.isNullable) { 137 if (type.isNullable) {
138 if (type.isEmpty) { 138 if (type.isNull) {
139 return helpers.jsNullClass; 139 return helpers.jsNullClass;
140 } 140 }
141 } else if (type.containsOnlyInt(classWorld)) { 141 } else if (type.containsOnlyInt(classWorld)) {
142 return helpers.jsIntClass; 142 return helpers.jsIntClass;
143 } else if (type.containsOnlyDouble(classWorld)) { 143 } else if (type.containsOnlyDouble(classWorld)) {
144 return helpers.jsDoubleClass; 144 return helpers.jsDoubleClass;
145 } else if (type.containsOnlyBool(classWorld)) { 145 } else if (type.containsOnlyBool(classWorld)) {
146 return helpers.jsBoolClass; 146 return helpers.jsBoolClass;
147 } else if (type.containsOnlyString(classWorld)) { 147 } else if (type.containsOnlyString(classWorld)) {
148 return helpers.jsStringClass; 148 return helpers.jsStringClass;
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 instruction = new HInvokeDynamicMethod( 402 instruction = new HInvokeDynamicMethod(
403 selector, mask, inputs, node.instructionType, true); 403 selector, mask, inputs, node.instructionType, true);
404 } 404 }
405 405
406 HBasicBlock block = node.block; 406 HBasicBlock block = node.block;
407 block.addAfter(node, instruction); 407 block.addAfter(node, instruction);
408 block.rewrite(node, instruction); 408 block.rewrite(node, instruction);
409 return true; 409 return true;
410 } 410 }
411 } 411 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698