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

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

Issue 2984183002: dart2js-kernel: Recognize some List constructors. (Closed)
Patch Set: Created 3 years, 4 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
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import '../closure.dart' show ClosureDataLookup; 5 import '../closure.dart' show ClosureDataLookup;
6 import '../constants/constant_system.dart'; 6 import '../constants/constant_system.dart';
7 import '../common/codegen.dart' show CodegenRegistry; 7 import '../common/codegen.dart' show CodegenRegistry;
8 import '../common_elements.dart'; 8 import '../common_elements.dart';
9 import '../compiler.dart'; 9 import '../compiler.dart';
10 import '../deferred_load.dart'; 10 import '../deferred_load.dart';
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 MemberEntity get sourceElement; 245 MemberEntity get sourceElement;
246 246
247 // TODO(karlklose): this is needed to avoid a bug where the resolved type is 247 // TODO(karlklose): this is needed to avoid a bug where the resolved type is
248 // not stored on a type annotation in the closure translator. Remove when 248 // not stored on a type annotation in the closure translator. Remove when
249 // fixed. 249 // fixed.
250 bool hasDirectLocal(Local local) { 250 bool hasDirectLocal(Local local) {
251 return !localsHandler.isAccessedDirectly(local) || 251 return !localsHandler.isAccessedDirectly(local) ||
252 localsHandler.directLocals[local] != null; 252 localsHandler.directLocals[local] != null;
253 } 253 }
254 254
255 HLiteralList buildLiteralList(List<HInstruction> inputs) {
256 return new HLiteralList(inputs, commonMasks.extendableArrayType);
257 }
258
255 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type, 259 HInstruction callSetRuntimeTypeInfoWithTypeArguments(InterfaceType type,
256 List<HInstruction> rtiInputs, HInstruction newObject) { 260 List<HInstruction> rtiInputs, HInstruction newObject) {
257 if (!rtiNeed.classNeedsRti(type.element)) { 261 if (!rtiNeed.classNeedsRti(type.element)) {
258 return newObject; 262 return newObject;
259 } 263 }
260 264
261 HInstruction typeInfo = new HTypeInfoExpression( 265 HInstruction typeInfo = new HTypeInfoExpression(
262 TypeInfoExpressionKind.INSTANCE, 266 TypeInfoExpressionKind.INSTANCE,
263 closedWorld.elementEnvironment.getThisType(type.element), 267 closedWorld.elementEnvironment.getThisType(type.element),
264 rtiInputs, 268 rtiInputs,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 return mirrorsData.mustRetainMetadata; 301 return mirrorsData.mustRetainMetadata;
298 case 'USE_CONTENT_SECURITY_POLICY': 302 case 'USE_CONTENT_SECURITY_POLICY':
299 return options.useContentSecurityPolicy; 303 return options.useContentSecurityPolicy;
300 case 'IS_FULL_EMITTER': 304 case 'IS_FULL_EMITTER':
301 return !USE_LAZY_EMITTER && !options.useStartupEmitter; 305 return !USE_LAZY_EMITTER && !options.useStartupEmitter;
302 default: 306 default:
303 return null; 307 return null;
304 } 308 }
305 } 309 }
306 } 310 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698