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

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

Issue 2827283002: Implement subtype relation for kernel based elements. (Closed)
Patch Set: Add remaining checks of BackendUsage Created 3 years, 8 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
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 '../constant_system_dart.dart'; 7 import '../constant_system_dart.dart';
8 import '../constants/constant_system.dart'; 8 import '../constants/constant_system.dart';
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../common_elements.dart' show CommonElements; 10 import '../common_elements.dart' show CommonElements;
11 import '../elements/types.dart'; 11 import '../elements/types.dart';
12 import '../elements/resolution_types.dart' show DartTypes;
13 import '../elements/entities.dart'; 12 import '../elements/entities.dart';
14 import '../tree/dartstring.dart' show DartString, LiteralDartString; 13 import '../tree/dartstring.dart' show DartString, LiteralDartString;
15 14
16 const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem(); 15 const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem();
17 16
18 class JavaScriptBitNotOperation extends BitNotOperation { 17 class JavaScriptBitNotOperation extends BitNotOperation {
19 const JavaScriptBitNotOperation(); 18 const JavaScriptBitNotOperation();
20 19
21 ConstantValue fold(ConstantValue constant) { 20 ConstantValue fold(ConstantValue constant) {
22 if (JAVA_SCRIPT_CONSTANT_SYSTEM.isInt(constant)) { 21 if (JAVA_SCRIPT_CONSTANT_SYSTEM.isInt(constant)) {
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 result.add(keyList); 436 result.add(keyList);
438 } else { 437 } else {
439 // Add the keys individually to avoid generating an unused list constant 438 // Add the keys individually to avoid generating an unused list constant
440 // for the keys. 439 // for the keys.
441 result.addAll(keys); 440 result.addAll(keys);
442 } 441 }
443 result.addAll(values); 442 result.addAll(values);
444 return result; 443 return result;
445 } 444 }
446 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698