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 line_offset, int column_offset = 0, | 80 ParseRestriction restriction, int eval_scope_position, int eval_position, |
| 81 int line_offset = 0, int column_offset = 0, |
81 Handle<Object> script_name = Handle<Object>(), | 82 Handle<Object> script_name = Handle<Object>(), |
82 ScriptOriginOptions options = ScriptOriginOptions()); | 83 ScriptOriginOptions options = ScriptOriginOptions()); |
83 | 84 |
84 // Create a shared function info object for a String source within a context. | 85 // Create a shared function info object for a String source within a context. |
85 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( | 86 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( |
86 Handle<String> source, Handle<Object> script_name, int line_offset, | 87 Handle<String> source, Handle<Object> script_name, int line_offset, |
87 int column_offset, ScriptOriginOptions resource_options, | 88 int column_offset, ScriptOriginOptions resource_options, |
88 Handle<Object> source_map_url, Handle<Context> context, | 89 Handle<Object> source_map_url, Handle<Context> context, |
89 v8::Extension* extension, ScriptData** cached_data, | 90 v8::Extension* extension, ScriptData** cached_data, |
90 ScriptCompiler::CompileOptions compile_options, | 91 ScriptCompiler::CompileOptions compile_options, |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 MUST_USE_RESULT Status SetLastStatus(Status status) { | 631 MUST_USE_RESULT Status SetLastStatus(Status status) { |
631 last_status_ = status; | 632 last_status_ = status; |
632 return last_status_; | 633 return last_status_; |
633 } | 634 } |
634 }; | 635 }; |
635 | 636 |
636 } // namespace internal | 637 } // namespace internal |
637 } // namespace v8 | 638 } // namespace v8 |
638 | 639 |
639 #endif // V8_COMPILER_H_ | 640 #endif // V8_COMPILER_H_ |
OLD | NEW |