Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: src/compiler.h

Issue 2156303002: Implement new Function.prototype.toString and fix CreateDynamicFunction parsing (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // is left to the discretion of the compiler. 82 // is left to the discretion of the compiler.
83 // 83 //
84 // Please note this interface returns shared function infos. This means you 84 // Please note this interface returns shared function infos. This means you
85 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a 85 // need to call Factory::NewFunctionFromSharedFunctionInfo before you have a
86 // real function with a context. 86 // real function with a context.
87 87
88 // Create a (bound) function for a String source within a context for eval. 88 // Create a (bound) function for a String source within a context for eval.
89 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval( 89 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromEval(
90 Handle<String> source, Handle<SharedFunctionInfo> outer_info, 90 Handle<String> source, Handle<SharedFunctionInfo> outer_info,
91 Handle<Context> context, LanguageMode language_mode, 91 Handle<Context> context, LanguageMode language_mode,
92 ParseRestriction restriction, int eval_scope_position, int eval_position, 92 ParseRestriction restriction, int parameters_end_pos,
93 int line_offset = 0, int column_offset = 0, 93 int eval_scope_position, int eval_position, int line_offset = 0,
94 Handle<Object> script_name = Handle<Object>(), 94 int column_offset = 0, Handle<Object> script_name = Handle<Object>(),
95 ScriptOriginOptions options = ScriptOriginOptions()); 95 ScriptOriginOptions options = ScriptOriginOptions());
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> GetFunctionFromString( 98 MUST_USE_RESULT static MaybeHandle<JSFunction> GetFunctionFromString(
99 Handle<Context> context, Handle<String> source, 99 Handle<Context> context, Handle<String> source,
100 ParseRestriction restriction); 100 ParseRestriction restriction, int parameters_end_pos);
101 101
102 // Create a shared function info object for a String source within a context. 102 // Create a shared function info object for a String source within a context.
103 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript( 103 static Handle<SharedFunctionInfo> GetSharedFunctionInfoForScript(
104 Handle<String> source, Handle<Object> script_name, int line_offset, 104 Handle<String> source, Handle<Object> script_name, int line_offset,
105 int column_offset, ScriptOriginOptions resource_options, 105 int column_offset, ScriptOriginOptions resource_options,
106 Handle<Object> source_map_url, Handle<Context> context, 106 Handle<Object> source_map_url, Handle<Context> context,
107 v8::Extension* extension, ScriptData** cached_data, 107 v8::Extension* extension, ScriptData** cached_data,
108 ScriptCompiler::CompileOptions compile_options, 108 ScriptCompiler::CompileOptions compile_options,
109 NativesFlag is_natives_code, bool is_module); 109 NativesFlag is_natives_code, bool is_module);
110 110
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 state_ = State::kFailed; 221 state_ = State::kFailed;
222 } 222 }
223 return status; 223 return status;
224 } 224 }
225 }; 225 };
226 226
227 } // namespace internal 227 } // namespace internal
228 } // namespace v8 228 } // namespace v8
229 229
230 #endif // V8_COMPILER_H_ 230 #endif // V8_COMPILER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698