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

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

Issue 1109393012: Allow use of deferred type-literals in non-constant contexts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/language/language_dart2js.status » ('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) 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 abstract class HVisitor<R> { 7 abstract class HVisitor<R> {
8 R visitAdd(HAdd node); 8 R visitAdd(HAdd node);
9 R visitAwait(HAwait node); 9 R visitAwait(HAwait node);
10 R visitBitAnd(HBitAnd node); 10 R visitBitAnd(HBitAnd node);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 constants[constant] = result; 181 constants[constant] = result;
182 } else if (result.block == null) { 182 } else if (result.block == null) {
183 // The constant was not used anymore. 183 // The constant was not used anymore.
184 entry.addAtExit(result); 184 entry.addAtExit(result);
185 } 185 }
186 return result; 186 return result;
187 } 187 }
188 188
189 HConstant addDeferredConstant(ConstantValue constant, PrefixElement prefix, 189 HConstant addDeferredConstant(ConstantValue constant, PrefixElement prefix,
190 Compiler compiler) { 190 Compiler compiler) {
191 // TODO(sigurdm,johnniwinter): These deferred constants should be created
192 // by the constant evaluator.
191 ConstantValue wrapper = new DeferredConstantValue(constant, prefix); 193 ConstantValue wrapper = new DeferredConstantValue(constant, prefix);
192 compiler.deferredLoadTask.registerConstantDeferredUse(wrapper, prefix); 194 compiler.deferredLoadTask.registerConstantDeferredUse(wrapper, prefix);
193 return addConstant(wrapper, compiler); 195 return addConstant(wrapper, compiler);
194 } 196 }
195 197
196 HConstant addConstantInt(int i, Compiler compiler) { 198 HConstant addConstantInt(int i, Compiler compiler) {
197 return addConstant(compiler.backend.constantSystem.createInt(i), compiler); 199 return addConstant(compiler.backend.constantSystem.createInt(i), compiler);
198 } 200 }
199 201
200 HConstant addConstantDouble(double d, Compiler compiler) { 202 HConstant addConstantDouble(double d, Compiler compiler) {
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after
3175 class HDynamicType extends HRuntimeType { 3177 class HDynamicType extends HRuntimeType {
3176 HDynamicType(DynamicType dartType, TypeMask instructionType) 3178 HDynamicType(DynamicType dartType, TypeMask instructionType)
3177 : super(const <HInstruction>[], dartType, instructionType); 3179 : super(const <HInstruction>[], dartType, instructionType);
3178 3180
3179 accept(HVisitor visitor) => visitor.visitDynamicType(this); 3181 accept(HVisitor visitor) => visitor.visitDynamicType(this);
3180 3182
3181 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; 3183 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE;
3182 3184
3183 bool typeEquals(HInstruction other) => other is HDynamicType; 3185 bool typeEquals(HInstruction other) => other is HDynamicType;
3184 } 3186 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698