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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ir/ir_pickler.dart

Issue 256453004: Avoid inlining constants that are used via a deferred import. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use intermediate constants. Created 6 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) 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 library dart2js.ir_pickler; 5 library dart2js.ir_pickler;
6 6
7 import 'ir_nodes.dart' as ir; 7 import 'ir_nodes.dart' as ir;
8 import '../dart2jslib.dart' show 8 import '../dart2jslib.dart' show
9 Constant, FalseConstant, TrueConstant, IntConstant, DoubleConstant, 9 Constant, FalseConstant, TrueConstant, IntConstant, DoubleConstant,
10 StringConstant, NullConstant, ListConstant, MapConstant, 10 StringConstant, NullConstant, ListConstant, MapConstant,
11 InterceptorConstant, DummyConstant, FunctionConstant, TypeConstant, 11 InterceptorConstant, DummyConstant, FunctionConstant, TypeConstant,
12 ConstructedConstant, 12 ConstructedConstant, DeferredConstant,
13 ConstantVisitor, ConstantSystem, 13 ConstantVisitor, ConstantSystem,
14 Compiler, NO_LOCATION_SPANNABLE; 14 Compiler, NO_LOCATION_SPANNABLE;
15 import 'dart:typed_data' show ByteData, Endianness, Uint8List; 15 import 'dart:typed_data' show ByteData, Endianness, Uint8List;
16 import 'dart:convert' show UTF8; 16 import 'dart:convert' show UTF8;
17 import '../tree/tree.dart' as ast show 17 import '../tree/tree.dart' as ast show
18 DartString, LiteralDartString, RawSourceDartString, EscapedSourceDartString, 18 DartString, LiteralDartString, RawSourceDartString, EscapedSourceDartString,
19 ConsDartString; 19 ConsDartString;
20 import '../elements/elements.dart' show 20 import '../elements/elements.dart' show
21 Element, LibraryElement, FunctionElement; 21 Element, LibraryElement, FunctionElement;
22 import '../universe/universe.dart' show Selector, TypedSelector, SelectorKind; 22 import '../universe/universe.dart' show Selector, TypedSelector, SelectorKind;
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 pickler.writeConstNull(); 449 pickler.writeConstNull();
450 } 450 }
451 451
452 void visitList(ListConstant constant) => abort(constant); 452 void visitList(ListConstant constant) => abort(constant);
453 void visitMap(MapConstant constant) => abort(constant); 453 void visitMap(MapConstant constant) => abort(constant);
454 void visitInterceptor(InterceptorConstant constant) => abort(constant); 454 void visitInterceptor(InterceptorConstant constant) => abort(constant);
455 void visitDummy(DummyConstant constant) => abort(constant); 455 void visitDummy(DummyConstant constant) => abort(constant);
456 void visitFunction(FunctionConstant constant) => abort(constant); 456 void visitFunction(FunctionConstant constant) => abort(constant);
457 void visitType(TypeConstant constant) => abort(constant); 457 void visitType(TypeConstant constant) => abort(constant);
458 void visitConstructed(ConstructedConstant constant) => abort(constant); 458 void visitConstructed(ConstructedConstant constant) => abort(constant);
459 void visitDeferred(DeferredConstant constant) => abort(constant);
459 460
460 void abort(Constant value) => throw "Can not pickle constant $value"; 461 void abort(Constant value) => throw "Can not pickle constant $value";
461 } 462 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698