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

Side by Side Diff: src/isolate.cc

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/jsregexp.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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 deferred != NULL; 517 deferred != NULL;
518 deferred = deferred->next_) { 518 deferred = deferred->next_) {
519 deferred->Iterate(visitor); 519 deferred->Iterate(visitor);
520 } 520 }
521 } 521 }
522 522
523 523
524 #ifdef DEBUG 524 #ifdef DEBUG
525 bool Isolate::IsDeferredHandle(Object** handle) { 525 bool Isolate::IsDeferredHandle(Object** handle) {
526 // Each DeferredHandles instance keeps the handles to one job in the 526 // Each DeferredHandles instance keeps the handles to one job in the
527 // parallel recompilation queue, containing a list of blocks. Each block 527 // concurrent recompilation queue, containing a list of blocks. Each block
528 // contains kHandleBlockSize handles except for the first block, which may 528 // contains kHandleBlockSize handles except for the first block, which may
529 // not be fully filled. 529 // not be fully filled.
530 // We iterate through all the blocks to see whether the argument handle 530 // We iterate through all the blocks to see whether the argument handle
531 // belongs to one of the blocks. If so, it is deferred. 531 // belongs to one of the blocks. If so, it is deferred.
532 for (DeferredHandles* deferred = deferred_handles_head_; 532 for (DeferredHandles* deferred = deferred_handles_head_;
533 deferred != NULL; 533 deferred != NULL;
534 deferred = deferred->next_) { 534 deferred = deferred->next_) {
535 List<Object**>* blocks = &deferred->blocks_; 535 List<Object**>* blocks = &deferred->blocks_;
536 for (int i = 0; i < blocks->length(); i++) { 536 for (int i = 0; i < blocks->length(); i++) {
537 Object** block_limit = (i == 0) ? deferred->first_block_limit_ 537 Object** block_limit = (i == 0) ? deferred->first_block_limit_
(...skipping 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1790 date_cache_(NULL), 1790 date_cache_(NULL),
1791 code_stub_interface_descriptors_(NULL), 1791 code_stub_interface_descriptors_(NULL),
1792 initialized_from_snapshot_(false), 1792 initialized_from_snapshot_(false),
1793 cpu_profiler_(NULL), 1793 cpu_profiler_(NULL),
1794 heap_profiler_(NULL), 1794 heap_profiler_(NULL),
1795 function_entry_hook_(NULL), 1795 function_entry_hook_(NULL),
1796 deferred_handles_head_(NULL), 1796 deferred_handles_head_(NULL),
1797 optimizing_compiler_thread_(this), 1797 optimizing_compiler_thread_(this),
1798 marking_thread_(NULL), 1798 marking_thread_(NULL),
1799 sweeper_thread_(NULL), 1799 sweeper_thread_(NULL),
1800 callback_table_(NULL),
1801 stress_deopt_count_(0) { 1800 stress_deopt_count_(0) {
1802 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1); 1801 id_ = NoBarrier_AtomicIncrement(&isolate_counter_, 1);
1803 TRACE_ISOLATE(constructor); 1802 TRACE_ISOLATE(constructor);
1804 1803
1805 memset(isolate_addresses_, 0, 1804 memset(isolate_addresses_, 0,
1806 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1805 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1807 1806
1808 heap_.isolate_ = this; 1807 heap_.isolate_ = this;
1809 stack_guard_.isolate_ = this; 1808 stack_guard_.isolate_ = this;
1810 1809
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
1884 1883
1885 1884
1886 void Isolate::Deinit() { 1885 void Isolate::Deinit() {
1887 if (state_ == INITIALIZED) { 1886 if (state_ == INITIALIZED) {
1888 TRACE_ISOLATE(deinit); 1887 TRACE_ISOLATE(deinit);
1889 1888
1890 #ifdef ENABLE_DEBUGGER_SUPPORT 1889 #ifdef ENABLE_DEBUGGER_SUPPORT
1891 debugger()->UnloadDebugger(); 1890 debugger()->UnloadDebugger();
1892 #endif 1891 #endif
1893 1892
1894 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); 1893 if (FLAG_concurrent_recompilation) optimizing_compiler_thread_.Stop();
1895 1894
1896 if (FLAG_sweeper_threads > 0) { 1895 if (FLAG_sweeper_threads > 0) {
1897 for (int i = 0; i < FLAG_sweeper_threads; i++) { 1896 for (int i = 0; i < FLAG_sweeper_threads; i++) {
1898 sweeper_thread_[i]->Stop(); 1897 sweeper_thread_[i]->Stop();
1899 delete sweeper_thread_[i]; 1898 delete sweeper_thread_[i];
1900 } 1899 }
1901 delete[] sweeper_thread_; 1900 delete[] sweeper_thread_;
1902 } 1901 }
1903 1902
1904 if (FLAG_marking_threads > 0) { 1903 if (FLAG_marking_threads > 0) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2061 global_handles_ = NULL; 2060 global_handles_ = NULL;
2062 delete eternal_handles_; 2061 delete eternal_handles_;
2063 eternal_handles_ = NULL; 2062 eternal_handles_ = NULL;
2064 2063
2065 delete string_stream_debug_object_cache_; 2064 delete string_stream_debug_object_cache_;
2066 string_stream_debug_object_cache_ = NULL; 2065 string_stream_debug_object_cache_ = NULL;
2067 2066
2068 delete external_reference_table_; 2067 delete external_reference_table_;
2069 external_reference_table_ = NULL; 2068 external_reference_table_ = NULL;
2070 2069
2071 delete callback_table_;
2072 callback_table_ = NULL;
2073
2074 #ifdef ENABLE_DEBUGGER_SUPPORT 2070 #ifdef ENABLE_DEBUGGER_SUPPORT
2075 delete debugger_; 2071 delete debugger_;
2076 debugger_ = NULL; 2072 debugger_ = NULL;
2077 delete debug_; 2073 delete debug_;
2078 debug_ = NULL; 2074 debug_ = NULL;
2079 #endif 2075 #endif
2080 } 2076 }
2081 2077
2082 2078
2083 void Isolate::InitializeThreadLocal() { 2079 void Isolate::InitializeThreadLocal() {
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 // interface descriptor is initialized even when stubs have been 2323 // interface descriptor is initialized even when stubs have been
2328 // deserialized out of the snapshot without the graph builder. 2324 // deserialized out of the snapshot without the graph builder.
2329 FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS, 2325 FastCloneShallowArrayStub stub(FastCloneShallowArrayStub::CLONE_ELEMENTS,
2330 DONT_TRACK_ALLOCATION_SITE, 0); 2326 DONT_TRACK_ALLOCATION_SITE, 0);
2331 stub.InitializeInterfaceDescriptor( 2327 stub.InitializeInterfaceDescriptor(
2332 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray)); 2328 this, code_stub_interface_descriptor(CodeStub::FastCloneShallowArray));
2333 CompareNilICStub::InitializeForIsolate(this); 2329 CompareNilICStub::InitializeForIsolate(this);
2334 ToBooleanStub::InitializeForIsolate(this); 2330 ToBooleanStub::InitializeForIsolate(this);
2335 ArrayConstructorStubBase::InstallDescriptors(this); 2331 ArrayConstructorStubBase::InstallDescriptors(this);
2336 InternalArrayConstructorStubBase::InstallDescriptors(this); 2332 InternalArrayConstructorStubBase::InstallDescriptors(this);
2333 FastNewClosureStub::InstallDescriptors(this);
2337 } 2334 }
2338 2335
2339 if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Start(); 2336 if (FLAG_concurrent_recompilation) optimizing_compiler_thread_.Start();
2340 2337
2341 if (FLAG_marking_threads > 0) { 2338 if (FLAG_marking_threads > 0) {
2342 marking_thread_ = new MarkingThread*[FLAG_marking_threads]; 2339 marking_thread_ = new MarkingThread*[FLAG_marking_threads];
2343 for (int i = 0; i < FLAG_marking_threads; i++) { 2340 for (int i = 0; i < FLAG_marking_threads; i++) {
2344 marking_thread_[i] = new MarkingThread(this); 2341 marking_thread_[i] = new MarkingThread(this);
2345 marking_thread_[i]->Start(); 2342 marking_thread_[i]->Start();
2346 } 2343 }
2347 } 2344 }
2348 2345
2349 if (FLAG_sweeper_threads > 0) { 2346 if (FLAG_sweeper_threads > 0) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
2532 2529
2533 #ifdef DEBUG 2530 #ifdef DEBUG
2534 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2531 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2535 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2532 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2536 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2533 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2537 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2534 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2538 #undef ISOLATE_FIELD_OFFSET 2535 #undef ISOLATE_FIELD_OFFSET
2539 #endif 2536 #endif
2540 2537
2541 } } // namespace v8::internal 2538 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/jsregexp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698