| 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 <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // is left to the discretion of the compiler. | 91 // is left to the discretion of the compiler. |
| 92 // | 92 // |
| 93 // Please note this interface returns shared function infos. This means you | 93 // Please note this interface returns shared function infos. This means you |
| 94 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a | 94 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a |
| 95 // real function with a context. | 95 // real function with a context. |
| 96 | 96 |
| 97 // Create a (bound) function for a String source within a context for eval. | 97 // Create a (bound) function for a String source within a context for eval. |
| 98 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( | 98 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( |
| 99 Handle<String> source, Handle<SharedFunctionInfo> outer_info, | 99 Handle<String> source, Handle<SharedFunctionInfo> outer_info, |
| 100 Handle<Context> context, LanguageMode language_mode, | 100 Handle<Context> context, LanguageMode language_mode, |
| 101 ParseRestriction restriction, int eval_scope_position, int eval_position, | 101 ParseRestriction restriction, int parameters_end_pos, |
| 102 int line_offset = 0, int column_offset = 0, | 102 int eval_scope_position, int eval_position, int line_offset = 0, |
| 103 Handle<Object> script_name = Handle<Object>(), | 103 int column_offset = 0, Handle<Object> script_name = Handle<Object>(), |
| 104 ScriptOriginOptions options = ScriptOriginOptions()); | 104 ScriptOriginOptions options = ScriptOriginOptions()); |
| 105 | 105 |
| 106 // Create a (bound) function for a String source within a context for eval. | 106 // Create a (bound) function for a String source within a context for eval. |
| 107 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromString( | 107 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromString( |
| 108 Handle<Context> context, Handle<String> source, | 108 Handle<Context> context, Handle<String> source, |
| 109 ParseRestriction restriction); | 109 ParseRestriction restriction, int parameters_end_pos); |
| 110 | 110 |
| 111 // Create a shared function info object for a String source within a context. | 111 // Create a shared function info object for a String source within a context. |
| 112 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( | 112 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( |
| 113 Handle<String> source, Handle<Object> script_name, int line_offset, | 113 Handle<String> source, Handle<Object> script_name, int line_offset, |
| 114 int column_offset, ScriptOriginOptions resource_options, | 114 int column_offset, ScriptOriginOptions resource_options, |
| 115 Handle<Object> source_map_url, Handle<Context> context, | 115 Handle<Object> source_map_url, Handle<Context> context, |
| 116 v8::Extension* extension, ScriptData** cached_data, | 116 v8::Extension* extension, ScriptData** cached_data, |
| 117 ScriptCompiler::CompileOptions compile_options, | 117 ScriptCompiler::CompileOptions compile_options, |
| 118 NativesFlag is_natives_code); | 118 NativesFlag is_natives_code); |
| 119 | 119 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 state_ = State::kFailed; | 233 state_ = State::kFailed; |
| 234 } | 234 } |
| 235 return status; | 235 return status; |
| 236 } | 236 } |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } // namespace internal | 239 } // namespace internal |
| 240 } // namespace v8 | 240 } // namespace v8 |
| 241 | 241 |
| 242 #endif // V8_COMPILER_H_ | 242 #endif // V8_COMPILER_H_ |
| OLD | NEW |