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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 thread_local_.after_break_target_ = 0; | 544 thread_local_.after_break_target_ = 0; |
545 // TODO(isolates): frames_are_dropped_? | 545 // TODO(isolates): frames_are_dropped_? |
546 thread_local_.debugger_entry_ = NULL; | 546 thread_local_.debugger_entry_ = NULL; |
547 thread_local_.pending_interrupts_ = 0; | 547 thread_local_.pending_interrupts_ = 0; |
548 thread_local_.restarter_frame_function_pointer_ = NULL; | 548 thread_local_.restarter_frame_function_pointer_ = NULL; |
549 } | 549 } |
550 | 550 |
551 | 551 |
552 char* Debug::ArchiveDebug(char* storage) { | 552 char* Debug::ArchiveDebug(char* storage) { |
553 char* to = storage; | 553 char* to = storage; |
554 memcpy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); | 554 OS::MemCopy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); |
555 to += sizeof(ThreadLocal); | 555 to += sizeof(ThreadLocal); |
556 memcpy(to, reinterpret_cast<char*>(®isters_), sizeof(registers_)); | 556 OS::MemCopy(to, reinterpret_cast<char*>(®isters_), sizeof(registers_)); |
557 ThreadInit(); | 557 ThreadInit(); |
558 ASSERT(to <= storage + ArchiveSpacePerThread()); | 558 ASSERT(to <= storage + ArchiveSpacePerThread()); |
559 return storage + ArchiveSpacePerThread(); | 559 return storage + ArchiveSpacePerThread(); |
560 } | 560 } |
561 | 561 |
562 | 562 |
563 char* Debug::RestoreDebug(char* storage) { | 563 char* Debug::RestoreDebug(char* storage) { |
564 char* from = storage; | 564 char* from = storage; |
565 memcpy(reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); | 565 OS::MemCopy( |
| 566 reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); |
566 from += sizeof(ThreadLocal); | 567 from += sizeof(ThreadLocal); |
567 memcpy(reinterpret_cast<char*>(®isters_), from, sizeof(registers_)); | 568 OS::MemCopy(reinterpret_cast<char*>(®isters_), from, sizeof(registers_)); |
568 ASSERT(from <= storage + ArchiveSpacePerThread()); | 569 ASSERT(from <= storage + ArchiveSpacePerThread()); |
569 return storage + ArchiveSpacePerThread(); | 570 return storage + ArchiveSpacePerThread(); |
570 } | 571 } |
571 | 572 |
572 | 573 |
573 int Debug::ArchiveSpacePerThread() { | 574 int Debug::ArchiveSpacePerThread() { |
574 return sizeof(ThreadLocal) + sizeof(JSCallerSavedBuffer); | 575 return sizeof(ThreadLocal) + sizeof(JSCallerSavedBuffer); |
575 } | 576 } |
576 | 577 |
577 | 578 |
(...skipping 3217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3795 { | 3796 { |
3796 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3797 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3797 isolate_->debugger()->CallMessageDispatchHandler(); | 3798 isolate_->debugger()->CallMessageDispatchHandler(); |
3798 } | 3799 } |
3799 } | 3800 } |
3800 } | 3801 } |
3801 | 3802 |
3802 #endif // ENABLE_DEBUGGER_SUPPORT | 3803 #endif // ENABLE_DEBUGGER_SUPPORT |
3803 | 3804 |
3804 } } // namespace v8::internal | 3805 } } // namespace v8::internal |
OLD | NEW |