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:uri'; | 8 import 'dart:uri'; |
8 import 'dart2jslib.dart' hide SourceString; | 9 import 'dart2jslib.dart' hide SourceString; |
9 import 'elements/elements.dart'; | 10 import 'elements/elements.dart'; |
10 import 'js_backend/js_backend.dart'; | 11 import 'js_backend/js_backend.dart'; |
11 import 'resolution/resolution.dart' show ResolverVisitor; | 12 import 'resolution/resolution.dart' show ResolverVisitor; |
12 import 'scanner/scannerlib.dart'; | 13 import 'scanner/scannerlib.dart'; |
13 import 'ssa/ssa.dart'; | 14 import 'ssa/ssa.dart'; |
14 import 'tree/tree.dart'; | 15 import 'tree/tree.dart'; |
15 import 'util/util.dart'; | 16 import 'util/util.dart'; |
16 | 17 |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 } else { | 876 } else { |
876 if (parameters.parameterCount != 0) { | 877 if (parameters.parameterCount != 0) { |
877 compiler.cancel( | 878 compiler.cancel( |
878 'native "..." syntax is restricted to functions with zero parameters', | 879 'native "..." syntax is restricted to functions with zero parameters', |
879 node: nativeBody); | 880 node: nativeBody); |
880 } | 881 } |
881 LiteralString jsCode = nativeBody.asLiteralString(); | 882 LiteralString jsCode = nativeBody.asLiteralString(); |
882 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[])); | 883 builder.push(new HForeign.statement(jsCode.dartString, <HInstruction>[])); |
883 } | 884 } |
884 } | 885 } |
OLD | NEW |