| 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 write_iterator_(NULL), | 1543 write_iterator_(NULL), |
| 1544 global_handles_(NULL), | 1544 global_handles_(NULL), |
| 1545 eternal_handles_(NULL), | 1545 eternal_handles_(NULL), |
| 1546 thread_manager_(NULL), | 1546 thread_manager_(NULL), |
| 1547 fp_stubs_generated_(false), | 1547 fp_stubs_generated_(false), |
| 1548 has_installed_extensions_(false), | 1548 has_installed_extensions_(false), |
| 1549 string_tracker_(NULL), | 1549 string_tracker_(NULL), |
| 1550 regexp_stack_(NULL), | 1550 regexp_stack_(NULL), |
| 1551 date_cache_(NULL), | 1551 date_cache_(NULL), |
| 1552 code_stub_interface_descriptors_(NULL), | 1552 code_stub_interface_descriptors_(NULL), |
| 1553 call_descriptors_(NULL), |
| 1553 // TODO(bmeurer) Initialized lazily because it depends on flags; can | 1554 // TODO(bmeurer) Initialized lazily because it depends on flags; can |
| 1554 // be fixed once the default isolate cleanup is done. | 1555 // be fixed once the default isolate cleanup is done. |
| 1555 random_number_generator_(NULL), | 1556 random_number_generator_(NULL), |
| 1556 has_fatal_error_(false), | 1557 has_fatal_error_(false), |
| 1557 use_crankshaft_(true), | 1558 use_crankshaft_(true), |
| 1558 initialized_from_snapshot_(false), | 1559 initialized_from_snapshot_(false), |
| 1559 cpu_profiler_(NULL), | 1560 cpu_profiler_(NULL), |
| 1560 heap_profiler_(NULL), | 1561 heap_profiler_(NULL), |
| 1561 function_entry_hook_(NULL), | 1562 function_entry_hook_(NULL), |
| 1562 deferred_handles_head_(NULL), | 1563 deferred_handles_head_(NULL), |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1752 | 1753 |
| 1753 delete unicode_cache_; | 1754 delete unicode_cache_; |
| 1754 unicode_cache_ = NULL; | 1755 unicode_cache_ = NULL; |
| 1755 | 1756 |
| 1756 delete date_cache_; | 1757 delete date_cache_; |
| 1757 date_cache_ = NULL; | 1758 date_cache_ = NULL; |
| 1758 | 1759 |
| 1759 delete[] code_stub_interface_descriptors_; | 1760 delete[] code_stub_interface_descriptors_; |
| 1760 code_stub_interface_descriptors_ = NULL; | 1761 code_stub_interface_descriptors_ = NULL; |
| 1761 | 1762 |
| 1763 delete[] call_descriptors_; |
| 1764 call_descriptors_ = NULL; |
| 1765 |
| 1762 delete regexp_stack_; | 1766 delete regexp_stack_; |
| 1763 regexp_stack_ = NULL; | 1767 regexp_stack_ = NULL; |
| 1764 | 1768 |
| 1765 delete descriptor_lookup_cache_; | 1769 delete descriptor_lookup_cache_; |
| 1766 descriptor_lookup_cache_ = NULL; | 1770 descriptor_lookup_cache_ = NULL; |
| 1767 delete context_slot_cache_; | 1771 delete context_slot_cache_; |
| 1768 context_slot_cache_ = NULL; | 1772 context_slot_cache_ = NULL; |
| 1769 delete keyed_lookup_cache_; | 1773 delete keyed_lookup_cache_; |
| 1770 keyed_lookup_cache_ = NULL; | 1774 keyed_lookup_cache_ = NULL; |
| 1771 | 1775 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1942 global_handles_ = new GlobalHandles(this); | 1946 global_handles_ = new GlobalHandles(this); |
| 1943 eternal_handles_ = new EternalHandles(); | 1947 eternal_handles_ = new EternalHandles(); |
| 1944 bootstrapper_ = new Bootstrapper(this); | 1948 bootstrapper_ = new Bootstrapper(this); |
| 1945 handle_scope_implementer_ = new HandleScopeImplementer(this); | 1949 handle_scope_implementer_ = new HandleScopeImplementer(this); |
| 1946 stub_cache_ = new StubCache(this); | 1950 stub_cache_ = new StubCache(this); |
| 1947 regexp_stack_ = new RegExpStack(); | 1951 regexp_stack_ = new RegExpStack(); |
| 1948 regexp_stack_->isolate_ = this; | 1952 regexp_stack_->isolate_ = this; |
| 1949 date_cache_ = new DateCache(); | 1953 date_cache_ = new DateCache(); |
| 1950 code_stub_interface_descriptors_ = | 1954 code_stub_interface_descriptors_ = |
| 1951 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 1955 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; |
| 1956 call_descriptors_ = |
| 1957 new CallInterfaceDescriptor[NUMBER_OF_CALL_DESCRIPTORS]; |
| 1952 cpu_profiler_ = new CpuProfiler(this); | 1958 cpu_profiler_ = new CpuProfiler(this); |
| 1953 heap_profiler_ = new HeapProfiler(heap()); | 1959 heap_profiler_ = new HeapProfiler(heap()); |
| 1954 | 1960 |
| 1955 // Enable logging before setting up the heap | 1961 // Enable logging before setting up the heap |
| 1956 logger_->SetUp(this); | 1962 logger_->SetUp(this); |
| 1957 | 1963 |
| 1958 // Initialize other runtime facilities | 1964 // Initialize other runtime facilities |
| 1959 #if defined(USE_SIMULATOR) | 1965 #if defined(USE_SIMULATOR) |
| 1960 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_A64 || V8_TARGET_ARCH_MIPS | 1966 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_A64 || V8_TARGET_ARCH_MIPS |
| 1961 Simulator::Initialize(this); | 1967 Simulator::Initialize(this); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2103 BinaryOpWithAllocationSiteStub::InstallDescriptors(this); | 2109 BinaryOpWithAllocationSiteStub::InstallDescriptors(this); |
| 2104 CompareNilICStub::InitializeForIsolate(this); | 2110 CompareNilICStub::InitializeForIsolate(this); |
| 2105 ToBooleanStub::InitializeForIsolate(this); | 2111 ToBooleanStub::InitializeForIsolate(this); |
| 2106 ArrayConstructorStubBase::InstallDescriptors(this); | 2112 ArrayConstructorStubBase::InstallDescriptors(this); |
| 2107 InternalArrayConstructorStubBase::InstallDescriptors(this); | 2113 InternalArrayConstructorStubBase::InstallDescriptors(this); |
| 2108 FastNewClosureStub::InstallDescriptors(this); | 2114 FastNewClosureStub::InstallDescriptors(this); |
| 2109 NumberToStringStub::InstallDescriptors(this); | 2115 NumberToStringStub::InstallDescriptors(this); |
| 2110 NewStringAddStub::InstallDescriptors(this); | 2116 NewStringAddStub::InstallDescriptors(this); |
| 2111 } | 2117 } |
| 2112 | 2118 |
| 2119 CallDescriptors::InitializeForIsolate(this); |
| 2120 |
| 2113 initialized_from_snapshot_ = (des != NULL); | 2121 initialized_from_snapshot_ = (des != NULL); |
| 2114 | 2122 |
| 2115 return true; | 2123 return true; |
| 2116 } | 2124 } |
| 2117 | 2125 |
| 2118 | 2126 |
| 2119 // Initialized lazily to allow early | 2127 // Initialized lazily to allow early |
| 2120 // v8::V8::SetAddHistogramSampleFunction calls. | 2128 // v8::V8::SetAddHistogramSampleFunction calls. |
| 2121 StatsTable* Isolate::stats_table() { | 2129 StatsTable* Isolate::stats_table() { |
| 2122 if (stats_table_ == NULL) { | 2130 if (stats_table_ == NULL) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2280 return initial_object_proto->GetPrototype()->IsNull(); | 2288 return initial_object_proto->GetPrototype()->IsNull(); |
| 2281 } | 2289 } |
| 2282 | 2290 |
| 2283 | 2291 |
| 2284 CodeStubInterfaceDescriptor* | 2292 CodeStubInterfaceDescriptor* |
| 2285 Isolate::code_stub_interface_descriptor(int index) { | 2293 Isolate::code_stub_interface_descriptor(int index) { |
| 2286 return code_stub_interface_descriptors_ + index; | 2294 return code_stub_interface_descriptors_ + index; |
| 2287 } | 2295 } |
| 2288 | 2296 |
| 2289 | 2297 |
| 2298 CallInterfaceDescriptor* |
| 2299 Isolate::call_descriptor(CallDescriptorKey index) { |
| 2300 ASSERT(0 <= index && index < NUMBER_OF_CALL_DESCRIPTORS); |
| 2301 return &call_descriptors_[index]; |
| 2302 } |
| 2303 |
| 2304 |
| 2290 Object* Isolate::FindCodeObject(Address a) { | 2305 Object* Isolate::FindCodeObject(Address a) { |
| 2291 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); | 2306 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); |
| 2292 } | 2307 } |
| 2293 | 2308 |
| 2294 | 2309 |
| 2295 #ifdef DEBUG | 2310 #ifdef DEBUG |
| 2296 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2311 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2297 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2312 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2298 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2313 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2299 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2314 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2300 #undef ISOLATE_FIELD_OFFSET | 2315 #undef ISOLATE_FIELD_OFFSET |
| 2301 #endif | 2316 #endif |
| 2302 | 2317 |
| 2303 } } // namespace v8::internal | 2318 } } // namespace v8::internal |
| OLD | NEW |