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

Side by Side Diff: src/isolate.cc

Issue 143003013: Initial patch for a64. (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/jsregexp.cc » ('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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 has_pending_message_ = false; 109 has_pending_message_ = false;
110 pending_message_obj_ = NULL; 110 pending_message_obj_ = NULL;
111 pending_message_script_ = NULL; 111 pending_message_script_ = NULL;
112 scheduled_exception_ = NULL; 112 scheduled_exception_ = NULL;
113 } 113 }
114 114
115 115
116 void ThreadLocalTop::Initialize() { 116 void ThreadLocalTop::Initialize() {
117 InitializeInternal(); 117 InitializeInternal();
118 #ifdef USE_SIMULATOR 118 #ifdef USE_SIMULATOR
119 #ifdef V8_TARGET_ARCH_ARM 119 #ifdef V8_TARGET_ARCH_A64
120 simulator_ = Simulator::current(isolate_);
121 #elif V8_TARGET_ARCH_ARM
120 simulator_ = Simulator::current(isolate_); 122 simulator_ = Simulator::current(isolate_);
121 #elif V8_TARGET_ARCH_MIPS 123 #elif V8_TARGET_ARCH_MIPS
122 simulator_ = Simulator::current(isolate_); 124 simulator_ = Simulator::current(isolate_);
123 #endif 125 #endif
124 #endif 126 #endif
125 thread_id_ = ThreadId::Current(); 127 thread_id_ = ThreadId::Current();
126 } 128 }
127 129
128 130
129 v8::TryCatch* ThreadLocalTop::TryCatchHandler() { 131 v8::TryCatch* ThreadLocalTop::TryCatchHandler() {
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 return to + sizeof(ThreadLocalTop); 1620 return to + sizeof(ThreadLocalTop);
1619 } 1621 }
1620 1622
1621 1623
1622 char* Isolate::RestoreThread(char* from) { 1624 char* Isolate::RestoreThread(char* from) {
1623 OS::MemCopy(reinterpret_cast<char*>(thread_local_top()), from, 1625 OS::MemCopy(reinterpret_cast<char*>(thread_local_top()), from,
1624 sizeof(ThreadLocalTop)); 1626 sizeof(ThreadLocalTop));
1625 // This might be just paranoia, but it seems to be needed in case a 1627 // This might be just paranoia, but it seems to be needed in case a
1626 // thread_local_top_ is restored on a separate OS thread. 1628 // thread_local_top_ is restored on a separate OS thread.
1627 #ifdef USE_SIMULATOR 1629 #ifdef USE_SIMULATOR
1628 #ifdef V8_TARGET_ARCH_ARM 1630 #ifdef V8_TARGET_ARCH_A64
1631 thread_local_top()->simulator_ = Simulator::current(this);
1632 #elif V8_TARGET_ARCH_ARM
1629 thread_local_top()->simulator_ = Simulator::current(this); 1633 thread_local_top()->simulator_ = Simulator::current(this);
1630 #elif V8_TARGET_ARCH_MIPS 1634 #elif V8_TARGET_ARCH_MIPS
1631 thread_local_top()->simulator_ = Simulator::current(this); 1635 thread_local_top()->simulator_ = Simulator::current(this);
1632 #endif 1636 #endif
1633 #endif 1637 #endif
1634 ASSERT(context() == NULL || context()->IsContext()); 1638 ASSERT(context() == NULL || context()->IsContext());
1635 return from + sizeof(ThreadLocalTop); 1639 return from + sizeof(ThreadLocalTop);
1636 } 1640 }
1637 1641
1638 1642
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1)); 1772 sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
1769 1773
1770 heap_.isolate_ = this; 1774 heap_.isolate_ = this;
1771 stack_guard_.isolate_ = this; 1775 stack_guard_.isolate_ = this;
1772 1776
1773 // ThreadManager is initialized early to support locking an isolate 1777 // ThreadManager is initialized early to support locking an isolate
1774 // before it is entered. 1778 // before it is entered.
1775 thread_manager_ = new ThreadManager(); 1779 thread_manager_ = new ThreadManager();
1776 thread_manager_->isolate_ = this; 1780 thread_manager_->isolate_ = this;
1777 1781
1778 #if defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \ 1782 #if defined(V8_TARGET_ARCH_A64) && !defined(__arm__) || \
1783 defined(V8_TARGET_ARCH_ARM) && !defined(__arm__) || \
1779 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__) 1784 defined(V8_TARGET_ARCH_MIPS) && !defined(__mips__)
1780 simulator_initialized_ = false; 1785 simulator_initialized_ = false;
1781 simulator_i_cache_ = NULL; 1786 simulator_i_cache_ = NULL;
1782 simulator_redirection_ = NULL; 1787 simulator_redirection_ = NULL;
1783 #endif 1788 #endif
1784 1789
1785 #ifdef DEBUG 1790 #ifdef DEBUG
1786 // heap_histograms_ initializes itself. 1791 // heap_histograms_ initializes itself.
1787 memset(&js_spill_information_, 0, sizeof(js_spill_information_)); 1792 memset(&js_spill_information_, 0, sizeof(js_spill_information_));
1788 memset(code_kind_statistics_, 0, 1793 memset(code_kind_statistics_, 0,
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2121 code_stub_interface_descriptors_ = 2126 code_stub_interface_descriptors_ =
2122 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS]; 2127 new CodeStubInterfaceDescriptor[CodeStub::NUMBER_OF_IDS];
2123 cpu_profiler_ = new CpuProfiler(this); 2128 cpu_profiler_ = new CpuProfiler(this);
2124 heap_profiler_ = new HeapProfiler(heap()); 2129 heap_profiler_ = new HeapProfiler(heap());
2125 2130
2126 // Enable logging before setting up the heap 2131 // Enable logging before setting up the heap
2127 logger_->SetUp(this); 2132 logger_->SetUp(this);
2128 2133
2129 // Initialize other runtime facilities 2134 // Initialize other runtime facilities
2130 #if defined(USE_SIMULATOR) 2135 #if defined(USE_SIMULATOR)
2131 #if defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS) 2136 #if defined(V8_TARGET_ARCH_A64) || defined(V8_TARGET_ARCH_ARM) || \
2137 defined(V8_TARGET_ARCH_MIPS)
2132 Simulator::Initialize(this); 2138 Simulator::Initialize(this);
2133 #endif 2139 #endif
2134 #endif 2140 #endif
2135 2141
2136 { // NOLINT 2142 { // NOLINT
2137 // Ensure that the thread has a valid stack guard. The v8::Locker object 2143 // Ensure that the thread has a valid stack guard. The v8::Locker object
2138 // will ensure this too, but we don't have to use lockers if we are only 2144 // will ensure this too, but we don't have to use lockers if we are only
2139 // using one thread. 2145 // using one thread.
2140 ExecutionAccess lock(this); 2146 ExecutionAccess lock(this);
2141 stack_guard_.InitThread(lock); 2147 stack_guard_.InitThread(lock);
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 2477
2472 #ifdef DEBUG 2478 #ifdef DEBUG
2473 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2479 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2474 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2480 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2475 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2481 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2476 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2482 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2477 #undef ISOLATE_FIELD_OFFSET 2483 #undef ISOLATE_FIELD_OFFSET
2478 #endif 2484 #endif
2479 2485
2480 } } // namespace v8::internal 2486 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/jsregexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698