OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1953 void Isolate::SetIsolateThreadLocals(Isolate* isolate, | 1953 void Isolate::SetIsolateThreadLocals(Isolate* isolate, |
1954 PerIsolateThreadData* data) { | 1954 PerIsolateThreadData* data) { |
1955 Thread::SetThreadLocal(isolate_key_, isolate); | 1955 Thread::SetThreadLocal(isolate_key_, isolate); |
1956 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); | 1956 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); |
1957 } | 1957 } |
1958 | 1958 |
1959 | 1959 |
1960 Isolate::~Isolate() { | 1960 Isolate::~Isolate() { |
1961 TRACE_ISOLATE(destructor); | 1961 TRACE_ISOLATE(destructor); |
1962 | 1962 |
| 1963 // The entry stack must be empty when we get here, |
| 1964 // except for the default isolate, where it can |
| 1965 // still contain up to one entry stack item |
| 1966 ASSERT(entry_stack_ == NULL || this == default_isolate_); |
| 1967 ASSERT(entry_stack_ == NULL || entry_stack_->previous_item == NULL); |
| 1968 |
| 1969 delete entry_stack_; |
| 1970 entry_stack_ = NULL; |
| 1971 |
1963 delete[] assembler_spare_buffer_; | 1972 delete[] assembler_spare_buffer_; |
1964 assembler_spare_buffer_ = NULL; | 1973 assembler_spare_buffer_ = NULL; |
1965 | 1974 |
1966 delete unicode_cache_; | 1975 delete unicode_cache_; |
1967 unicode_cache_ = NULL; | 1976 unicode_cache_ = NULL; |
1968 | 1977 |
1969 delete date_cache_; | 1978 delete date_cache_; |
1970 date_cache_ = NULL; | 1979 date_cache_ = NULL; |
1971 | 1980 |
1972 delete[] code_stub_interface_descriptors_; | 1981 delete[] code_stub_interface_descriptors_; |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2488 | 2497 |
2489 #ifdef DEBUG | 2498 #ifdef DEBUG |
2490 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2499 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2491 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2500 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2492 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2501 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2493 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2502 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2494 #undef ISOLATE_FIELD_OFFSET | 2503 #undef ISOLATE_FIELD_OFFSET |
2495 #endif | 2504 #endif |
2496 | 2505 |
2497 } } // namespace v8::internal | 2506 } } // namespace v8::internal |
OLD | NEW |