| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 | 69 |
| 70 template <typename T> | 70 template <typename T> |
| 71 inline T** Handle<T>::location() const { | 71 inline T** Handle<T>::location() const { |
| 72 ASSERT(location_ == NULL || | 72 ASSERT(location_ == NULL || |
| 73 reinterpret_cast<Address>(*location_) != kZapValue); | 73 reinterpret_cast<Address>(*location_) != kZapValue); |
| 74 SLOW_ASSERT(ISOLATE->allow_handle_deref()); | 74 SLOW_ASSERT(ISOLATE->allow_handle_deref()); |
| 75 return location_; | 75 return location_; |
| 76 } | 76 } |
| 77 | 77 |
| 78 | 78 |
| 79 HandleScope::HandleScope() { | |
| 80 Isolate* isolate = Isolate::Current(); | |
| 81 v8::ImplementationUtilities::HandleScopeData* current = | |
| 82 isolate->handle_scope_data(); | |
| 83 isolate_ = isolate; | |
| 84 prev_next_ = current->next; | |
| 85 prev_limit_ = current->limit; | |
| 86 current->level++; | |
| 87 } | |
| 88 | |
| 89 | |
| 90 HandleScope::HandleScope(Isolate* isolate) { | 79 HandleScope::HandleScope(Isolate* isolate) { |
| 91 ASSERT(isolate == Isolate::Current()); | 80 ASSERT(isolate == Isolate::Current()); |
| 92 v8::ImplementationUtilities::HandleScopeData* current = | 81 v8::ImplementationUtilities::HandleScopeData* current = |
| 93 isolate->handle_scope_data(); | 82 isolate->handle_scope_data(); |
| 94 isolate_ = isolate; | 83 isolate_ = isolate; |
| 95 prev_next_ = current->next; | 84 prev_next_ = current->next; |
| 96 prev_limit_ = current->limit; | 85 prev_limit_ = current->limit; |
| 97 current->level++; | 86 current->level++; |
| 98 } | 87 } |
| 99 | 88 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 AllowHandleDereference::~AllowHandleDereference() { | 204 AllowHandleDereference::~AllowHandleDereference() { |
| 216 if (FLAG_parallel_recompilation) return; | 205 if (FLAG_parallel_recompilation) return; |
| 217 Isolate::Current()->set_allow_handle_deref(old_state_); | 206 Isolate::Current()->set_allow_handle_deref(old_state_); |
| 218 } | 207 } |
| 219 #endif | 208 #endif |
| 220 | 209 |
| 221 | 210 |
| 222 } } // namespace v8::internal | 211 } } // namespace v8::internal |
| 223 | 212 |
| 224 #endif // V8_HANDLES_INL_H_ | 213 #endif // V8_HANDLES_INL_H_ |
| OLD | NEW |