| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 4819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4830 | 4830 |
| 4831 namespace internal { | 4831 namespace internal { |
| 4832 | 4832 |
| 4833 | 4833 |
| 4834 void HandleScopeImplementer::FreeThreadResources() { | 4834 void HandleScopeImplementer::FreeThreadResources() { |
| 4835 Free(); | 4835 Free(); |
| 4836 } | 4836 } |
| 4837 | 4837 |
| 4838 | 4838 |
| 4839 char* HandleScopeImplementer::ArchiveThread(char* storage) { | 4839 char* HandleScopeImplementer::ArchiveThread(char* storage) { |
| 4840 Isolate* isolate = Isolate::Current(); |
| 4840 v8::ImplementationUtilities::HandleScopeData* current = | 4841 v8::ImplementationUtilities::HandleScopeData* current = |
| 4841 Isolate::Current()->handle_scope_data(); | 4842 isolate->handle_scope_data(); |
| 4842 handle_scope_data_ = *current; | 4843 handle_scope_data_ = *current; |
| 4843 memcpy(storage, this, sizeof(*this)); | 4844 memcpy(storage, this, sizeof(*this)); |
| 4844 | 4845 |
| 4845 ResetAfterArchive(); | 4846 ResetAfterArchive(); |
| 4846 current->Initialize(); | 4847 current->Initialize(isolate); |
| 4847 | 4848 |
| 4848 return storage + ArchiveSpacePerThread(); | 4849 return storage + ArchiveSpacePerThread(); |
| 4849 } | 4850 } |
| 4850 | 4851 |
| 4851 | 4852 |
| 4852 int HandleScopeImplementer::ArchiveSpacePerThread() { | 4853 int HandleScopeImplementer::ArchiveSpacePerThread() { |
| 4853 return sizeof(HandleScopeImplementer); | 4854 return sizeof(HandleScopeImplementer); |
| 4854 } | 4855 } |
| 4855 | 4856 |
| 4856 | 4857 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4889 | 4890 |
| 4890 | 4891 |
| 4891 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 4892 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 4892 HandleScopeImplementer* thread_local = | 4893 HandleScopeImplementer* thread_local = |
| 4893 reinterpret_cast<HandleScopeImplementer*>(storage); | 4894 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 4894 thread_local->IterateThis(v); | 4895 thread_local->IterateThis(v); |
| 4895 return storage + ArchiveSpacePerThread(); | 4896 return storage + ArchiveSpacePerThread(); |
| 4896 } | 4897 } |
| 4897 | 4898 |
| 4898 } } // namespace v8::internal | 4899 } } // namespace v8::internal |
| OLD | NEW |