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

Side by Side Diff: src/parsing/parse-info.h

Issue 2578433002: Revert of Store SharedFunctionInfos of a Script in a FixedArray indexed by their ID (Closed)
Patch Set: 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
« no previous file with comments | « src/objects-inl.h ('k') | src/parsing/parse-info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 function_literal_id() const { return function_literal_id_; } 152 int function_literal_id() const { return function_literal_id_; }
153 void set_function_literal_id(int function_literal_id) { 153 void set_function_literal_id(int function_literal_id) {
154 function_literal_id_ = function_literal_id; 154 function_literal_id_ = function_literal_id;
155 } 155 }
156 156
157 int max_function_literal_id() const { return max_function_literal_id_; }
158 void set_max_function_literal_id(int max_function_literal_id) {
159 max_function_literal_id_ = max_function_literal_id;
160 }
161
162 // Getters for individual compiler hints. 157 // Getters for individual compiler hints.
163 bool is_declaration() const; 158 bool is_declaration() const;
164 bool requires_class_field_init() const; 159 bool requires_class_field_init() const;
165 bool is_class_field_initializer() const; 160 bool is_class_field_initializer() const;
166 FunctionKind function_kind() const; 161 FunctionKind function_kind() const;
167 162
168 //-------------------------------------------------------------------------- 163 //--------------------------------------------------------------------------
169 // TODO(titzer): these should not be part of ParseInfo. 164 // TODO(titzer): these should not be part of ParseInfo.
170 //-------------------------------------------------------------------------- 165 //--------------------------------------------------------------------------
171 Isolate* isolate() const { return isolate_; } 166 Isolate* isolate() const { return isolate_; }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 ScriptCompiler::CompileOptions compile_options_; 229 ScriptCompiler::CompileOptions compile_options_;
235 DeclarationScope* script_scope_; 230 DeclarationScope* script_scope_;
236 DeclarationScope* asm_function_scope_; 231 DeclarationScope* asm_function_scope_;
237 UnicodeCache* unicode_cache_; 232 UnicodeCache* unicode_cache_;
238 uintptr_t stack_limit_; 233 uintptr_t stack_limit_;
239 uint32_t hash_seed_; 234 uint32_t hash_seed_;
240 int compiler_hints_; 235 int compiler_hints_;
241 int start_position_; 236 int start_position_;
242 int end_position_; 237 int end_position_;
243 int function_literal_id_; 238 int function_literal_id_;
244 int max_function_literal_id_;
245 239
246 // TODO(titzer): Move handles and isolate out of ParseInfo. 240 // TODO(titzer): Move handles and isolate out of ParseInfo.
247 Isolate* isolate_; 241 Isolate* isolate_;
248 Handle<SharedFunctionInfo> shared_; 242 Handle<SharedFunctionInfo> shared_;
249 Handle<Script> script_; 243 Handle<Script> script_;
250 MaybeHandle<ScopeInfo> maybe_outer_scope_info_; 244 MaybeHandle<ScopeInfo> maybe_outer_scope_info_;
251 245
252 //----------- Inputs+Outputs of parsing and scope analysis ----------------- 246 //----------- Inputs+Outputs of parsing and scope analysis -----------------
253 ScriptData** cached_data_; // used if available, populated if requested. 247 ScriptData** cached_data_; // used if available, populated if requested.
254 AstValueFactory* ast_value_factory_; // used if available, otherwise new. 248 AstValueFactory* ast_value_factory_; // used if available, otherwise new.
255 const AstRawString* function_name_; 249 const AstRawString* function_name_;
256 250
257 //----------- Output of parsing and scope analysis ------------------------ 251 //----------- Output of parsing and scope analysis ------------------------
258 FunctionLiteral* literal_; 252 FunctionLiteral* literal_;
259 253
260 void SetFlag(Flag f) { flags_ |= f; } 254 void SetFlag(Flag f) { flags_ |= f; }
261 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } 255 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; }
262 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } 256 bool GetFlag(Flag f) const { return (flags_ & f) != 0; }
263 }; 257 };
264 258
265 } // namespace internal 259 } // namespace internal
266 } // namespace v8 260 } // namespace v8
267 261
268 #endif // V8_PARSING_PARSE_INFO_H_ 262 #endif // V8_PARSING_PARSE_INFO_H_
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/parsing/parse-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698