OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 void Isolate::SetIsolateThreadLocals(Isolate* isolate, | 1526 void Isolate::SetIsolateThreadLocals(Isolate* isolate, |
1527 PerIsolateThreadData* data) { | 1527 PerIsolateThreadData* data) { |
1528 Thread::SetThreadLocal(isolate_key_, isolate); | 1528 Thread::SetThreadLocal(isolate_key_, isolate); |
1529 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); | 1529 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); |
1530 } | 1530 } |
1531 | 1531 |
1532 | 1532 |
1533 Isolate::~Isolate() { | 1533 Isolate::~Isolate() { |
1534 TRACE_ISOLATE(destructor); | 1534 TRACE_ISOLATE(destructor); |
1535 | 1535 |
| 1536 // Has to be called while counters_ are still alive. |
| 1537 zone_.DeleteKeptSegment(); |
| 1538 |
1536 delete unicode_cache_; | 1539 delete unicode_cache_; |
1537 unicode_cache_ = NULL; | 1540 unicode_cache_ = NULL; |
1538 | 1541 |
1539 delete regexp_stack_; | 1542 delete regexp_stack_; |
1540 regexp_stack_ = NULL; | 1543 regexp_stack_ = NULL; |
1541 | 1544 |
1542 delete ast_sentinels_; | 1545 delete ast_sentinels_; |
1543 ast_sentinels_ = NULL; | 1546 ast_sentinels_ = NULL; |
1544 | 1547 |
1545 delete descriptor_lookup_cache_; | 1548 delete descriptor_lookup_cache_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1584 delete string_tracker_; | 1587 delete string_tracker_; |
1585 string_tracker_ = NULL; | 1588 string_tracker_ = NULL; |
1586 | 1589 |
1587 delete memory_allocator_; | 1590 delete memory_allocator_; |
1588 memory_allocator_ = NULL; | 1591 memory_allocator_ = NULL; |
1589 delete code_range_; | 1592 delete code_range_; |
1590 code_range_ = NULL; | 1593 code_range_ = NULL; |
1591 delete global_handles_; | 1594 delete global_handles_; |
1592 global_handles_ = NULL; | 1595 global_handles_ = NULL; |
1593 | 1596 |
| 1597 delete external_reference_table_; |
| 1598 external_reference_table_ = NULL; |
| 1599 |
1594 #ifdef ENABLE_DEBUGGER_SUPPORT | 1600 #ifdef ENABLE_DEBUGGER_SUPPORT |
1595 delete debugger_; | 1601 delete debugger_; |
1596 debugger_ = NULL; | 1602 debugger_ = NULL; |
1597 delete debug_; | 1603 delete debug_; |
1598 debug_ = NULL; | 1604 debug_ = NULL; |
1599 #endif | 1605 #endif |
1600 } | 1606 } |
1601 | 1607 |
1602 | 1608 |
1603 void Isolate::InitializeThreadLocal() { | 1609 void Isolate::InitializeThreadLocal() { |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 | 1871 |
1866 #ifdef DEBUG | 1872 #ifdef DEBUG |
1867 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1873 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1868 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1874 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
1869 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1875 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1870 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1876 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1871 #undef ISOLATE_FIELD_OFFSET | 1877 #undef ISOLATE_FIELD_OFFSET |
1872 #endif | 1878 #endif |
1873 | 1879 |
1874 } } // namespace v8::internal | 1880 } } // namespace v8::internal |
OLD | NEW |