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 #ifndef V8_COMPILER_H_ | 5 #ifndef V8_COMPILER_H_ |
6 #define V8_COMPILER_H_ | 6 #define V8_COMPILER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bailout-reason.h" | 10 #include "src/bailout-reason.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // is left to the discretion of the compiler. | 70 // is left to the discretion of the compiler. |
71 // | 71 // |
72 // Please note this interface returns shared function infos. This means you | 72 // Please note this interface returns shared function infos. This means you |
73 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 73 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
74 // real function with a context. | 74 // real function with a context. |
75 | 75 |
76 // Create a (bound) function for a String source within a context for eval. | 76 // Create a (bound) function for a String source within a context for eval. |
77 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( | 77 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( |
78 Handle<String> source, Handle<SharedFunctionInfo> outer_info, | 78 Handle<String> source, Handle<SharedFunctionInfo> outer_info, |
79 Handle<Context> context, LanguageMode language_mode, | 79 Handle<Context> context, LanguageMode language_mode, |
80 ParseRestriction restriction, int eval_position, int line_offset = 0, | 80 ParseRestriction restriction, int line_offset, int column_offset = 0, |
81 int column_offset = 0, Handle<Object> script_name = Handle<Object>(), | 81 Handle<Object> script_name = Handle<Object>(), |
82 ScriptOriginOptions options = ScriptOriginOptions()); | 82 ScriptOriginOptions options = ScriptOriginOptions()); |
83 | 83 |
84 // Create a shared function info object for a String source within a context. | 84 // Create a shared function info object for a String source within a context. |
85 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( | 85 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( |
86 Handle<String> source, Handle<Object> script_name, int line_offset, | 86 Handle<String> source, Handle<Object> script_name, int line_offset, |
87 int column_offset, ScriptOriginOptions resource_options, | 87 int column_offset, ScriptOriginOptions resource_options, |
88 Handle<Object> source_map_url, Handle<Context> context, | 88 Handle<Object> source_map_url, Handle<Context> context, |
89 v8::Extension* extension, ScriptData** cached_data, | 89 v8::Extension* extension, ScriptData** cached_data, |
90 ScriptCompiler::CompileOptions compile_options, | 90 ScriptCompiler::CompileOptions compile_options, |
91 NativesFlag is_natives_code, bool is_module); | 91 NativesFlag is_natives_code, bool is_module); |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 OptimizedCompileJob* job_; | 649 OptimizedCompileJob* job_; |
650 base::ElapsedTimer timer_; | 650 base::ElapsedTimer timer_; |
651 base::TimeDelta* location_; | 651 base::TimeDelta* location_; |
652 }; | 652 }; |
653 }; | 653 }; |
654 | 654 |
655 } // namespace internal | 655 } // namespace internal |
656 } // namespace v8 | 656 } // namespace v8 |
657 | 657 |
658 #endif // V8_COMPILER_H_ | 658 #endif // V8_COMPILER_H_ |
OLD | NEW |