| 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 '../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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 * object. It would change the prototype chain. | 348 * object. It would change the prototype chain. |
| 349 */ | 349 */ |
| 350 static const LiteralDartString PROTO_PROPERTY = | 350 static const LiteralDartString PROTO_PROPERTY = |
| 351 const LiteralDartString("__proto__"); | 351 const LiteralDartString("__proto__"); |
| 352 | 352 |
| 353 /** The dart class implementing constant map literals. */ | 353 /** The dart class implementing constant map literals. */ |
| 354 static const String DART_CLASS = "ConstantMap"; | 354 static const String DART_CLASS = "ConstantMap"; |
| 355 static const String DART_STRING_CLASS = "ConstantStringMap"; | 355 static const String DART_STRING_CLASS = "ConstantStringMap"; |
| 356 static const String DART_PROTO_CLASS = "ConstantProtoMap"; | 356 static const String DART_PROTO_CLASS = "ConstantProtoMap"; |
| 357 static const String DART_GENERAL_CLASS = "GeneralConstantMap"; | 357 static const String DART_GENERAL_CLASS = "GeneralConstantMap"; |
| 358 static const String LENGTH_NAME = "length"; | 358 static const String LENGTH_NAME = "_length"; |
| 359 static const String JS_OBJECT_NAME = "_jsObject"; | 359 static const String JS_OBJECT_NAME = "_jsObject"; |
| 360 static const String KEYS_NAME = "_keys"; | 360 static const String KEYS_NAME = "_keys"; |
| 361 static const String PROTO_VALUE = "_protoValue"; | 361 static const String PROTO_VALUE = "_protoValue"; |
| 362 static const String JS_DATA_NAME = "_jsData"; | 362 static const String JS_DATA_NAME = "_jsData"; |
| 363 | 363 |
| 364 final ListConstantValue keyList; | 364 final ListConstantValue keyList; |
| 365 final ConstantValue protoValue; | 365 final ConstantValue protoValue; |
| 366 final bool onlyStringKeys; | 366 final bool onlyStringKeys; |
| 367 | 367 |
| 368 JavaScriptMapConstant(InterfaceType type, | 368 JavaScriptMapConstant(InterfaceType type, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 380 result.add(keyList); | 380 result.add(keyList); |
| 381 } else { | 381 } else { |
| 382 // Add the keys individually to avoid generating an unused list constant | 382 // Add the keys individually to avoid generating an unused list constant |
| 383 // for the keys. | 383 // for the keys. |
| 384 result.addAll(keys); | 384 result.addAll(keys); |
| 385 } | 385 } |
| 386 result.addAll(values); | 386 result.addAll(values); |
| 387 return result; | 387 return result; |
| 388 } | 388 } |
| 389 } | 389 } |
| OLD | NEW |