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 11 matching lines...) Expand all Loading... |
22 class ScriptData; | 22 class ScriptData; |
23 class SharedFunctionInfo; | 23 class SharedFunctionInfo; |
24 class UnicodeCache; | 24 class UnicodeCache; |
25 class Utf16CharacterStream; | 25 class Utf16CharacterStream; |
26 class Zone; | 26 class Zone; |
27 | 27 |
28 // A container for the inputs, configuration options, and outputs of parsing. | 28 // A container for the inputs, configuration options, and outputs of parsing. |
29 class V8_EXPORT_PRIVATE ParseInfo { | 29 class V8_EXPORT_PRIVATE ParseInfo { |
30 public: | 30 public: |
31 explicit ParseInfo(Zone* zone); | 31 explicit ParseInfo(Zone* zone); |
32 ParseInfo(Zone* zone, Handle<JSFunction> function); | |
33 ParseInfo(Zone* zone, Handle<Script> script); | 32 ParseInfo(Zone* zone, Handle<Script> script); |
34 // TODO(all) Only used via Debug::FindSharedFunctionInfoInScript, remove? | |
35 ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared); | 33 ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared); |
36 | 34 |
37 ~ParseInfo(); | 35 ~ParseInfo(); |
38 | 36 |
39 Zone* zone() const { return zone_; } | 37 Zone* zone() const { return zone_; } |
40 | 38 |
41 // Convenience accessor methods for flags. | 39 // Convenience accessor methods for flags. |
42 #define FLAG_ACCESSOR(flag, getter, setter) \ | 40 #define FLAG_ACCESSOR(flag, getter, setter) \ |
43 bool getter() const { return GetFlag(flag); } \ | 41 bool getter() const { return GetFlag(flag); } \ |
44 void setter() { SetFlag(flag); } \ | 42 void setter() { SetFlag(flag); } \ |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 | 244 |
247 void SetFlag(Flag f) { flags_ |= f; } | 245 void SetFlag(Flag f) { flags_ |= f; } |
248 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 246 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
249 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 247 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
250 }; | 248 }; |
251 | 249 |
252 } // namespace internal | 250 } // namespace internal |
253 } // namespace v8 | 251 } // namespace v8 |
254 | 252 |
255 #endif // V8_PARSING_PARSE_INFO_H_ | 253 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |