| 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 #import('../../lib/uri/uri.dart'); | 6 #import('../../lib/uri/uri.dart'); |
| 7 #import('leg.dart'); | 7 #import('leg.dart'); |
| 8 #import('elements/elements.dart'); | 8 #import('elements/elements.dart'); |
| 9 #import('scanner/scannerlib.dart'); | 9 #import('scanner/scannerlib.dart'); |
| 10 #import('ssa/ssa.dart'); | 10 #import('ssa/ssa.dart'); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 addSubtypes(classElement, emitter); | 52 addSubtypes(classElement, emitter); |
| 53 } | 53 } |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 if (hasNativeClass) { | 56 if (hasNativeClass) { |
| 57 compiler.registerStaticUse(compiler.findHelper( | 57 compiler.registerStaticUse(compiler.findHelper( |
| 58 const SourceString('dynamicFunction'))); | 58 const SourceString('dynamicFunction'))); |
| 59 compiler.registerStaticUse(compiler.findHelper( | 59 compiler.registerStaticUse(compiler.findHelper( |
| 60 const SourceString('dynamicSetMetadata'))); | 60 const SourceString('dynamicSetMetadata'))); |
| 61 compiler.registerStaticUse(compiler.findHelper( | 61 compiler.registerStaticUse(compiler.findHelper( |
| 62 const SourceString('dynamicIsCheck'))); | 62 const SourceString('defineProperty'))); |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 | 65 |
| 66 void maybeEnableNative(Compiler compiler, | 66 void maybeEnableNative(Compiler compiler, |
| 67 LibraryElement library, | 67 LibraryElement library, |
| 68 Uri uri) { | 68 Uri uri) { |
| 69 String libraryName = uri.toString(); | 69 String libraryName = uri.toString(); |
| 70 if (library.script.name.contains('dart/frog/tests/native/src') | 70 if (library.script.name.contains('dart/frog/tests/native/src') |
| 71 || libraryName == 'dart:dom' | 71 || libraryName == 'dart:dom' |
| 72 || libraryName == 'dart:isolate' | 72 || libraryName == 'dart:isolate' |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 const LiteralDartString('void'), | 340 const LiteralDartString('void'), |
| 341 <HInstruction>[jsClosure])); | 341 <HInstruction>[jsClosure])); |
| 342 } | 342 } |
| 343 }); | 343 }); |
| 344 LiteralString jsCode = node.arguments.head; | 344 LiteralString jsCode = node.arguments.head; |
| 345 builder.push(new HForeign(jsCode.dartString, | 345 builder.push(new HForeign(jsCode.dartString, |
| 346 const LiteralDartString('Object'), | 346 const LiteralDartString('Object'), |
| 347 <HInstruction>[])); | 347 <HInstruction>[])); |
| 348 } | 348 } |
| 349 } | 349 } |
| OLD | NEW |