| OLD | NEW |
| 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 '../constants/constant_system.dart'; | 7 import '../constants/constant_system.dart'; |
| 8 import '../constants/values.dart'; | 8 import '../constants/values.dart'; |
| 9 import '../constant_system_dart.dart'; | 9 import '../constant_system_dart.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 | 247 |
| 248 NumConstantValue createInt32(int i) => new IntConstantValue(i & BITS32); | 248 NumConstantValue createInt32(int i) => new IntConstantValue(i & BITS32); |
| 249 NumConstantValue createDouble(double d) | 249 NumConstantValue createDouble(double d) |
| 250 => convertToJavaScriptConstant(new DoubleConstantValue(d)); | 250 => convertToJavaScriptConstant(new DoubleConstantValue(d)); |
| 251 StringConstantValue createString(DartString string) { | 251 StringConstantValue createString(DartString string) { |
| 252 return new StringConstantValue(string); | 252 return new StringConstantValue(string); |
| 253 } | 253 } |
| 254 BoolConstantValue createBool(bool value) => new BoolConstantValue(value); | 254 BoolConstantValue createBool(bool value) => new BoolConstantValue(value); |
| 255 NullConstantValue createNull() => new NullConstantValue(); | 255 NullConstantValue createNull() => new NullConstantValue(); |
| 256 | 256 |
| 257 | |
| 258 @override | 257 @override |
| 259 ListConstantValue createList(InterfaceType type, | 258 ListConstantValue createList(InterfaceType type, |
| 260 List<ConstantValue> values) { | 259 List<ConstantValue> values) { |
| 261 return new ListConstantValue(type, values); | 260 return new ListConstantValue(type, values); |
| 262 } | 261 } |
| 263 | 262 |
| 264 @override | 263 @override |
| 265 ConstantValue createType(Compiler compiler, DartType type) { | 264 ConstantValue createType(Compiler compiler, DartType type) { |
| 266 return new TypeConstantValue( | 265 return new TypeConstantValue( |
| 267 type, compiler.backend.typeImplementation.computeType(compiler)); | 266 type, compiler.backend.typeImplementation.computeType(compiler)); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 result.add(keyList); | 373 result.add(keyList); |
| 375 } else { | 374 } else { |
| 376 // Add the keys individually to avoid generating an unused list constant | 375 // Add the keys individually to avoid generating an unused list constant |
| 377 // for the keys. | 376 // for the keys. |
| 378 result.addAll(keys); | 377 result.addAll(keys); |
| 379 } | 378 } |
| 380 result.addAll(values); | 379 result.addAll(values); |
| 381 return result; | 380 return result; |
| 382 } | 381 } |
| 383 } | 382 } |
| OLD | NEW |