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 ParseInfo { | 29 class ParseInfo { |
30 public: | 30 public: |
31 explicit ParseInfo(Zone* zone); | 31 explicit ParseInfo(Zone* zone); |
| 32 ParseInfo(Zone* zone, Handle<JSFunction> function); |
32 ParseInfo(Zone* zone, Handle<Script> script); | 33 ParseInfo(Zone* zone, Handle<Script> script); |
| 34 // TODO(all) Only used via Debug::FindSharedFunctionInfoInScript, remove? |
33 ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared); | 35 ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared); |
34 | 36 |
35 ~ParseInfo(); | 37 ~ParseInfo(); |
36 | 38 |
37 Zone* zone() const { return zone_; } | 39 Zone* zone() const { return zone_; } |
38 | 40 |
39 // Convenience accessor methods for flags. | 41 // Convenience accessor methods for flags. |
40 #define FLAG_ACCESSOR(flag, getter, setter) \ | 42 #define FLAG_ACCESSOR(flag, getter, setter) \ |
41 bool getter() const { return GetFlag(flag); } \ | 43 bool getter() const { return GetFlag(flag); } \ |
42 void setter() { SetFlag(flag); } \ | 44 void setter() { SetFlag(flag); } \ |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 244 |
243 void SetFlag(Flag f) { flags_ |= f; } | 245 void SetFlag(Flag f) { flags_ |= f; } |
244 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; } |
245 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 247 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
246 }; | 248 }; |
247 | 249 |
248 } // namespace internal | 250 } // namespace internal |
249 } // namespace v8 | 251 } // namespace v8 |
250 | 252 |
251 #endif // V8_PARSING_PARSE_INFO_H_ | 253 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |