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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart

Issue 664283004: Revert "Constant fold charCodeAt via constant system" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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) 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 js_backend; 5 part of js_backend;
6 6
7 const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem(); 7 const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem();
8 8
9 class JavaScriptBitNotOperation extends BitNotOperation { 9 class JavaScriptBitNotOperation extends BitNotOperation {
10 const JavaScriptBitNotOperation(); 10 const JavaScriptBitNotOperation();
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const JavaScriptBinaryArithmeticOperation(const MultiplyOperation()); 167 const JavaScriptBinaryArithmeticOperation(const MultiplyOperation());
168 final negate = const JavaScriptNegateOperation(); 168 final negate = const JavaScriptNegateOperation();
169 final not = const NotOperation(); 169 final not = const NotOperation();
170 final shiftLeft = 170 final shiftLeft =
171 const JavaScriptBinaryBitOperation(const ShiftLeftOperation()); 171 const JavaScriptBinaryBitOperation(const ShiftLeftOperation());
172 final shiftRight = const JavaScriptShiftRightOperation(); 172 final shiftRight = const JavaScriptShiftRightOperation();
173 final subtract = 173 final subtract =
174 const JavaScriptBinaryArithmeticOperation(const SubtractOperation()); 174 const JavaScriptBinaryArithmeticOperation(const SubtractOperation());
175 final truncatingDivide = const JavaScriptBinaryArithmeticOperation( 175 final truncatingDivide = const JavaScriptBinaryArithmeticOperation(
176 const TruncatingDivideOperation()); 176 const TruncatingDivideOperation());
177 final codeUnitAt = const CodeUnitAtRuntimeOperation();
178 177
179 const JavaScriptConstantSystem(); 178 const JavaScriptConstantSystem();
180 179
181 /** 180 /**
182 * Returns true if [value] will turn into NaN or infinity 181 * Returns true if [value] will turn into NaN or infinity
183 * at runtime. 182 * at runtime.
184 */ 183 */
185 bool integerBecomesNanOrInfinity(int value) { 184 bool integerBecomesNanOrInfinity(int value) {
186 double doubleValue = value.toDouble(); 185 double doubleValue = value.toDouble();
187 return doubleValue.isNaN || doubleValue.isInfinite; 186 return doubleValue.isNaN || doubleValue.isInfinite;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 if (onlyStringKeys) { 334 if (onlyStringKeys) {
336 result.add(keyList); 335 result.add(keyList);
337 } else { 336 } else {
338 // Add the keys individually to avoid generating an unused list constant 337 // Add the keys individually to avoid generating an unused list constant
339 // for the keys. 338 // for the keys.
340 result.addAll(keys); 339 result.addAll(keys);
341 } 340 }
342 result.addAll(values); 341 result.addAll(values);
343 return result; 342 return result;
344 } 343 }
345 } 344 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698