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

Side by Side Diff: src/isolate.cc

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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
« no previous file with comments | « src/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 capture_stack_trace_for_uncaught_exceptions_(false), 1735 capture_stack_trace_for_uncaught_exceptions_(false),
1736 stack_trace_for_uncaught_exceptions_frame_limit_(0), 1736 stack_trace_for_uncaught_exceptions_frame_limit_(0),
1737 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview), 1737 stack_trace_for_uncaught_exceptions_options_(StackTrace::kOverview),
1738 transcendental_cache_(NULL), 1738 transcendental_cache_(NULL),
1739 memory_allocator_(NULL), 1739 memory_allocator_(NULL),
1740 keyed_lookup_cache_(NULL), 1740 keyed_lookup_cache_(NULL),
1741 context_slot_cache_(NULL), 1741 context_slot_cache_(NULL),
1742 descriptor_lookup_cache_(NULL), 1742 descriptor_lookup_cache_(NULL),
1743 handle_scope_implementer_(NULL), 1743 handle_scope_implementer_(NULL),
1744 unicode_cache_(NULL), 1744 unicode_cache_(NULL),
1745 runtime_zone_(this),
1746 in_use_list_(0), 1745 in_use_list_(0),
1747 free_list_(0), 1746 free_list_(0),
1748 preallocated_storage_preallocated_(false), 1747 preallocated_storage_preallocated_(false),
1749 inner_pointer_to_code_cache_(NULL), 1748 inner_pointer_to_code_cache_(NULL),
1750 write_iterator_(NULL), 1749 write_iterator_(NULL),
1751 global_handles_(NULL), 1750 global_handles_(NULL),
1752 context_switcher_(NULL), 1751 context_switcher_(NULL),
1753 thread_manager_(NULL), 1752 thread_manager_(NULL),
1754 fp_stubs_generated_(false), 1753 fp_stubs_generated_(false),
1755 has_installed_extensions_(false), 1754 has_installed_extensions_(false),
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1933 void Isolate::SetIsolateThreadLocals(Isolate* isolate, 1932 void Isolate::SetIsolateThreadLocals(Isolate* isolate,
1934 PerIsolateThreadData* data) { 1933 PerIsolateThreadData* data) {
1935 Thread::SetThreadLocal(isolate_key_, isolate); 1934 Thread::SetThreadLocal(isolate_key_, isolate);
1936 Thread::SetThreadLocal(per_isolate_thread_data_key_, data); 1935 Thread::SetThreadLocal(per_isolate_thread_data_key_, data);
1937 } 1936 }
1938 1937
1939 1938
1940 Isolate::~Isolate() { 1939 Isolate::~Isolate() {
1941 TRACE_ISOLATE(destructor); 1940 TRACE_ISOLATE(destructor);
1942 1941
1943 // Has to be called while counters_ are still alive.
1944 runtime_zone_.DeleteKeptSegment();
1945
1946 delete[] assembler_spare_buffer_; 1942 delete[] assembler_spare_buffer_;
1947 assembler_spare_buffer_ = NULL; 1943 assembler_spare_buffer_ = NULL;
1948 1944
1949 delete unicode_cache_; 1945 delete unicode_cache_;
1950 unicode_cache_ = NULL; 1946 unicode_cache_ = NULL;
1951 1947
1952 delete date_cache_; 1948 delete date_cache_;
1953 date_cache_ = NULL; 1949 date_cache_ = NULL;
1954 1950
1955 delete[] code_stub_interface_descriptors_; 1951 delete[] code_stub_interface_descriptors_;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2097 code_range_ = new CodeRange(this); 2093 code_range_ = new CodeRange(this);
2098 2094
2099 // Safe after setting Heap::isolate_, initializing StackGuard and 2095 // Safe after setting Heap::isolate_, initializing StackGuard and
2100 // ensuring that Isolate::Current() == this. 2096 // ensuring that Isolate::Current() == this.
2101 heap_.SetStackLimits(); 2097 heap_.SetStackLimits();
2102 2098
2103 #define ASSIGN_ELEMENT(CamelName, hacker_name) \ 2099 #define ASSIGN_ELEMENT(CamelName, hacker_name) \
2104 isolate_addresses_[Isolate::k##CamelName##Address] = \ 2100 isolate_addresses_[Isolate::k##CamelName##Address] = \
2105 reinterpret_cast<Address>(hacker_name##_address()); 2101 reinterpret_cast<Address>(hacker_name##_address());
2106 FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT) 2102 FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT)
2107 #undef C 2103 #undef ASSIGN_ELEMENT
2108 2104
2109 string_tracker_ = new StringTracker(); 2105 string_tracker_ = new StringTracker();
2110 string_tracker_->isolate_ = this; 2106 string_tracker_->isolate_ = this;
2111 compilation_cache_ = new CompilationCache(this); 2107 compilation_cache_ = new CompilationCache(this);
2112 transcendental_cache_ = new TranscendentalCache(); 2108 transcendental_cache_ = new TranscendentalCache();
2113 keyed_lookup_cache_ = new KeyedLookupCache(); 2109 keyed_lookup_cache_ = new KeyedLookupCache();
2114 context_slot_cache_ = new ContextSlotCache(); 2110 context_slot_cache_ = new ContextSlotCache();
2115 descriptor_lookup_cache_ = new DescriptorLookupCache(); 2111 descriptor_lookup_cache_ = new DescriptorLookupCache();
2116 unicode_cache_ = new UnicodeCache(); 2112 unicode_cache_ = new UnicodeCache();
2117 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this); 2113 inner_pointer_to_code_cache_ = new InnerPointerToCodeCache(this);
2118 write_iterator_ = new ConsStringIteratorOp(); 2114 write_iterator_ = new ConsStringIteratorOp();
2119 global_handles_ = new GlobalHandles(this); 2115 global_handles_ = new GlobalHandles(this);
2120 bootstrapper_ = new Bootstrapper(this); 2116 bootstrapper_ = new Bootstrapper(this);
2121 handle_scope_implementer_ = new HandleScopeImplementer(this); 2117 handle_scope_implementer_ = new HandleScopeImplementer(this);
2122 stub_cache_ = new StubCache(this, runtime_zone()); 2118 stub_cache_ = new StubCache(this);
2123 regexp_stack_ = new RegExpStack(); 2119 regexp_stack_ = new RegExpStack();
2124 regexp_stack_->isolate_ = this; 2120 regexp_stack_->isolate_ = this;
2125 date_cache_ = new DateCache(); 2121 date_cache_ = new DateCache();
2126 code_stub_interface_descriptors_ = 2122 code_stub_interface_descriptors_ =
2127 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; 2123 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
2128 cpu_profiler_ = new CpuProfiler(this); 2124 cpu_profiler_ = new CpuProfiler(this);
2129 heap_profiler_ = new HeapProfiler(heap()); 2125 heap_profiler_ = new HeapProfiler(heap());
2130 2126
2131 // Enable logging before setting up the heap 2127 // Enable logging before setting up the heap
2132 logger_->SetUp(this); 2128 logger_->SetUp(this);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2215 2211
2216 // If we are deserializing, log non-function code objects and compiled 2212 // If we are deserializing, log non-function code objects and compiled
2217 // functions found in the snapshot. 2213 // functions found in the snapshot.
2218 if (!create_heap_objects && 2214 if (!create_heap_objects &&
2219 (FLAG_log_code || FLAG_ll_prof || logger_->is_logging_code_events())) { 2215 (FLAG_log_code || FLAG_ll_prof || logger_->is_logging_code_events())) {
2220 HandleScope scope(this); 2216 HandleScope scope(this);
2221 LOG(this, LogCodeObjects()); 2217 LOG(this, LogCodeObjects());
2222 LOG(this, LogCompiledFunctions()); 2218 LOG(this, LogCompiledFunctions());
2223 } 2219 }
2224 2220
2225 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, state_)),
2226 Internals::kIsolateStateOffset);
2227 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)), 2221 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, embedder_data_)),
2228 Internals::kIsolateEmbedderDataOffset); 2222 Internals::kIsolateEmbedderDataOffset);
2229 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)), 2223 CHECK_EQ(static_cast<int>(OFFSET_OF(Isolate, heap_.roots_)),
2230 Internals::kIsolateRootsOffset); 2224 Internals::kIsolateRootsOffset);
2231 2225
2232 state_ = INITIALIZED; 2226 state_ = INITIALIZED;
2233 time_millis_at_init_ = OS::TimeCurrentMillis(); 2227 time_millis_at_init_ = OS::TimeCurrentMillis();
2234 2228
2235 if (!create_heap_objects) { 2229 if (!create_heap_objects) {
2236 // Now that the heap is consistent, it's OK to generate the code for the 2230 // Now that the heap is consistent, it's OK to generate the code for the
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 2445
2452 #ifdef DEBUG 2446 #ifdef DEBUG
2453 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2447 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2454 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2448 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2455 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2449 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2456 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2450 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2457 #undef ISOLATE_FIELD_OFFSET 2451 #undef ISOLATE_FIELD_OFFSET
2458 #endif 2452 #endif
2459 2453
2460 } } // namespace v8::internal 2454 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/json-parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698