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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 MUST_USE_RESULT Status SetLastStatus(Status status) { | 623 MUST_USE_RESULT Status SetLastStatus(Status status) { |
624 last_status_ = status; | 624 last_status_ = status; |
625 return last_status_; | 625 return last_status_; |
626 } | 626 } |
627 }; | 627 }; |
628 | 628 |
629 } // namespace internal | 629 } // namespace internal |
630 } // namespace v8 | 630 } // namespace v8 |
631 | 631 |
632 #endif // V8_COMPILER_H_ | 632 #endif // V8_COMPILER_H_ |
OLD | NEW |