| 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1731       capture_stack_trace_for_uncaught_exceptions_(false), | 1731       capture_stack_trace_for_uncaught_exceptions_(false), | 
| 1732       stack_trace_for_uncaught_exceptions_frame_limit_(0), | 1732       stack_trace_for_uncaught_exceptions_frame_limit_(0), | 
| 1733       stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), | 1733       stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), | 
| 1734       transcendental_cache_(NULL), | 1734       transcendental_cache_(NULL), | 
| 1735       memory_allocator_(NULL), | 1735       memory_allocator_(NULL), | 
| 1736       keyed_lookup_cache_(NULL), | 1736       keyed_lookup_cache_(NULL), | 
| 1737       context_slot_cache_(NULL), | 1737       context_slot_cache_(NULL), | 
| 1738       descriptor_lookup_cache_(NULL), | 1738       descriptor_lookup_cache_(NULL), | 
| 1739       handle_scope_implementer_(NULL), | 1739       handle_scope_implementer_(NULL), | 
| 1740       unicode_cache_(NULL), | 1740       unicode_cache_(NULL), | 
| 1741       runtime_zone_(this), |  | 
| 1742       in_use_list_(0), | 1741       in_use_list_(0), | 
| 1743       free_list_(0), | 1742       free_list_(0), | 
| 1744       preallocated_storage_preallocated_(false), | 1743       preallocated_storage_preallocated_(false), | 
| 1745       inner_pointer_to_code_cache_(NULL), | 1744       inner_pointer_to_code_cache_(NULL), | 
| 1746       write_iterator_(NULL), | 1745       write_iterator_(NULL), | 
| 1747       global_handles_(NULL), | 1746       global_handles_(NULL), | 
| 1748       context_switcher_(NULL), | 1747       context_switcher_(NULL), | 
| 1749       thread_manager_(NULL), | 1748       thread_manager_(NULL), | 
| 1750       fp_stubs_generated_(false), | 1749       fp_stubs_generated_(false), | 
| 1751       has_installed_extensions_(false), | 1750       has_installed_extensions_(false), | 
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1928 void Isolate::SetIsolateThreadLocals(Isolate* isolate, | 1927 void Isolate::SetIsolateThreadLocals(Isolate* isolate, | 
| 1929                                      PerIsolateThreadData* data) { | 1928                                      PerIsolateThreadData* data) { | 
| 1930   Thread::SetThreadLocal(isolate_key_, isolate); | 1929   Thread::SetThreadLocal(isolate_key_, isolate); | 
| 1931   Thread::SetThreadLocal(per_isolate_thread_data_key_, data); | 1930   Thread::SetThreadLocal(per_isolate_thread_data_key_, data); | 
| 1932 } | 1931 } | 
| 1933 | 1932 | 
| 1934 | 1933 | 
| 1935 Isolate::~Isolate() { | 1934 Isolate::~Isolate() { | 
| 1936   TRACE_ISOLATE(destructor); | 1935   TRACE_ISOLATE(destructor); | 
| 1937 | 1936 | 
| 1938   // Has to be called while counters_ are still alive. |  | 
| 1939   runtime_zone_.DeleteKeptSegment(); |  | 
| 1940 |  | 
| 1941   delete[] assembler_spare_buffer_; | 1937   delete[] assembler_spare_buffer_; | 
| 1942   assembler_spare_buffer_ = NULL; | 1938   assembler_spare_buffer_ = NULL; | 
| 1943 | 1939 | 
| 1944   delete unicode_cache_; | 1940   delete unicode_cache_; | 
| 1945   unicode_cache_ = NULL; | 1941   unicode_cache_ = NULL; | 
| 1946 | 1942 | 
| 1947   delete date_cache_; | 1943   delete date_cache_; | 
| 1948   date_cache_ = NULL; | 1944   date_cache_ = NULL; | 
| 1949 | 1945 | 
| 1950   delete[] code_stub_interface_descriptors_; | 1946   delete[] code_stub_interface_descriptors_; | 
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2107   transcendental_cache_ = new TranscendentalCache(); | 2103   transcendental_cache_ = new TranscendentalCache(); | 
| 2108   keyed_lookup_cache_ = new KeyedLookupCache(); | 2104   keyed_lookup_cache_ = new KeyedLookupCache(); | 
| 2109   context_slot_cache_ = new ContextSlotCache(); | 2105   context_slot_cache_ = new ContextSlotCache(); | 
| 2110   descriptor_lookup_cache_ = new DescriptorLookupCache(); | 2106   descriptor_lookup_cache_ = new DescriptorLookupCache(); | 
| 2111   unicode_cache_ = new UnicodeCache(); | 2107   unicode_cache_ = new UnicodeCache(); | 
| 2112   inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 2108   inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); | 
| 2113   write_iterator_ = new ConsStringIteratorOp(); | 2109   write_iterator_ = new ConsStringIteratorOp(); | 
| 2114   global_handles_ = new GlobalHandles(this); | 2110   global_handles_ = new GlobalHandles(this); | 
| 2115   bootstrapper_ = new Bootstrapper(this); | 2111   bootstrapper_ = new Bootstrapper(this); | 
| 2116   handle_scope_implementer_ = new HandleScopeImplementer(this); | 2112   handle_scope_implementer_ = new HandleScopeImplementer(this); | 
| 2117   stub_cache_ = new StubCache(this, runtime_zone()); | 2113   stub_cache_ = new StubCache(this); | 
| 2118   regexp_stack_ = new RegExpStack(); | 2114   regexp_stack_ = new RegExpStack(); | 
| 2119   regexp_stack_->isolate_ = this; | 2115   regexp_stack_->isolate_ = this; | 
| 2120   date_cache_ = new DateCache(); | 2116   date_cache_ = new DateCache(); | 
| 2121   code_stub_interface_descriptors_ = | 2117   code_stub_interface_descriptors_ = | 
| 2122       new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 2118       new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; | 
| 2123   cpu_profiler_ = new CpuProfiler(this); | 2119   cpu_profiler_ = new CpuProfiler(this); | 
| 2124   heap_profiler_ = new HeapProfiler(heap()); | 2120   heap_profiler_ = new HeapProfiler(heap()); | 
| 2125 | 2121 | 
| 2126   // Enable logging before setting up the heap | 2122   // Enable logging before setting up the heap | 
| 2127   logger_->SetUp(this); | 2123   logger_->SetUp(this); | 
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2443 | 2439 | 
| 2444 #ifdef DEBUG | 2440 #ifdef DEBUG | 
| 2445 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \ | 2441 #define ISOLATE_FIELD_OFFSET(type, name, ignored)                       \ | 
| 2446 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2442 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 
| 2447 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2443 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 
| 2448 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2444 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 
| 2449 #undef ISOLATE_FIELD_OFFSET | 2445 #undef ISOLATE_FIELD_OFFSET | 
| 2450 #endif | 2446 #endif | 
| 2451 | 2447 | 
| 2452 } }  // namespace v8::internal | 2448 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|