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

Side by Side Diff: src/isolate.cc

Issue 544123002: Do not cache CodeStubInterfaceDescriptor on the isolate. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 1486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 runtime_zone_(this), 1497 runtime_zone_(this),
1498 inner_pointer_to_code_cache_(NULL), 1498 inner_pointer_to_code_cache_(NULL),
1499 write_iterator_(NULL), 1499 write_iterator_(NULL),
1500 global_handles_(NULL), 1500 global_handles_(NULL),
1501 eternal_handles_(NULL), 1501 eternal_handles_(NULL),
1502 thread_manager_(NULL), 1502 thread_manager_(NULL),
1503 has_installed_extensions_(false), 1503 has_installed_extensions_(false),
1504 string_tracker_(NULL), 1504 string_tracker_(NULL),
1505 regexp_stack_(NULL), 1505 regexp_stack_(NULL),
1506 date_cache_(NULL), 1506 date_cache_(NULL),
1507 code_stub_interface_descriptors_(NULL),
1508 call_descriptor_data_(NULL), 1507 call_descriptor_data_(NULL),
1509 // TODO(bmeurer) Initialized lazily because it depends on flags; can 1508 // TODO(bmeurer) Initialized lazily because it depends on flags; can
1510 // be fixed once the default isolate cleanup is done. 1509 // be fixed once the default isolate cleanup is done.
1511 random_number_generator_(NULL), 1510 random_number_generator_(NULL),
1512 serializer_enabled_(false), 1511 serializer_enabled_(false),
1513 has_fatal_error_(false), 1512 has_fatal_error_(false),
1514 initialized_from_snapshot_(false), 1513 initialized_from_snapshot_(false),
1515 cpu_profiler_(NULL), 1514 cpu_profiler_(NULL),
1516 heap_profiler_(NULL), 1515 heap_profiler_(NULL),
1517 function_entry_hook_(NULL), 1516 function_entry_hook_(NULL),
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1694 1693
1695 delete entry_stack_; 1694 delete entry_stack_;
1696 entry_stack_ = NULL; 1695 entry_stack_ = NULL;
1697 1696
1698 delete unicode_cache_; 1697 delete unicode_cache_;
1699 unicode_cache_ = NULL; 1698 unicode_cache_ = NULL;
1700 1699
1701 delete date_cache_; 1700 delete date_cache_;
1702 date_cache_ = NULL; 1701 date_cache_ = NULL;
1703 1702
1704 delete[] code_stub_interface_descriptors_;
1705 code_stub_interface_descriptors_ = NULL;
1706
1707 delete[] call_descriptor_data_; 1703 delete[] call_descriptor_data_;
1708 call_descriptor_data_ = NULL; 1704 call_descriptor_data_ = NULL;
1709 1705
1710 delete regexp_stack_; 1706 delete regexp_stack_;
1711 regexp_stack_ = NULL; 1707 regexp_stack_ = NULL;
1712 1708
1713 delete descriptor_lookup_cache_; 1709 delete descriptor_lookup_cache_;
1714 descriptor_lookup_cache_ = NULL; 1710 descriptor_lookup_cache_ = NULL;
1715 delete context_slot_cache_; 1711 delete context_slot_cache_;
1716 context_slot_cache_ = NULL; 1712 context_slot_cache_ = NULL;
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 write_iterator_ = new ConsStringIteratorOp(); 1869 write_iterator_ = new ConsStringIteratorOp();
1874 global_handles_ = new GlobalHandles(this); 1870 global_handles_ = new GlobalHandles(this);
1875 eternal_handles_ = new EternalHandles(); 1871 eternal_handles_ = new EternalHandles();
1876 bootstrapper_ = new Bootstrapper(this); 1872 bootstrapper_ = new Bootstrapper(this);
1877 handle_scope_implementer_ = new HandleScopeImplementer(this); 1873 handle_scope_implementer_ = new HandleScopeImplementer(this);
1878 stub_cache_ = new StubCache(this); 1874 stub_cache_ = new StubCache(this);
1879 materialized_object_store_ = new MaterializedObjectStore(this); 1875 materialized_object_store_ = new MaterializedObjectStore(this);
1880 regexp_stack_ = new RegExpStack(); 1876 regexp_stack_ = new RegExpStack();
1881 regexp_stack_->isolate_ = this; 1877 regexp_stack_->isolate_ = this;
1882 date_cache_ = new DateCache(); 1878 date_cache_ = new DateCache();
1883 code_stub_interface_descriptors_ =
1884 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
1885 call_descriptor_data_ = 1879 call_descriptor_data_ =
1886 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS]; 1880 new CallInterfaceDescriptorData[CallDescriptors::NUMBER_OF_DESCRIPTORS];
1887 cpu_profiler_ = new CpuProfiler(this); 1881 cpu_profiler_ = new CpuProfiler(this);
1888 heap_profiler_ = new HeapProfiler(heap()); 1882 heap_profiler_ = new HeapProfiler(heap());
1889 1883
1890 // Enable logging before setting up the heap 1884 // Enable logging before setting up the heap
1891 logger_->SetUp(this); 1885 logger_->SetUp(this);
1892 1886
1893 // Initialize other runtime facilities 1887 // Initialize other runtime facilities
1894 #if defined(USE_SIMULATOR) 1888 #if defined(USE_SIMULATOR)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2027 kDeoptTableSerializeEntryCount - 1); 2021 kDeoptTableSerializeEntryCount - 1);
2028 } 2022 }
2029 2023
2030 if (!serializer_enabled()) { 2024 if (!serializer_enabled()) {
2031 // Ensure that all stubs which need to be generated ahead of time, but 2025 // Ensure that all stubs which need to be generated ahead of time, but
2032 // cannot be serialized into the snapshot have been generated. 2026 // cannot be serialized into the snapshot have been generated.
2033 HandleScope scope(this); 2027 HandleScope scope(this);
2034 CodeStub::GenerateFPStubs(this); 2028 CodeStub::GenerateFPStubs(this);
2035 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this); 2029 StoreBufferOverflowStub::GenerateFixedRegStubsAheadOfTime(this);
2036 StubFailureTrampolineStub::GenerateAheadOfTime(this); 2030 StubFailureTrampolineStub::GenerateAheadOfTime(this);
2037 // Ensure interface descriptors are initialized even when stubs have been
2038 // deserialized out of the snapshot without using the graph builder.
2039 FastCloneShallowArrayStub::InstallDescriptors(this);
2040 BinaryOpICStub::InstallDescriptors(this);
2041 BinaryOpWithAllocationSiteStub::InstallDescriptors(this);
2042 CompareNilICStub::InstallDescriptors(this);
2043 ToBooleanStub::InstallDescriptors(this);
2044 ToNumberStub::InstallDescriptors(this);
2045 ArrayConstructorStubBase::InstallDescriptors(this);
2046 InternalArrayConstructorStubBase::InstallDescriptors(this);
2047 FastNewClosureStub::InstallDescriptors(this);
2048 FastNewContextStub::InstallDescriptors(this);
2049 NumberToStringStub::InstallDescriptors(this);
2050 StringAddStub::InstallDescriptors(this);
2051 RegExpConstructResultStub::InstallDescriptors(this);
2052 KeyedLoadGenericStub::InstallDescriptors(this);
2053 StoreFieldStub::InstallDescriptors(this);
2054 LoadFastElementStub::InstallDescriptors(this);
2055 } 2031 }
2056 2032
2057 initialized_from_snapshot_ = (des != NULL); 2033 initialized_from_snapshot_ = (des != NULL);
2058 2034
2059 return true; 2035 return true;
2060 } 2036 }
2061 2037
2062 2038
2063 // Initialized lazily to allow early 2039 // Initialized lazily to allow early
2064 // v8::V8::SetAddHistogramSampleFunction calls. 2040 // v8::V8::SetAddHistogramSampleFunction calls.
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2224 } 2200 }
2225 if (initial_object_proto->elements() != heap()->empty_fixed_array()) { 2201 if (initial_object_proto->elements() != heap()->empty_fixed_array()) {
2226 return false; 2202 return false;
2227 } 2203 }
2228 2204
2229 iter.Advance(); 2205 iter.Advance();
2230 return iter.IsAtEnd(); 2206 return iter.IsAtEnd();
2231 } 2207 }
2232 2208
2233 2209
2234 CodeStubInterfaceDescriptor*
2235 Isolate::code_stub_interface_descriptor(int index) {
2236 return code_stub_interface_descriptors_ + index;
2237 }
2238
2239
2240 CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) { 2210 CallInterfaceDescriptorData* Isolate::call_descriptor_data(int index) {
2241 DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS); 2211 DCHECK(0 <= index && index < CallDescriptors::NUMBER_OF_DESCRIPTORS);
2242 return &call_descriptor_data_[index]; 2212 return &call_descriptor_data_[index];
2243 } 2213 }
2244 2214
2245 2215
2246 Object* Isolate::FindCodeObject(Address a) { 2216 Object* Isolate::FindCodeObject(Address a) {
2247 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); 2217 return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a);
2248 } 2218 }
2249 2219
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 if (prev_ && prev_->Intercept(flag)) return true; 2381 if (prev_ && prev_->Intercept(flag)) return true;
2412 // Then check whether this scope intercepts. 2382 // Then check whether this scope intercepts.
2413 if ((flag & intercept_mask_)) { 2383 if ((flag & intercept_mask_)) {
2414 intercepted_flags_ |= flag; 2384 intercepted_flags_ |= flag;
2415 return true; 2385 return true;
2416 } 2386 }
2417 return false; 2387 return false;
2418 } 2388 }
2419 2389
2420 } } // namespace v8::internal 2390 } } // namespace v8::internal
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/isolate.h ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698