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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1067 Source& operator=(const Source&); | 1067 Source& operator=(const Source&); |
1068 | 1068 |
1069 Local<String> source_string; | 1069 Local<String> source_string; |
1070 | 1070 |
1071 // Origin information | 1071 // Origin information |
1072 Handle<Value> resource_name; | 1072 Handle<Value> resource_name; |
1073 Handle<Integer> resource_line_offset; | 1073 Handle<Integer> resource_line_offset; |
1074 Handle<Integer> resource_column_offset; | 1074 Handle<Integer> resource_column_offset; |
1075 Handle<Boolean> resource_is_shared_cross_origin; | 1075 Handle<Boolean> resource_is_shared_cross_origin; |
1076 | 1076 |
1077 // Cached data from previous compilation (if any), or generated during | 1077 // Cached data from previous compilation (if a kConsume*Cache flag is |
1078 // compilation (if the generate_cached_data flag is passed to | 1078 // set), or hold newly generated cache data (kProduce*Cache flags) are |
1079 // ScriptCompiler). | 1079 // set when calling a compile method. |
1080 CachedData* cached_data; | 1080 CachedData* cached_data; |
1081 }; | 1081 }; |
1082 | 1082 |
1083 enum CompileOptions { | 1083 enum CompileOptions { |
1084 kNoCompileOptions, | 1084 kNoCompileOptions = 0, |
1085 kProduceDataToCache = 1 << 0 | 1085 kProduceParserCache, |
| 1086 kConsumeParserCache, |
| 1087 kProduceCodeCache, |
| 1088 kConsumeCodeCache, |
| 1089 |
| 1090 // Support the previous API for a transition period. |
| 1091 kProduceDataToCache |
1086 }; | 1092 }; |
1087 | 1093 |
1088 /** | 1094 /** |
1089 * Compiles the specified script (context-independent). | 1095 * Compiles the specified script (context-independent). |
1090 * Cached data as part of the source object can be optionally produced to be | 1096 * Cached data as part of the source object can be optionally produced to be |
1091 * consumed later to speed up compilation of identical source scripts. | 1097 * consumed later to speed up compilation of identical source scripts. |
1092 * | 1098 * |
1093 * Note that when producing cached data, the source must point to NULL for | 1099 * Note that when producing cached data, the source must point to NULL for |
1094 * cached data. When consuming cached data, the cached data must have been | 1100 * cached data. When consuming cached data, the cached data must have been |
1095 * produced by the same version of V8. | 1101 * produced by the same version of V8. |
(...skipping 5626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6722 */ | 6728 */ |
6723 | 6729 |
6724 | 6730 |
6725 } // namespace v8 | 6731 } // namespace v8 |
6726 | 6732 |
6727 | 6733 |
6728 #undef TYPE_CHECK | 6734 #undef TYPE_CHECK |
6729 | 6735 |
6730 | 6736 |
6731 #endif // V8_H_ | 6737 #endif // V8_H_ |
OLD | NEW |