OLD | NEW |
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 function_literal_id_ = function_literal_id; | 155 function_literal_id_ = function_literal_id; |
156 } | 156 } |
157 | 157 |
158 int max_function_literal_id() const { return max_function_literal_id_; } | 158 int max_function_literal_id() const { return max_function_literal_id_; } |
159 void set_max_function_literal_id(int max_function_literal_id) { | 159 void set_max_function_literal_id(int max_function_literal_id) { |
160 max_function_literal_id_ = max_function_literal_id; | 160 max_function_literal_id_ = max_function_literal_id; |
161 } | 161 } |
162 | 162 |
163 // Getters for individual compiler hints. | 163 // Getters for individual compiler hints. |
164 bool is_declaration() const; | 164 bool is_declaration() const; |
165 bool requires_class_field_init() const; | |
166 bool is_class_field_initializer() const; | |
167 FunctionKind function_kind() const; | 165 FunctionKind function_kind() const; |
168 | 166 |
169 //-------------------------------------------------------------------------- | 167 //-------------------------------------------------------------------------- |
170 // TODO(titzer): these should not be part of ParseInfo. | 168 // TODO(titzer): these should not be part of ParseInfo. |
171 //-------------------------------------------------------------------------- | 169 //-------------------------------------------------------------------------- |
172 Isolate* isolate() const { return isolate_; } | 170 Isolate* isolate() const { return isolate_; } |
173 Handle<SharedFunctionInfo> shared_info() const { return shared_; } | 171 Handle<SharedFunctionInfo> shared_info() const { return shared_; } |
174 Handle<Script> script() const { return script_; } | 172 Handle<Script> script() const { return script_; } |
175 MaybeHandle<ScopeInfo> maybe_outer_scope_info() const { | 173 MaybeHandle<ScopeInfo> maybe_outer_scope_info() const { |
176 return maybe_outer_scope_info_; | 174 return maybe_outer_scope_info_; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 258 |
261 void SetFlag(Flag f) { flags_ |= f; } | 259 void SetFlag(Flag f) { flags_ |= f; } |
262 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 260 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
263 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 261 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
264 }; | 262 }; |
265 | 263 |
266 } // namespace internal | 264 } // namespace internal |
267 } // namespace v8 | 265 } // namespace v8 |
268 | 266 |
269 #endif // V8_PARSING_PARSE_INFO_H_ | 267 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |