OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 * | 1314 * |
1315 * This is an experimental feature. | 1315 * This is an experimental feature. |
1316 * | 1316 * |
1317 * TODO(adamk): Script is likely the wrong return value for this; | 1317 * TODO(adamk): Script is likely the wrong return value for this; |
1318 * should return some new Module type. | 1318 * should return some new Module type. |
1319 */ | 1319 */ |
1320 static Local<Script> CompileModule( | 1320 static Local<Script> CompileModule( |
1321 Isolate* isolate, Source* source, | 1321 Isolate* isolate, Source* source, |
1322 CompileOptions options = kNoCompileOptions); | 1322 CompileOptions options = kNoCompileOptions); |
1323 | 1323 |
| 1324 /** |
| 1325 * Compile a function for a given context. This is equivalent to running |
| 1326 * |
| 1327 * with (obj) { |
| 1328 * return function() { ... } |
| 1329 * } |
| 1330 * |
| 1331 * It is possible to specify multiple context extensions (obj in the above |
| 1332 * example). |
| 1333 */ |
| 1334 static Local<Function> CompileFunctionInContext( |
| 1335 Isolate* isolate, Source* source, Local<Context> context, |
| 1336 size_t context_extension_count, Local<Object> context_extensions[]); |
| 1337 |
1324 private: | 1338 private: |
1325 static Local<UnboundScript> CompileUnboundInternal(Isolate* isolate, | 1339 static Local<UnboundScript> CompileUnboundInternal(Isolate* isolate, |
1326 Source* source, | 1340 Source* source, |
1327 CompileOptions options, | 1341 CompileOptions options, |
1328 bool is_module); | 1342 bool is_module); |
1329 }; | 1343 }; |
1330 | 1344 |
1331 | 1345 |
1332 /** | 1346 /** |
1333 * An error message. | 1347 * An error message. |
(...skipping 6186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7520 */ | 7534 */ |
7521 | 7535 |
7522 | 7536 |
7523 } // namespace v8 | 7537 } // namespace v8 |
7524 | 7538 |
7525 | 7539 |
7526 #undef TYPE_CHECK | 7540 #undef TYPE_CHECK |
7527 | 7541 |
7528 | 7542 |
7529 #endif // V8_H_ | 7543 #endif // V8_H_ |
OLD | NEW |