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

Side by Side Diff: src/d8.h

Issue 23748003: Cleanup Semaphore class. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Build fix for Mac OS X. Created 7 years, 3 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/api.cc ('k') | src/d8.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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Type type_; 133 Type type_;
134 const char* name_; 134 const char* name_;
135 static LineEditor* current_; 135 static LineEditor* current_;
136 }; 136 };
137 137
138 138
139 class SourceGroup { 139 class SourceGroup {
140 public: 140 public:
141 SourceGroup() : 141 SourceGroup() :
142 #ifndef V8_SHARED 142 #ifndef V8_SHARED
143 next_semaphore_(v8::internal::OS::CreateSemaphore(0)), 143 next_semaphore_(0),
144 done_semaphore_(v8::internal::OS::CreateSemaphore(0)), 144 done_semaphore_(0),
145 thread_(NULL), 145 thread_(NULL),
146 #endif // V8_SHARED 146 #endif // V8_SHARED
147 argv_(NULL), 147 argv_(NULL),
148 begin_offset_(0), 148 begin_offset_(0),
149 end_offset_(0) {} 149 end_offset_(0) {}
150 150
151 ~SourceGroup(); 151 ~SourceGroup();
152 152
153 void Begin(char** argv, int offset) { 153 void Begin(char** argv, int offset) {
154 argv_ = const_cast<const char**>(argv); 154 argv_ = const_cast<const char**>(argv);
(...skipping 18 matching lines...) Expand all
173 group_->ExecuteInThread(); 173 group_->ExecuteInThread();
174 } 174 }
175 175
176 private: 176 private:
177 SourceGroup* group_; 177 SourceGroup* group_;
178 }; 178 };
179 179
180 static i::Thread::Options GetThreadOptions(); 180 static i::Thread::Options GetThreadOptions();
181 void ExecuteInThread(); 181 void ExecuteInThread();
182 182
183 i::Semaphore* next_semaphore_; 183 i::Semaphore next_semaphore_;
184 i::Semaphore* done_semaphore_; 184 i::Semaphore done_semaphore_;
185 i::Thread* thread_; 185 i::Thread* thread_;
186 #endif // V8_SHARED 186 #endif // V8_SHARED
187 187
188 void ExitShell(int exit_code); 188 void ExitShell(int exit_code);
189 Handle<String> ReadFile(Isolate* isolate, const char* name); 189 Handle<String> ReadFile(Isolate* isolate, const char* name);
190 190
191 const char** argv_; 191 const char** argv_;
192 int begin_offset_; 192 int begin_offset_;
193 int end_offset_; 193 int end_offset_;
194 }; 194 };
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 static void ExternalArrayWeakCallback(Isolate* isolate, 420 static void ExternalArrayWeakCallback(Isolate* isolate,
421 Persistent<Object>* object, 421 Persistent<Object>* object,
422 uint8_t* data); 422 uint8_t* data);
423 }; 423 };
424 424
425 425
426 } // namespace v8 426 } // namespace v8
427 427
428 428
429 #endif // V8_D8_H_ 429 #endif // V8_D8_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698