| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1751 | 1752 | 
| 1752   delete unicode_cache_; | 1753   delete unicode_cache_; | 
| 1753   unicode_cache_ = NULL; | 1754   unicode_cache_ = NULL; | 
| 1754 | 1755 | 
| 1755   delete date_cache_; | 1756   delete date_cache_; | 
| 1756   date_cache_ = NULL; | 1757   date_cache_ = NULL; | 
| 1757 | 1758 | 
| 1758   delete[] code_stub_interface_descriptors_; | 1759   delete[] code_stub_interface_descriptors_; | 
| 1759   code_stub_interface_descriptors_ = NULL; | 1760   code_stub_interface_descriptors_ = NULL; | 
| 1760 | 1761 | 
|  | 1762   delete[] call_descriptors_; | 
|  | 1763   call_descriptors_ = NULL; | 
|  | 1764 | 
| 1761   delete regexp_stack_; | 1765   delete regexp_stack_; | 
| 1762   regexp_stack_ = NULL; | 1766   regexp_stack_ = NULL; | 
| 1763 | 1767 | 
| 1764   delete descriptor_lookup_cache_; | 1768   delete descriptor_lookup_cache_; | 
| 1765   descriptor_lookup_cache_ = NULL; | 1769   descriptor_lookup_cache_ = NULL; | 
| 1766   delete context_slot_cache_; | 1770   delete context_slot_cache_; | 
| 1767   context_slot_cache_ = NULL; | 1771   context_slot_cache_ = NULL; | 
| 1768   delete keyed_lookup_cache_; | 1772   delete keyed_lookup_cache_; | 
| 1769   keyed_lookup_cache_ = NULL; | 1773   keyed_lookup_cache_ = NULL; | 
| 1770 | 1774 | 
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1941   global_handles_ = new GlobalHandles(this); | 1945   global_handles_ = new GlobalHandles(this); | 
| 1942   eternal_handles_ = new EternalHandles(); | 1946   eternal_handles_ = new EternalHandles(); | 
| 1943   bootstrapper_ = new Bootstrapper(this); | 1947   bootstrapper_ = new Bootstrapper(this); | 
| 1944   handle_scope_implementer_ = new HandleScopeImplementer(this); | 1948   handle_scope_implementer_ = new HandleScopeImplementer(this); | 
| 1945   stub_cache_ = new StubCache(this); | 1949   stub_cache_ = new StubCache(this); | 
| 1946   regexp_stack_ = new RegExpStack(); | 1950   regexp_stack_ = new RegExpStack(); | 
| 1947   regexp_stack_->isolate_ = this; | 1951   regexp_stack_->isolate_ = this; | 
| 1948   date_cache_ = new DateCache(); | 1952   date_cache_ = new DateCache(); | 
| 1949   code_stub_interface_descriptors_ = | 1953   code_stub_interface_descriptors_ = | 
| 1950       new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 1954       new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 
|  | 1955   call_descriptors_ = | 
|  | 1956       new CallInterfaceDescriptor[NUMBER_OF_CALL_DESCRIPTORS]; | 
| 1951   cpu_profiler_ = new CpuProfiler(this); | 1957   cpu_profiler_ = new CpuProfiler(this); | 
| 1952   heap_profiler_ = new HeapProfiler(heap()); | 1958   heap_profiler_ = new HeapProfiler(heap()); | 
| 1953 | 1959 | 
| 1954   // Enable logging before setting up the heap | 1960   // Enable logging before setting up the heap | 
| 1955   logger_->SetUp(this); | 1961   logger_->SetUp(this); | 
| 1956 | 1962 | 
| 1957   // Initialize other runtime facilities | 1963   // Initialize other runtime facilities | 
| 1958 #if defined(USE_SIMULATOR) | 1964 #if defined(USE_SIMULATOR) | 
| 1959 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS | 1965 #if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_MIPS | 
| 1960   Simulator::Initialize(this); | 1966   Simulator::Initialize(this); | 
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2101     BinaryOpICStub::InstallDescriptors(this); | 2107     BinaryOpICStub::InstallDescriptors(this); | 
| 2102     CompareNilICStub::InitializeForIsolate(this); | 2108     CompareNilICStub::InitializeForIsolate(this); | 
| 2103     ToBooleanStub::InitializeForIsolate(this); | 2109     ToBooleanStub::InitializeForIsolate(this); | 
| 2104     ArrayConstructorStubBase::InstallDescriptors(this); | 2110     ArrayConstructorStubBase::InstallDescriptors(this); | 
| 2105     InternalArrayConstructorStubBase::InstallDescriptors(this); | 2111     InternalArrayConstructorStubBase::InstallDescriptors(this); | 
| 2106     FastNewClosureStub::InstallDescriptors(this); | 2112     FastNewClosureStub::InstallDescriptors(this); | 
| 2107     NumberToStringStub::InstallDescriptors(this); | 2113     NumberToStringStub::InstallDescriptors(this); | 
| 2108     NewStringAddStub::InstallDescriptors(this); | 2114     NewStringAddStub::InstallDescriptors(this); | 
| 2109   } | 2115   } | 
| 2110 | 2116 | 
|  | 2117   CallDescriptors::InitializeForIsolate(this); | 
|  | 2118 | 
| 2111   initialized_from_snapshot_ = (des != NULL); | 2119   initialized_from_snapshot_ = (des != NULL); | 
| 2112 | 2120 | 
| 2113   return true; | 2121   return true; | 
| 2114 } | 2122 } | 
| 2115 | 2123 | 
| 2116 | 2124 | 
| 2117 // Initialized lazily to allow early | 2125 // Initialized lazily to allow early | 
| 2118 // v8::V8::SetAddHistogramSampleFunction calls. | 2126 // v8::V8::SetAddHistogramSampleFunction calls. | 
| 2119 StatsTable* Isolate::stats_table() { | 2127 StatsTable* Isolate::stats_table() { | 
| 2120   if (stats_table_ == NULL) { | 2128   if (stats_table_ == NULL) { | 
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2278   return initial_object_proto->GetPrototype()->IsNull(); | 2286   return initial_object_proto->GetPrototype()->IsNull(); | 
| 2279 } | 2287 } | 
| 2280 | 2288 | 
| 2281 | 2289 | 
| 2282 CodeStubInterfaceDescriptor* | 2290 CodeStubInterfaceDescriptor* | 
| 2283     Isolate::code_stub_interface_descriptor(int index) { | 2291     Isolate::code_stub_interface_descriptor(int index) { | 
| 2284   return code_stub_interface_descriptors_ + index; | 2292   return code_stub_interface_descriptors_ + index; | 
| 2285 } | 2293 } | 
| 2286 | 2294 | 
| 2287 | 2295 | 
|  | 2296 CallInterfaceDescriptor* | 
|  | 2297     Isolate::call_descriptor(CallDescriptorKey index) { | 
|  | 2298   ASSERT(0 <= index && index < NUMBER_OF_CALL_DESCRIPTORS); | 
|  | 2299   return &call_descriptors_[index]; | 
|  | 2300 } | 
|  | 2301 | 
|  | 2302 | 
| 2288 Object* Isolate::FindCodeObject(Address a) { | 2303 Object* Isolate::FindCodeObject(Address a) { | 
| 2289   return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); | 2304   return inner_pointer_to_code_cache()->GcSafeFindCodeForInnerPointer(a); | 
| 2290 } | 2305 } | 
| 2291 | 2306 | 
| 2292 | 2307 | 
| 2293 #ifdef DEBUG | 2308 #ifdef DEBUG | 
| 2294 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \ | 2309 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \ | 
| 2295 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2310 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 
| 2296 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2311 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 
| 2297 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2312 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 
| 2298 #undef ISOLATE_FIELD_OFFSET | 2313 #undef ISOLATE_FIELD_OFFSET | 
| 2299 #endif | 2314 #endif | 
| 2300 | 2315 | 
| 2301 } }  // namespace v8::internal | 2316 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|