Chromium Code Reviews| 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 1612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1623 | 1623 |
| 1624 delete descriptor_lookup_cache_; | 1624 delete descriptor_lookup_cache_; |
| 1625 descriptor_lookup_cache_ = NULL; | 1625 descriptor_lookup_cache_ = NULL; |
| 1626 delete context_slot_cache_; | 1626 delete context_slot_cache_; |
| 1627 context_slot_cache_ = NULL; | 1627 context_slot_cache_ = NULL; |
| 1628 delete keyed_lookup_cache_; | 1628 delete keyed_lookup_cache_; |
| 1629 keyed_lookup_cache_ = NULL; | 1629 keyed_lookup_cache_ = NULL; |
| 1630 | 1630 |
| 1631 delete transcendental_cache_; | 1631 delete transcendental_cache_; |
| 1632 transcendental_cache_ = NULL; | 1632 transcendental_cache_ = NULL; |
| 1633 delete stub_cache_; | 1633 free(stub_cache_); |
|
Sven Panne
2012/02/27 13:03:29
Leave this as-is.
| |
| 1634 stub_cache_ = NULL; | 1634 stub_cache_ = NULL; |
| 1635 delete stats_table_; | 1635 delete stats_table_; |
| 1636 stats_table_ = NULL; | 1636 stats_table_ = NULL; |
| 1637 | 1637 |
| 1638 delete logger_; | 1638 delete logger_; |
| 1639 logger_ = NULL; | 1639 logger_ = NULL; |
| 1640 | 1640 |
| 1641 delete counters_; | 1641 delete counters_; |
| 1642 counters_ = NULL; | 1642 counters_ = NULL; |
| 1643 | 1643 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1772 transcendental_cache_ = new TranscendentalCache(); | 1772 transcendental_cache_ = new TranscendentalCache(); |
| 1773 keyed_lookup_cache_ = new KeyedLookupCache(); | 1773 keyed_lookup_cache_ = new KeyedLookupCache(); |
| 1774 context_slot_cache_ = new ContextSlotCache(); | 1774 context_slot_cache_ = new ContextSlotCache(); |
| 1775 descriptor_lookup_cache_ = new DescriptorLookupCache(); | 1775 descriptor_lookup_cache_ = new DescriptorLookupCache(); |
| 1776 unicode_cache_ = new UnicodeCache(); | 1776 unicode_cache_ = new UnicodeCache(); |
| 1777 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 1777 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); |
| 1778 write_input_buffer_ = new StringInputBuffer(); | 1778 write_input_buffer_ = new StringInputBuffer(); |
| 1779 global_handles_ = new GlobalHandles(this); | 1779 global_handles_ = new GlobalHandles(this); |
| 1780 bootstrapper_ = new Bootstrapper(); | 1780 bootstrapper_ = new Bootstrapper(); |
| 1781 handle_scope_implementer_ = new HandleScopeImplementer(this); | 1781 handle_scope_implementer_ = new HandleScopeImplementer(this); |
| 1782 stub_cache_ = new StubCache(this); | 1782 stub_cache_ = new (calloc(1, sizeof(StubCache))) StubCache(this); |
|
Sven Panne
2012/02/27 13:03:29
I think we can remove this line completely and rep
ulan
2012/02/27 16:13:02
Unfortunately, builtins.SetUp() assumes that stub_
| |
| 1783 regexp_stack_ = new RegExpStack(); | 1783 regexp_stack_ = new RegExpStack(); |
| 1784 regexp_stack_->isolate_ = this; | 1784 regexp_stack_->isolate_ = this; |
| 1785 | 1785 |
| 1786 // Enable logging before setting up the heap | 1786 // Enable logging before setting up the heap |
| 1787 logger_->SetUp(); | 1787 logger_->SetUp(); |
| 1788 | 1788 |
| 1789 CpuProfiler::SetUp(); | 1789 CpuProfiler::SetUp(); |
| 1790 HeapProfiler::SetUp(); | 1790 HeapProfiler::SetUp(); |
| 1791 | 1791 |
| 1792 // Initialize other runtime facilities | 1792 // Initialize other runtime facilities |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1829 } | 1829 } |
| 1830 | 1830 |
| 1831 if (FLAG_preemption) { | 1831 if (FLAG_preemption) { |
| 1832 v8::Locker locker; | 1832 v8::Locker locker; |
| 1833 v8::Locker::StartPreemption(100); | 1833 v8::Locker::StartPreemption(100); |
| 1834 } | 1834 } |
| 1835 | 1835 |
| 1836 #ifdef ENABLE_DEBUGGER_SUPPORT | 1836 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 1837 debug_->SetUp(create_heap_objects); | 1837 debug_->SetUp(create_heap_objects); |
| 1838 #endif | 1838 #endif |
| 1839 stub_cache_->Initialize(create_heap_objects); | 1839 stub_cache_->Initialize(create_heap_objects); |
|
Sven Panne
2012/02/27 13:03:29
Remove this line.
ulan
2012/02/27 16:13:02
Done.
| |
| 1840 | 1840 |
| 1841 // If we are deserializing, read the state into the now-empty heap. | 1841 // If we are deserializing, read the state into the now-empty heap. |
| 1842 if (des != NULL) { | 1842 if (des != NULL) { |
| 1843 des->Deserialize(); | 1843 des->Deserialize(); |
| 1844 stub_cache_->Initialize(true); | 1844 stub_cache_->Initialize(true); |
|
Sven Panne
2012/02/27 13:03:29
I think we can move this Initialize past the condi
ulan
2012/02/27 16:13:02
Moved Initialize().
| |
| 1845 } | 1845 } |
| 1846 | 1846 |
| 1847 // Finish initialization of ThreadLocal after deserialization is done. | 1847 // Finish initialization of ThreadLocal after deserialization is done. |
| 1848 clear_pending_exception(); | 1848 clear_pending_exception(); |
| 1849 clear_pending_message(); | 1849 clear_pending_message(); |
| 1850 clear_scheduled_exception(); | 1850 clear_scheduled_exception(); |
| 1851 | 1851 |
| 1852 // Deserializing may put strange things in the root array's copy of the | 1852 // Deserializing may put strange things in the root array's copy of the |
| 1853 // stack guard. | 1853 // stack guard. |
| 1854 heap_.SetStackLimits(); | 1854 heap_.SetStackLimits(); |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1952 | 1952 |
| 1953 #ifdef DEBUG | 1953 #ifdef DEBUG |
| 1954 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1954 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1955 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1955 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 1956 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1956 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1957 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1957 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1958 #undef ISOLATE_FIELD_OFFSET | 1958 #undef ISOLATE_FIELD_OFFSET |
| 1959 #endif | 1959 #endif |
| 1960 | 1960 |
| 1961 } } // namespace v8::internal | 1961 } } // namespace v8::internal |
| OLD | NEW |