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

Side by Side Diff: src/top.cc

Issue 2715004: [Isolates]... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: Address comments/make StackGuard::ThreadLocal::Initialize/Clear side-effects visible Created 10 years, 6 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
« src/execution.cc ('K') | « src/top.h ('k') | src/v8.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 22 matching lines...) Expand all
33 #include "execution.h" 33 #include "execution.h"
34 #include "messages.h" 34 #include "messages.h"
35 #include "platform.h" 35 #include "platform.h"
36 #include "simulator.h" 36 #include "simulator.h"
37 #include "string-stream.h" 37 #include "string-stream.h"
38 38
39 namespace v8 { 39 namespace v8 {
40 namespace internal { 40 namespace internal {
41 41
42 ThreadLocalTop Top::thread_local_; 42 ThreadLocalTop Top::thread_local_;
43 Mutex* Top::break_access_ = OS::CreateMutex();
44 43
45 NoAllocationStringAllocator* preallocated_message_space = NULL; 44 NoAllocationStringAllocator* preallocated_message_space = NULL;
46 45
47 Address top_addresses[] = { 46 Address top_addresses[] = {
48 #define C(name) reinterpret_cast<Address>(Top::name()), 47 #define C(name) reinterpret_cast<Address>(Top::name()),
49 TOP_ADDRESS_LIST(C) 48 TOP_ADDRESS_LIST(C)
50 TOP_ADDRESS_LIST_PROF(C) 49 TOP_ADDRESS_LIST_PROF(C)
51 #undef C 50 #undef C
52 NULL 51 NULL
53 }; 52 };
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 } 1048 }
1050 1049
1051 1050
1052 char* Top::RestoreThread(char* from) { 1051 char* Top::RestoreThread(char* from) {
1053 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_)); 1052 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(thread_local_));
1054 return from + sizeof(thread_local_); 1053 return from + sizeof(thread_local_);
1055 } 1054 }
1056 1055
1057 1056
1058 ExecutionAccess::ExecutionAccess() { 1057 ExecutionAccess::ExecutionAccess() {
1059 Top::break_access_->Lock(); 1058 Isolate::Current()->break_access()->Lock();
1060 } 1059 }
1061 1060
1062 1061
1063 ExecutionAccess::~ExecutionAccess() { 1062 ExecutionAccess::~ExecutionAccess() {
1064 Top::break_access_->Unlock(); 1063 Isolate::Current()->break_access()->Unlock();
1065 } 1064 }
1066 1065
1067 1066
1068 } } // namespace v8::internal 1067 } } // namespace v8::internal
OLDNEW
« src/execution.cc ('K') | « src/top.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698