OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ALLOCATION_SITE_SCOPES_H_ | 5 #ifndef V8_ALLOCATION_SITE_SCOPES_H_ |
6 #define V8_ALLOCATION_SITE_SCOPES_H_ | 6 #define V8_ALLOCATION_SITE_SCOPES_H_ |
7 | 7 |
8 #include "src/ast.h" | 8 #include "src/ast.h" |
9 #include "src/handles.h" | 9 #include "src/handles.h" |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 Isolate* isolate() { return isolate_; } | 30 Isolate* isolate() { return isolate_; } |
31 | 31 |
32 protected: | 32 protected: |
33 void update_current_site(AllocationSite* site) { | 33 void update_current_site(AllocationSite* site) { |
34 *(current_.location()) = site; | 34 *(current_.location()) = site; |
35 } | 35 } |
36 | 36 |
37 void InitializeTraversal(Handle<AllocationSite> site) { | 37 void InitializeTraversal(Handle<AllocationSite> site) { |
38 top_ = site; | 38 top_ = site; |
39 current_ = Handle<AllocationSite>::New(*top_, isolate()); | 39 current_ = Handle<AllocationSite>(*top_, isolate()); |
40 } | 40 } |
41 | 41 |
42 private: | 42 private: |
43 Isolate* isolate_; | 43 Isolate* isolate_; |
44 Handle<AllocationSite> top_; | 44 Handle<AllocationSite> top_; |
45 Handle<AllocationSite> current_; | 45 Handle<AllocationSite> current_; |
46 }; | 46 }; |
47 | 47 |
48 | 48 |
49 // AllocationSiteCreationContext aids in the creation of AllocationSites to | 49 // AllocationSiteCreationContext aids in the creation of AllocationSites to |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 private: | 92 private: |
93 Handle<AllocationSite> top_site_; | 93 Handle<AllocationSite> top_site_; |
94 bool activated_; | 94 bool activated_; |
95 }; | 95 }; |
96 | 96 |
97 | 97 |
98 } // namespace internal | 98 } // namespace internal |
99 } // namespace v8 | 99 } // namespace v8 |
100 | 100 |
101 #endif // V8_ALLOCATION_SITE_SCOPES_H_ | 101 #endif // V8_ALLOCATION_SITE_SCOPES_H_ |
OLD | NEW |