| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/handles.h" | 5 #include "src/handles.h" |
| 6 | 6 |
| 7 #include "src/address-map.h" | 7 #include "src/address-map.h" |
| 8 #include "src/base/logging.h" | 8 #include "src/base/logging.h" |
| 9 #include "src/identity-map.h" | 9 #include "src/identity-map.h" |
| 10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 Address HandleScope::current_next_address(Isolate* isolate) { | 112 Address HandleScope::current_next_address(Isolate* isolate) { |
| 113 return reinterpret_cast<Address>(&isolate->handle_scope_data()->next); | 113 return reinterpret_cast<Address>(&isolate->handle_scope_data()->next); |
| 114 } | 114 } |
| 115 | 115 |
| 116 | 116 |
| 117 Address HandleScope::current_limit_address(Isolate* isolate) { | 117 Address HandleScope::current_limit_address(Isolate* isolate) { |
| 118 return reinterpret_cast<Address>(&isolate->handle_scope_data()->limit); | 118 return reinterpret_cast<Address>(&isolate->handle_scope_data()->limit); |
| 119 } | 119 } |
| 120 | 120 |
| 121 CanonicalHandleScope::CanonicalHandleScope(Isolate* isolate) | 121 CanonicalHandleScope::CanonicalHandleScope(Isolate* isolate) |
| 122 : isolate_(isolate), zone_(isolate->allocator()) { | 122 : isolate_(isolate), zone_(isolate->allocator(), ZONE_NAME) { |
| 123 HandleScopeData* handle_scope_data = isolate_->handle_scope_data(); | 123 HandleScopeData* handle_scope_data = isolate_->handle_scope_data(); |
| 124 prev_canonical_scope_ = handle_scope_data->canonical_scope; | 124 prev_canonical_scope_ = handle_scope_data->canonical_scope; |
| 125 handle_scope_data->canonical_scope = this; | 125 handle_scope_data->canonical_scope = this; |
| 126 root_index_map_ = new RootIndexMap(isolate); | 126 root_index_map_ = new RootIndexMap(isolate); |
| 127 identity_map_ = new IdentityMap<Object**>(isolate->heap(), &zone_); | 127 identity_map_ = new IdentityMap<Object**>(isolate->heap(), &zone_); |
| 128 canonical_level_ = handle_scope_data->level; | 128 canonical_level_ = handle_scope_data->level; |
| 129 } | 129 } |
| 130 | 130 |
| 131 | 131 |
| 132 CanonicalHandleScope::~CanonicalHandleScope() { | 132 CanonicalHandleScope::~CanonicalHandleScope() { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 data->next = prev_next_; | 193 data->next = prev_next_; |
| 194 data->limit = prev_limit_; | 194 data->limit = prev_limit_; |
| 195 #ifdef DEBUG | 195 #ifdef DEBUG |
| 196 handles_detached_ = true; | 196 handles_detached_ = true; |
| 197 #endif | 197 #endif |
| 198 return deferred; | 198 return deferred; |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace internal | 201 } // namespace internal |
| 202 } // namespace v8 | 202 } // namespace v8 |
| OLD | NEW |