OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "api.h" | 7 #include "api.h" |
8 #include "arguments.h" | 8 #include "arguments.h" |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
508 // TODO(isolates): frames_are_dropped_? | 508 // TODO(isolates): frames_are_dropped_? |
509 thread_local_.debugger_entry_ = NULL; | 509 thread_local_.debugger_entry_ = NULL; |
510 thread_local_.has_pending_interrupt_ = false; | 510 thread_local_.has_pending_interrupt_ = false; |
511 thread_local_.restarter_frame_function_pointer_ = NULL; | 511 thread_local_.restarter_frame_function_pointer_ = NULL; |
512 thread_local_.promise_on_stack_ = NULL; | 512 thread_local_.promise_on_stack_ = NULL; |
513 } | 513 } |
514 | 514 |
515 | 515 |
516 char* Debug::ArchiveDebug(char* storage) { | 516 char* Debug::ArchiveDebug(char* storage) { |
517 char* to = storage; | 517 char* to = storage; |
518 OS::MemCopy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); | 518 MemCopy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); |
519 ThreadInit(); | 519 ThreadInit(); |
520 return storage + ArchiveSpacePerThread(); | 520 return storage + ArchiveSpacePerThread(); |
521 } | 521 } |
522 | 522 |
523 | 523 |
524 char* Debug::RestoreDebug(char* storage) { | 524 char* Debug::RestoreDebug(char* storage) { |
525 char* from = storage; | 525 char* from = storage; |
526 OS::MemCopy( | 526 MemCopy(reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); |
527 reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); | |
528 return storage + ArchiveSpacePerThread(); | 527 return storage + ArchiveSpacePerThread(); |
529 } | 528 } |
530 | 529 |
531 | 530 |
532 int Debug::ArchiveSpacePerThread() { | 531 int Debug::ArchiveSpacePerThread() { |
533 return sizeof(ThreadLocal); | 532 return sizeof(ThreadLocal); |
534 } | 533 } |
535 | 534 |
536 | 535 |
537 // Frame structure (conforms InternalFrame structure): | 536 // Frame structure (conforms InternalFrame structure): |
(...skipping 3005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3543 logger_->DebugEvent("Put", message.text()); | 3542 logger_->DebugEvent("Put", message.text()); |
3544 } | 3543 } |
3545 | 3544 |
3546 | 3545 |
3547 void LockingCommandMessageQueue::Clear() { | 3546 void LockingCommandMessageQueue::Clear() { |
3548 LockGuard<Mutex> lock_guard(&mutex_); | 3547 LockGuard<Mutex> lock_guard(&mutex_); |
3549 queue_.Clear(); | 3548 queue_.Clear(); |
3550 } | 3549 } |
3551 | 3550 |
3552 } } // namespace v8::internal | 3551 } } // namespace v8::internal |
OLD | NEW |