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 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1479 preallocated_storage_preallocated_(false), | 1479 preallocated_storage_preallocated_(false), |
1480 inner_pointer_to_code_cache_(NULL), | 1480 inner_pointer_to_code_cache_(NULL), |
1481 write_input_buffer_(NULL), | 1481 write_input_buffer_(NULL), |
1482 global_handles_(NULL), | 1482 global_handles_(NULL), |
1483 context_switcher_(NULL), | 1483 context_switcher_(NULL), |
1484 thread_manager_(NULL), | 1484 thread_manager_(NULL), |
1485 fp_stubs_generated_(false), | 1485 fp_stubs_generated_(false), |
1486 has_installed_extensions_(false), | 1486 has_installed_extensions_(false), |
1487 string_tracker_(NULL), | 1487 string_tracker_(NULL), |
1488 regexp_stack_(NULL), | 1488 regexp_stack_(NULL), |
1489 date_cache_(NULL), | |
1489 embedder_data_(NULL), | 1490 embedder_data_(NULL), |
1490 context_exit_happened_(false) { | 1491 context_exit_happened_(false) { |
1491 TRACE_ISOLATE(constructor); | 1492 TRACE_ISOLATE(constructor); |
1492 | 1493 |
1493 memset(isolate_addresses_, 0, | 1494 memset(isolate_addresses_, 0, |
1494 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); | 1495 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); |
1495 | 1496 |
1496 heap_.isolate_ = this; | 1497 heap_.isolate_ = this; |
1497 zone_.isolate_ = this; | 1498 zone_.isolate_ = this; |
1498 stack_guard_.isolate_ = this; | 1499 stack_guard_.isolate_ = this; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1611 | 1612 |
1612 // Has to be called while counters_ are still alive. | 1613 // Has to be called while counters_ are still alive. |
1613 zone_.DeleteKeptSegment(); | 1614 zone_.DeleteKeptSegment(); |
1614 | 1615 |
1615 delete[] assembler_spare_buffer_; | 1616 delete[] assembler_spare_buffer_; |
1616 assembler_spare_buffer_ = NULL; | 1617 assembler_spare_buffer_ = NULL; |
1617 | 1618 |
1618 delete unicode_cache_; | 1619 delete unicode_cache_; |
1619 unicode_cache_ = NULL; | 1620 unicode_cache_ = NULL; |
1620 | 1621 |
1622 delete date_cache_; | |
1623 date_cache_ = NULL; | |
1624 | |
1621 delete regexp_stack_; | 1625 delete regexp_stack_; |
1622 regexp_stack_ = NULL; | 1626 regexp_stack_ = NULL; |
1623 | 1627 |
rossberg
2012/03/06 15:55:50
Accidental newline?
ulan
2012/03/07 10:55:21
Done.
| |
1628 | |
1624 delete descriptor_lookup_cache_; | 1629 delete descriptor_lookup_cache_; |
1625 descriptor_lookup_cache_ = NULL; | 1630 descriptor_lookup_cache_ = NULL; |
1626 delete context_slot_cache_; | 1631 delete context_slot_cache_; |
1627 context_slot_cache_ = NULL; | 1632 context_slot_cache_ = NULL; |
1628 delete keyed_lookup_cache_; | 1633 delete keyed_lookup_cache_; |
1629 keyed_lookup_cache_ = NULL; | 1634 keyed_lookup_cache_ = NULL; |
1630 | 1635 |
1631 delete transcendental_cache_; | 1636 delete transcendental_cache_; |
1632 transcendental_cache_ = NULL; | 1637 transcendental_cache_ = NULL; |
1633 delete stub_cache_; | 1638 delete stub_cache_; |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1775 descriptor_lookup_cache_ = new DescriptorLookupCache(); | 1780 descriptor_lookup_cache_ = new DescriptorLookupCache(); |
1776 unicode_cache_ = new UnicodeCache(); | 1781 unicode_cache_ = new UnicodeCache(); |
1777 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 1782 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); |
1778 write_input_buffer_ = new StringInputBuffer(); | 1783 write_input_buffer_ = new StringInputBuffer(); |
1779 global_handles_ = new GlobalHandles(this); | 1784 global_handles_ = new GlobalHandles(this); |
1780 bootstrapper_ = new Bootstrapper(); | 1785 bootstrapper_ = new Bootstrapper(); |
1781 handle_scope_implementer_ = new HandleScopeImplementer(this); | 1786 handle_scope_implementer_ = new HandleScopeImplementer(this); |
1782 stub_cache_ = new StubCache(this); | 1787 stub_cache_ = new StubCache(this); |
1783 regexp_stack_ = new RegExpStack(); | 1788 regexp_stack_ = new RegExpStack(); |
1784 regexp_stack_->isolate_ = this; | 1789 regexp_stack_->isolate_ = this; |
1790 date_cache_ = new DateCache(); | |
1785 | 1791 |
1786 // Enable logging before setting up the heap | 1792 // Enable logging before setting up the heap |
1787 logger_->SetUp(); | 1793 logger_->SetUp(); |
1788 | 1794 |
1789 CpuProfiler::SetUp(); | 1795 CpuProfiler::SetUp(); |
1790 HeapProfiler::SetUp(); | 1796 HeapProfiler::SetUp(); |
1791 | 1797 |
1792 // Initialize other runtime facilities | 1798 // Initialize other runtime facilities |
1793 #if defined(USE_SIMULATOR) | 1799 #if defined(USE_SIMULATOR) |
1794 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) | 1800 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1951 | 1957 |
1952 #ifdef DEBUG | 1958 #ifdef DEBUG |
1953 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1959 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1954 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1960 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
1955 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1961 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1956 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1962 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1957 #undef ISOLATE_FIELD_OFFSET | 1963 #undef ISOLATE_FIELD_OFFSET |
1958 #endif | 1964 #endif |
1959 | 1965 |
1960 } } // namespace v8::internal | 1966 } } // namespace v8::internal |
OLD | NEW |