| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |