| 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 } | 144 } |
| 145 | 145 |
| 146 int end_position() const { return end_position_; } | 146 int end_position() const { return end_position_; } |
| 147 void set_end_position(int end_position) { end_position_ = end_position; } | 147 void set_end_position(int end_position) { end_position_ = end_position; } |
| 148 | 148 |
| 149 // Getters for individual compiler hints. | 149 // Getters for individual compiler hints. |
| 150 bool is_declaration() const; | 150 bool is_declaration() const; |
| 151 bool is_arrow() const; | 151 bool is_arrow() const; |
| 152 bool is_async() const; | 152 bool is_async() const; |
| 153 bool is_default_constructor() const; | 153 bool is_default_constructor() const; |
| 154 bool requires_class_field_init() const; |
| 155 bool is_class_field_initializer() const; |
| 154 FunctionKind function_kind() const; | 156 FunctionKind function_kind() const; |
| 155 | 157 |
| 156 //-------------------------------------------------------------------------- | 158 //-------------------------------------------------------------------------- |
| 157 // TODO(titzer): these should not be part of ParseInfo. | 159 // TODO(titzer): these should not be part of ParseInfo. |
| 158 //-------------------------------------------------------------------------- | 160 //-------------------------------------------------------------------------- |
| 159 Isolate* isolate() const { return isolate_; } | 161 Isolate* isolate() const { return isolate_; } |
| 160 Handle<SharedFunctionInfo> shared_info() const { return shared_; } | 162 Handle<SharedFunctionInfo> shared_info() const { return shared_; } |
| 161 Handle<Script> script() const { return script_; } | 163 Handle<Script> script() const { return script_; } |
| 162 Handle<Context> context() const { return context_; } | 164 Handle<Context> context() const { return context_; } |
| 163 void clear_script() { script_ = Handle<Script>::null(); } | 165 void clear_script() { script_ = Handle<Script>::null(); } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 238 |
| 237 void SetFlag(Flag f) { flags_ |= f; } | 239 void SetFlag(Flag f) { flags_ |= f; } |
| 238 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 240 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
| 239 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 241 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
| 240 }; | 242 }; |
| 241 | 243 |
| 242 } // namespace internal | 244 } // namespace internal |
| 243 } // namespace v8 | 245 } // namespace v8 |
| 244 | 246 |
| 245 #endif // V8_PARSING_PARSE_INFO_H_ | 247 #endif // V8_PARSING_PARSE_INFO_H_ |
| OLD | NEW |