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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "include/v8.h" | 10 #include "include/v8.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 public: | 35 public: |
36 explicit ParseInfo(AccountingAllocator* zone_allocator); | 36 explicit ParseInfo(AccountingAllocator* zone_allocator); |
37 ParseInfo(Handle<Script> script); | 37 ParseInfo(Handle<Script> script); |
38 ParseInfo(Handle<SharedFunctionInfo> shared); | 38 ParseInfo(Handle<SharedFunctionInfo> shared); |
39 | 39 |
40 // TODO(rmcilroy): Remove once Hydrogen no longer needs this. | 40 // TODO(rmcilroy): Remove once Hydrogen no longer needs this. |
41 ParseInfo(Handle<SharedFunctionInfo> shared, std::shared_ptr<Zone> zone); | 41 ParseInfo(Handle<SharedFunctionInfo> shared, std::shared_ptr<Zone> zone); |
42 | 42 |
43 ~ParseInfo(); | 43 ~ParseInfo(); |
44 | 44 |
45 static ParseInfo* AllocateWithoutScript(Handle<SharedFunctionInfo> shared); | |
46 | |
47 Zone* zone() const { return zone_.get(); } | 45 Zone* zone() const { return zone_.get(); } |
48 | 46 |
49 std::shared_ptr<Zone> zone_shared() const { return zone_; } | 47 std::shared_ptr<Zone> zone_shared() const { return zone_; } |
50 | 48 |
51 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); | 49 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); |
52 void set_deferred_handles(DeferredHandles* deferred_handles); | 50 void set_deferred_handles(DeferredHandles* deferred_handles); |
53 std::shared_ptr<DeferredHandles> deferred_handles() const { | 51 std::shared_ptr<DeferredHandles> deferred_handles() const { |
54 return deferred_handles_; | 52 return deferred_handles_; |
55 } | 53 } |
56 | 54 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 281 |
284 void SetFlag(Flag f) { flags_ |= f; } | 282 void SetFlag(Flag f) { flags_ |= f; } |
285 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 283 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
286 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 284 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
287 }; | 285 }; |
288 | 286 |
289 } // namespace internal | 287 } // namespace internal |
290 } // namespace v8 | 288 } // namespace v8 |
291 | 289 |
292 #endif // V8_PARSING_PARSE_INFO_H_ | 290 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |