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

Side by Side Diff: pkg/compiler/lib/src/js_backend/constant_system_javascript.dart

Issue 1493693002: Make ?? a compile-time constant operator. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Move VM/analyzer parts to separate CLs. Created 4 years, 11 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/constants/expressions.dart ('k') | tests/language/const_qq_test.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) 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 library dart2js.constant_system.js; 5 library dart2js.constant_system.js;
6 6
7 import '../compiler.dart' show 7 import '../compiler.dart' show
8 Compiler; 8 Compiler;
9 import '../constants/constant_system.dart'; 9 import '../constants/constant_system.dart';
10 import '../constants/values.dart'; 10 import '../constants/values.dart';
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 final bitOr = const JavaScriptBinaryBitOperation(const BitOrOperation()); 184 final bitOr = const JavaScriptBinaryBitOperation(const BitOrOperation());
185 final bitXor = const JavaScriptBinaryBitOperation(const BitXorOperation()); 185 final bitXor = const JavaScriptBinaryBitOperation(const BitXorOperation());
186 final booleanAnd = const BooleanAndOperation(); 186 final booleanAnd = const BooleanAndOperation();
187 final booleanOr = const BooleanOrOperation(); 187 final booleanOr = const BooleanOrOperation();
188 final divide = 188 final divide =
189 const JavaScriptBinaryArithmeticOperation(const DivideOperation()); 189 const JavaScriptBinaryArithmeticOperation(const DivideOperation());
190 final equal = const EqualsOperation(); 190 final equal = const EqualsOperation();
191 final greaterEqual = const GreaterEqualOperation(); 191 final greaterEqual = const GreaterEqualOperation();
192 final greater = const GreaterOperation(); 192 final greater = const GreaterOperation();
193 final identity = const JavaScriptIdentityOperation(); 193 final identity = const JavaScriptIdentityOperation();
194 final ifNull = const IfNullOperation();
194 final lessEqual = const LessEqualOperation(); 195 final lessEqual = const LessEqualOperation();
195 final less = const LessOperation(); 196 final less = const LessOperation();
196 final modulo = 197 final modulo =
197 const JavaScriptBinaryArithmeticOperation(const ModuloOperation()); 198 const JavaScriptBinaryArithmeticOperation(const ModuloOperation());
198 final multiply = 199 final multiply =
199 const JavaScriptBinaryArithmeticOperation(const MultiplyOperation()); 200 const JavaScriptBinaryArithmeticOperation(const MultiplyOperation());
200 final negate = const JavaScriptNegateOperation(); 201 final negate = const JavaScriptNegateOperation();
201 final not = const NotOperation(); 202 final not = const NotOperation();
202 final shiftLeft = 203 final shiftLeft =
203 const JavaScriptBinaryBitOperation(const ShiftLeftOperation()); 204 const JavaScriptBinaryBitOperation(const ShiftLeftOperation());
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 result.add(keyList); 381 result.add(keyList);
381 } else { 382 } else {
382 // Add the keys individually to avoid generating an unused list constant 383 // Add the keys individually to avoid generating an unused list constant
383 // for the keys. 384 // for the keys.
384 result.addAll(keys); 385 result.addAll(keys);
385 } 386 }
386 result.addAll(values); 387 result.addAll(values);
387 return result; 388 return result;
388 } 389 }
389 } 390 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/expressions.dart ('k') | tests/language/const_qq_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698