Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: include/v8.h

Issue 376223002: Refactor ScriptData class for cached compile data. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/preparse-data.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 CachedData* cached_data; 1080 CachedData* cached_data;
1081 }; 1081 };
1082 1082
1083 enum CompileOptions { 1083 enum CompileOptions {
1084 kNoCompileOptions, 1084 kNoCompileOptions,
1085 kProduceDataToCache = 1 << 0 1085 kProduceDataToCache = 1 << 0
1086 }; 1086 };
1087 1087
1088 /** 1088 /**
1089 * Compiles the specified script (context-independent). 1089 * Compiles the specified script (context-independent).
1090 * 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.
1092 *
1093 * 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
1095 * produced by the same version of V8.
1090 * 1096 *
1091 * \param source Script source code. 1097 * \param source Script source code.
1092 * \return Compiled script object (context independent; for running it must be 1098 * \return Compiled script object (context independent; for running it must be
1093 * bound to a context). 1099 * bound to a context).
1094 */ 1100 */
1095 static Local<UnboundScript> CompileUnbound( 1101 static Local<UnboundScript> CompileUnbound(
1096 Isolate* isolate, Source* source, 1102 Isolate* isolate, Source* source,
1097 CompileOptions options = kNoCompileOptions); 1103 CompileOptions options = kNoCompileOptions);
1098 1104
1099 /** 1105 /**
(...skipping 5640 matching lines...) Expand 10 before | Expand all | Expand 10 after
6740 */ 6746 */
6741 6747
6742 6748
6743 } // namespace v8 6749 } // namespace v8
6744 6750
6745 6751
6746 #undef TYPE_CHECK 6752 #undef TYPE_CHECK
6747 6753
6748 6754
6749 #endif // V8_H_ 6755 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/preparse-data.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698