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 |
45 Zone* zone() const { return zone_.get(); } | 47 Zone* zone() const { return zone_.get(); } |
46 | 48 |
47 std::shared_ptr<Zone> zone_shared() const { return zone_; } | 49 std::shared_ptr<Zone> zone_shared() const { return zone_; } |
48 | 50 |
49 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); | 51 void set_deferred_handles(std::shared_ptr<DeferredHandles> deferred_handles); |
50 void set_deferred_handles(DeferredHandles* deferred_handles); | 52 void set_deferred_handles(DeferredHandles* deferred_handles); |
51 std::shared_ptr<DeferredHandles> deferred_handles() const { | 53 std::shared_ptr<DeferredHandles> deferred_handles() const { |
52 return deferred_handles_; | 54 return deferred_handles_; |
53 } | 55 } |
54 | 56 |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 283 |
282 void SetFlag(Flag f) { flags_ |= f; } | 284 void SetFlag(Flag f) { flags_ |= f; } |
283 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } | 285 void SetFlag(Flag f, bool v) { flags_ = v ? flags_ | f : flags_ & ~f; } |
284 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } | 286 bool GetFlag(Flag f) const { return (flags_ & f) != 0; } |
285 }; | 287 }; |
286 | 288 |
287 } // namespace internal | 289 } // namespace internal |
288 } // namespace v8 | 290 } // namespace v8 |
289 | 291 |
290 #endif // V8_PARSING_PARSE_INFO_H_ | 292 #endif // V8_PARSING_PARSE_INFO_H_ |
OLD | NEW |