| 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 native; | 5 library native; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 import 'dart2jslib.dart'; | 8 import 'dart2jslib.dart'; |
| 9 import 'dart_types.dart'; | 9 import 'dart_types.dart'; |
| 10 import 'elements/elements.dart'; | 10 import 'elements/elements.dart'; |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 518 Iterable matches = unusedClasses.where(predicate); | 518 Iterable matches = unusedClasses.where(predicate); |
| 519 matches.toList().forEach((c) => enqueueClass(c, cause)); | 519 matches.toList().forEach((c) => enqueueClass(c, cause)); |
| 520 } | 520 } |
| 521 | 521 |
| 522 onFirstNativeClass() { | 522 onFirstNativeClass() { |
| 523 staticUse(name) { | 523 staticUse(name) { |
| 524 backend.enqueue( | 524 backend.enqueue( |
| 525 world, backend.findHelper(name), compiler.globalDependencies); | 525 world, backend.findHelper(name), compiler.globalDependencies); |
| 526 } | 526 } |
| 527 | 527 |
| 528 staticUse('dynamicFunction'); | |
| 529 staticUse('dynamicSetMetadata'); | |
| 530 staticUse('defineProperty'); | 528 staticUse('defineProperty'); |
| 531 staticUse('toStringForNativeObject'); | 529 staticUse('toStringForNativeObject'); |
| 532 staticUse('hashCodeForNativeObject'); | 530 staticUse('hashCodeForNativeObject'); |
| 533 staticUse('convertDartClosureToJS'); | 531 staticUse('convertDartClosureToJS'); |
| 534 addNativeExceptions(); | 532 addNativeExceptions(); |
| 535 } | 533 } |
| 536 | 534 |
| 537 addNativeExceptions() { | 535 addNativeExceptions() { |
| 538 enqueueUnusedClassesMatching((classElement) { | 536 enqueueUnusedClassesMatching((classElement) { |
| 539 // TODO(sra): Annotate exception classes in dart:html. | 537 // TODO(sra): Annotate exception classes in dart:html. |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 LiteralString jsCode = nativeBody.asLiteralString(); | 1187 LiteralString jsCode = nativeBody.asLiteralString(); |
| 1190 builder.push(new HForeign.statement( | 1188 builder.push(new HForeign.statement( |
| 1191 js.js.statementTemplateYielding( | 1189 js.js.statementTemplateYielding( |
| 1192 new js.LiteralStatement(jsCode.dartString.slowToString())), | 1190 new js.LiteralStatement(jsCode.dartString.slowToString())), |
| 1193 <HInstruction>[], | 1191 <HInstruction>[], |
| 1194 new SideEffects(), | 1192 new SideEffects(), |
| 1195 null, | 1193 null, |
| 1196 backend.dynamicType)); | 1194 backend.dynamicType)); |
| 1197 } | 1195 } |
| 1198 } | 1196 } |
| OLD | NEW |