OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 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. |
| 4 |
| 5 #library('vm'); |
| 6 #import('node.dart'); |
| 7 |
| 8 class vm native "require('vm')" { |
| 9 static void runInThisContext(String code, [String filename]) native; |
| 10 static void runInNewContext(String code, [var sandbox, String filename]) |
| 11 native; |
| 12 static Script createScript(String code, [String filename]) native; |
| 13 static Context createContext([sandbox]) native; |
| 14 static runInContext(String code, Context context, [String filename]) native; |
| 15 } |
| 16 |
| 17 interface Context {} |
| 18 |
| 19 class Script native "vm.Script" { |
| 20 void runInThisContext() native; |
| 21 void runInNewContext([Map sandbox]) native; |
| 22 } |
| 23 |
OLD | NEW |