| Index: src/compiler.h
|
| diff --git a/src/compiler.h b/src/compiler.h
|
| index 58fb16409bddc7d69210a643942a2c597d17e9c7..e3357d12cfd1120e1e55e3920bf892b7287b1037 100644
|
| --- a/src/compiler.h
|
| +++ b/src/compiler.h
|
| @@ -22,12 +22,6 @@ enum ParseRestriction {
|
| ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression.
|
| };
|
|
|
| -enum CachedDataMode {
|
| - NO_CACHED_DATA,
|
| - CONSUME_CACHED_DATA,
|
| - PRODUCE_CACHED_DATA
|
| -};
|
| -
|
| struct OffsetRange {
|
| OffsetRange(int from, int to) : from(from), to(to) {}
|
| int from;
|
| @@ -90,8 +84,8 @@ class CompilationInfo {
|
| HydrogenCodeStub* code_stub() const {return code_stub_; }
|
| v8::Extension* extension() const { return extension_; }
|
| ScriptData** cached_data() const { return cached_data_; }
|
| - CachedDataMode cached_data_mode() const {
|
| - return cached_data_mode_;
|
| + ScriptCompiler::CompileOptions compile_options() const {
|
| + return compile_options_;
|
| }
|
| Handle<Context> context() const { return context_; }
|
| BailoutId osr_ast_id() const { return osr_ast_id_; }
|
| @@ -227,9 +221,9 @@ class CompilationInfo {
|
| extension_ = extension;
|
| }
|
| void SetCachedData(ScriptData** cached_data,
|
| - CachedDataMode cached_data_mode) {
|
| - cached_data_mode_ = cached_data_mode;
|
| - if (cached_data_mode == NO_CACHED_DATA) {
|
| + ScriptCompiler::CompileOptions compile_options) {
|
| + compile_options_ = compile_options;
|
| + if (compile_options == ScriptCompiler::kNoCompileOptions) {
|
| cached_data_ = NULL;
|
| } else {
|
| ASSERT(!is_lazy());
|
| @@ -461,7 +455,7 @@ class CompilationInfo {
|
| // Fields possibly needed for eager compilation, NULL by default.
|
| v8::Extension* extension_;
|
| ScriptData** cached_data_;
|
| - CachedDataMode cached_data_mode_;
|
| + ScriptCompiler::CompileOptions compile_options_;
|
|
|
| // The context of the caller for eval code, and the global context for a
|
| // global script. Will be a null handle otherwise.
|
| @@ -692,15 +686,10 @@ class Compiler : public AllStatic {
|
|
|
| // Compile a String source within a context.
|
| static Handle<SharedFunctionInfo> CompileScript(
|
| - Handle<String> source,
|
| - Handle<Object> script_name,
|
| - int line_offset,
|
| - int column_offset,
|
| - bool is_shared_cross_origin,
|
| - Handle<Context> context,
|
| - v8::Extension* extension,
|
| - ScriptData** cached_data,
|
| - CachedDataMode cached_data_mode,
|
| + Handle<String> source, Handle<Object> script_name, int line_offset,
|
| + int column_offset, bool is_shared_cross_origin, Handle<Context> context,
|
| + v8::Extension* extension, ScriptData** cached_data,
|
| + ScriptCompiler::CompileOptions compile_options,
|
| NativesFlag is_natives_code);
|
|
|
| // Create a shared function info object (the code may be lazily compiled).
|
|
|