| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 // Create a (bound) function for a String source within a context for eval. | 78 // Create a (bound) function for a String source within a context for eval. |
| 79 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( | 79 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( |
| 80 Handle<String> source, Handle<SharedFunctionInfo> outer_info, | 80 Handle<String> source, Handle<SharedFunctionInfo> outer_info, |
| 81 Handle<Context> context, LanguageMode language_mode, | 81 Handle<Context> context, LanguageMode language_mode, |
| 82 ParseRestriction restriction, int eval_scope_position, int eval_position, | 82 ParseRestriction restriction, int eval_scope_position, int eval_position, |
| 83 int line_offset = 0, int column_offset = 0, | 83 int line_offset = 0, int column_offset = 0, |
| 84 Handle<Object> script_name = Handle<Object>(), | 84 Handle<Object> script_name = Handle<Object>(), |
| 85 ScriptOriginOptions options = ScriptOriginOptions()); | 85 ScriptOriginOptions options = ScriptOriginOptions()); |
| 86 | 86 |
| 87 // Create a (bound) function for a String source within a context for eval. |
| 88 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromString( |
| 89 Handle<Context> context, Handle<String> source, |
| 90 ParseRestriction restriction); |
| 91 |
| 87 // Create a shared function info object for a String source within a context. | 92 // Create a shared function info object for a String source within a context. |
| 88 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( | 93 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( |
| 89 Handle<String> source, Handle<Object> script_name, int line_offset, | 94 Handle<String> source, Handle<Object> script_name, int line_offset, |
| 90 int column_offset, ScriptOriginOptions resource_options, | 95 int column_offset, ScriptOriginOptions resource_options, |
| 91 Handle<Object> source_map_url, Handle<Context> context, | 96 Handle<Object> source_map_url, Handle<Context> context, |
| 92 v8::Extension* extension, ScriptData** cached_data, | 97 v8::Extension* extension, ScriptData** cached_data, |
| 93 ScriptCompiler::CompileOptions compile_options, | 98 ScriptCompiler::CompileOptions compile_options, |
| 94 NativesFlag is_natives_code, bool is_module); | 99 NativesFlag is_natives_code, bool is_module); |
| 95 | 100 |
| 96 // Create a shared function info object for a Script that has already been | 101 // Create a shared function info object for a Script that has already been |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 MUST_USE_RESULT Status SetLastStatus(Status status) { | 577 MUST_USE_RESULT Status SetLastStatus(Status status) { |
| 573 last_status_ = status; | 578 last_status_ = status; |
| 574 return last_status_; | 579 return last_status_; |
| 575 } | 580 } |
| 576 }; | 581 }; |
| 577 | 582 |
| 578 } // namespace internal | 583 } // namespace internal |
| 579 } // namespace v8 | 584 } // namespace v8 |
| 580 | 585 |
| 581 #endif // V8_COMPILER_H_ | 586 #endif // V8_COMPILER_H_ |
| OLD | NEW |