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

Side by Side Diff: src/parsing/parse-info.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_PARSING_PARSE_INFO_H_ 5 #ifndef V8_PARSING_PARSE_INFO_H_
6 #define V8_PARSING_PARSE_INFO_H_ 6 #define V8_PARSING_PARSE_INFO_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/handles.h" 10 #include "src/handles.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 int start_position() const { return start_position_; } 144 int start_position() const { return start_position_; }
145 void set_start_position(int start_position) { 145 void set_start_position(int start_position) {
146 start_position_ = start_position; 146 start_position_ = start_position;
147 } 147 }
148 148
149 int end_position() const { return end_position_; } 149 int end_position() const { return end_position_; }
150 void set_end_position(int end_position) { end_position_ = end_position; } 150 void set_end_position(int end_position) { end_position_ = end_position; }
151 151
152 int parameters_end_pos() const { return parameters_end_pos_; }
153 void set_parameters_end_pos(int parameters_end_pos) {
154 parameters_end_pos_ = parameters_end_pos;
155 }
156
152 int function_literal_id() const { return function_literal_id_; } 157 int function_literal_id() const { return function_literal_id_; }
153 void set_function_literal_id(int function_literal_id) { 158 void set_function_literal_id(int function_literal_id) {
154 function_literal_id_ = function_literal_id; 159 function_literal_id_ = function_literal_id;
155 } 160 }
156 161
157 // Getters for individual compiler hints. 162 // Getters for individual compiler hints.
158 bool is_declaration() const; 163 bool is_declaration() const;
159 bool requires_class_field_init() const; 164 bool requires_class_field_init() const;
160 bool is_class_field_initializer() const; 165 bool is_class_field_initializer() const;
161 FunctionKind function_kind() const; 166 FunctionKind function_kind() const;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 v8::Extension* extension_; 233 v8::Extension* extension_;
229 ScriptCompiler::CompileOptions compile_options_; 234 ScriptCompiler::CompileOptions compile_options_;
230 DeclarationScope* script_scope_; 235 DeclarationScope* script_scope_;
231 DeclarationScope* asm_function_scope_; 236 DeclarationScope* asm_function_scope_;
232 UnicodeCache* unicode_cache_; 237 UnicodeCache* unicode_cache_;
233 uintptr_t stack_limit_; 238 uintptr_t stack_limit_;
234 uint32_t hash_seed_; 239 uint32_t hash_seed_;
235 int compiler_hints_; 240 int compiler_hints_;
236 int start_position_; 241 int start_position_;
237 int end_position_; 242 int end_position_;
243 int parameters_end_pos_;
238 int function_literal_id_; 244 int function_literal_id_;
239 245
240 // TODO(titzer): Move handles and isolate out of ParseInfo. 246 // TODO(titzer): Move handles and isolate out of ParseInfo.
241 Isolate* isolate_; 247 Isolate* isolate_;
242 Handle<SharedFunctionInfo> shared_; 248 Handle<SharedFunctionInfo> shared_;
243 Handle<Script> script_; 249 Handle<Script> script_;
244 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; 250 MaybeHandle<ScopeInfo> maybe_outer_scope_info_;
245 251
246 //----------- Inputs+Outputs of parsing and scope analysis ----------------- 252 //----------- Inputs+Outputs of parsing and scope analysis -----------------
247 ScriptData** cached_data_; // used if available, populated if requested. 253 ScriptData** cached_data_; // used if available, populated if requested.
248 AstValueFactory* ast_value_factory_; // used if available, otherwise new. 254 AstValueFactory* ast_value_factory_; // used if available, otherwise new.
249 const AstRawString* function_name_; 255 const AstRawString* function_name_;
250 256
251 //----------- Output of parsing and scope analysis ------------------------ 257 //----------- Output of parsing and scope analysis ------------------------
252 FunctionLiteral* literal_; 258 FunctionLiteral* literal_;
253 259
254 void SetFlag(Flag f) { flags_ |= f; } 260 void SetFlag(Flag f) { flags_ |= f; }
255 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } 261 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; }
256 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } 262 bool GetFlag(Flag f) const { return (flags_ & f) != 0; }
257 }; 263 };
258 264
259 } // namespace internal 265 } // namespace internal
260 } // namespace v8 266 } // namespace v8
261 267
262 #endif // V8_PARSING_PARSE_INFO_H_ 268 #endif // V8_PARSING_PARSE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698