| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import '../compiler.dart' show Compiler; | 5 import '../compiler.dart' show Compiler; |
| 6 import '../dart_types.dart'; | 6 import '../dart_types.dart'; |
| 7 import '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../js/js.dart' as jsAst; | 8 import '../js/js.dart' as jsAst; |
| 9 import '../js/js.dart' show js; | 9 import '../js/js.dart' show js; |
| 10 import '../ssa/codegen.dart' show SsaCodeGenerator; | 10 import '../ssa/codegen.dart' show SsaCodeGenerator; |
| 11 import '../ssa/nodes.dart' show HTypeConversion, HInstruction; | 11 import '../ssa/nodes.dart' show HTypeConversion; |
| 12 import '../universe/call_structure.dart' show CallStructure; | 12 import '../universe/call_structure.dart' show CallStructure; |
| 13 import '../universe/use.dart' | 13 import '../universe/use.dart' show StaticUse; |
| 14 show DynamicUse, StaticUse, StaticUseKind, TypeUse, TypeUseKind; | |
| 15 import 'backend.dart'; | 14 import 'backend.dart'; |
| 16 | 15 |
| 17 class CheckedModeHelper { | 16 class CheckedModeHelper { |
| 18 final String name; | 17 final String name; |
| 19 | 18 |
| 20 const CheckedModeHelper(String this.name); | 19 const CheckedModeHelper(String this.name); |
| 21 | 20 |
| 22 StaticUse getStaticUse(Compiler compiler) { | 21 StaticUse getStaticUse(Compiler compiler) { |
| 23 JavaScriptBackend backend = compiler.backend; | 22 JavaScriptBackend backend = compiler.backend; |
| 24 return new StaticUse.staticInvoke( | 23 return new StaticUse.staticInvoke( |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 DartType type = node.typeExpression; | 130 DartType type = node.typeExpression; |
| 132 Element element = type.element; | 131 Element element = type.element; |
| 133 jsAst.Name isField = codegen.backend.namer.operatorIs(element); | 132 jsAst.Name isField = codegen.backend.namer.operatorIs(element); |
| 134 arguments.add(js.quoteName(isField)); | 133 arguments.add(js.quoteName(isField)); |
| 135 codegen.use(node.typeRepresentation); | 134 codegen.use(node.typeRepresentation); |
| 136 arguments.add(codegen.pop()); | 135 arguments.add(codegen.pop()); |
| 137 jsAst.Name asField = codegen.backend.namer.substitutionName(element); | 136 jsAst.Name asField = codegen.backend.namer.substitutionName(element); |
| 138 arguments.add(js.quoteName(asField)); | 137 arguments.add(js.quoteName(asField)); |
| 139 } | 138 } |
| 140 } | 139 } |
| OLD | NEW |