Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1180)

Side by Side Diff: src/isolate.cc

Issue 7778013: NewGC: Merge bleeding edge up to 9009. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/interpreter-irregexp.cc ('k') | src/json.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 if (list_ != NULL) list_->prev_ = data; 1328 if (list_ != NULL) list_->prev_ = data;
1329 data->next_ = list_; 1329 data->next_ = list_;
1330 list_ = data; 1330 list_ = data;
1331 } 1331 }
1332 1332
1333 1333
1334 void Isolate::ThreadDataTable::Remove(PerIsolateThreadData* data) { 1334 void Isolate::ThreadDataTable::Remove(PerIsolateThreadData* data) {
1335 if (list_ == data) list_ = data->next_; 1335 if (list_ == data) list_ = data->next_;
1336 if (data->next_ != NULL) data->next_->prev_ = data->prev_; 1336 if (data->next_ != NULL) data->next_->prev_ = data->prev_;
1337 if (data->prev_ != NULL) data->prev_->next_ = data->next_; 1337 if (data->prev_ != NULL) data->prev_->next_ = data->next_;
1338 delete data;
1338 } 1339 }
1339 1340
1340 1341
1341 void Isolate::ThreadDataTable::Remove(Isolate* isolate, 1342 void Isolate::ThreadDataTable::Remove(Isolate* isolate,
1342 ThreadId thread_id) { 1343 ThreadId thread_id) {
1343 PerIsolateThreadData* data = Lookup(isolate, thread_id); 1344 PerIsolateThreadData* data = Lookup(isolate, thread_id);
1344 if (data != NULL) { 1345 if (data != NULL) {
1345 Remove(data); 1346 Remove(data);
1346 } 1347 }
1347 } 1348 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1526 void Isolate::SetIsolateThreadLocals(Isolate* isolate, 1527 void Isolate::SetIsolateThreadLocals(Isolate* isolate,
1527 PerIsolateThreadData* data) { 1528 PerIsolateThreadData* data) {
1528 Thread::SetThreadLocal(isolate_key_, isolate); 1529 Thread::SetThreadLocal(isolate_key_, isolate);
1529 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); 1530 Thread::SetThreadLocal(per_isolate_thread_data_key_, data);
1530 } 1531 }
1531 1532
1532 1533
1533 Isolate::~Isolate() { 1534 Isolate::~Isolate() {
1534 TRACE_ISOLATE(destructor); 1535 TRACE_ISOLATE(destructor);
1535 1536
1537 // Has to be called while counters_ are still alive.
1538 zone_.DeleteKeptSegment();
1539
1540 delete[] assembler_spare_buffer_;
1541 assembler_spare_buffer_ = NULL;
1542
1536 delete unicode_cache_; 1543 delete unicode_cache_;
1537 unicode_cache_ = NULL; 1544 unicode_cache_ = NULL;
1538 1545
1539 delete regexp_stack_; 1546 delete regexp_stack_;
1540 regexp_stack_ = NULL; 1547 regexp_stack_ = NULL;
1541 1548
1542 delete ast_sentinels_; 1549 delete ast_sentinels_;
1543 ast_sentinels_ = NULL; 1550 ast_sentinels_ = NULL;
1544 1551
1545 delete descriptor_lookup_cache_; 1552 delete descriptor_lookup_cache_;
(...skipping 13 matching lines...) Expand all
1559 delete logger_; 1566 delete logger_;
1560 logger_ = NULL; 1567 logger_ = NULL;
1561 1568
1562 delete counters_; 1569 delete counters_;
1563 counters_ = NULL; 1570 counters_ = NULL;
1564 1571
1565 delete handle_scope_implementer_; 1572 delete handle_scope_implementer_;
1566 handle_scope_implementer_ = NULL; 1573 handle_scope_implementer_ = NULL;
1567 delete break_access_; 1574 delete break_access_;
1568 break_access_ = NULL; 1575 break_access_ = NULL;
1576 delete debugger_access_;
1577 debugger_access_ = NULL;
1569 1578
1570 delete compilation_cache_; 1579 delete compilation_cache_;
1571 compilation_cache_ = NULL; 1580 compilation_cache_ = NULL;
1572 delete bootstrapper_; 1581 delete bootstrapper_;
1573 bootstrapper_ = NULL; 1582 bootstrapper_ = NULL;
1574 delete pc_to_code_cache_; 1583 delete pc_to_code_cache_;
1575 pc_to_code_cache_ = NULL; 1584 pc_to_code_cache_ = NULL;
1576 delete write_input_buffer_; 1585 delete write_input_buffer_;
1577 write_input_buffer_ = NULL; 1586 write_input_buffer_ = NULL;
1578 1587
1579 delete context_switcher_; 1588 delete context_switcher_;
1580 context_switcher_ = NULL; 1589 context_switcher_ = NULL;
1581 delete thread_manager_; 1590 delete thread_manager_;
1582 thread_manager_ = NULL; 1591 thread_manager_ = NULL;
1583 1592
1584 delete string_tracker_; 1593 delete string_tracker_;
1585 string_tracker_ = NULL; 1594 string_tracker_ = NULL;
1586 1595
1587 delete memory_allocator_; 1596 delete memory_allocator_;
1588 memory_allocator_ = NULL; 1597 memory_allocator_ = NULL;
1589 delete code_range_; 1598 delete code_range_;
1590 code_range_ = NULL; 1599 code_range_ = NULL;
1591 delete global_handles_; 1600 delete global_handles_;
1592 global_handles_ = NULL; 1601 global_handles_ = NULL;
1593 1602
1603 delete external_reference_table_;
1604 external_reference_table_ = NULL;
1605
1594 #ifdef ENABLE_DEBUGGER_SUPPORT 1606 #ifdef ENABLE_DEBUGGER_SUPPORT
1595 delete debugger_; 1607 delete debugger_;
1596 debugger_ = NULL; 1608 debugger_ = NULL;
1597 delete debug_; 1609 delete debug_;
1598 debug_ = NULL; 1610 debug_ = NULL;
1599 #endif 1611 #endif
1600 } 1612 }
1601 1613
1602 1614
1603 void Isolate::InitializeThreadLocal() { 1615 void Isolate::InitializeThreadLocal() {
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 1877
1866 #ifdef DEBUG 1878 #ifdef DEBUG
1867 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 1879 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
1868 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 1880 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
1869 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 1881 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
1870 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 1882 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
1871 #undef ISOLATE_FIELD_OFFSET 1883 #undef ISOLATE_FIELD_OFFSET
1872 #endif 1884 #endif
1873 1885
1874 } } // namespace v8::internal 1886 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/interpreter-irregexp.cc ('k') | src/json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698