| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "platform/heap/SafePoint.h" | |
| 6 | |
| 7 #include "platform/heap/Heap.h" | |
| 8 | |
| 9 namespace blink { | |
| 10 | |
| 11 using PushAllRegistersCallback = void (*)(SafePointBarrier*, | |
| 12 ThreadState*, | |
| 13 intptr_t*); | |
| 14 extern "C" void pushAllRegisters(SafePointBarrier*, | |
| 15 ThreadState*, | |
| 16 PushAllRegistersCallback); | |
| 17 | |
| 18 SafePointBarrier::SafePointBarrier() {} | |
| 19 | |
| 20 SafePointBarrier::~SafePointBarrier() {} | |
| 21 | |
| 22 void SafePointBarrier::enterSafePoint(ThreadState* state) { | |
| 23 ASSERT(!state->sweepForbidden()); | |
| 24 pushAllRegisters(this, state, enterSafePointAfterPushRegisters); | |
| 25 } | |
| 26 | |
| 27 void SafePointBarrier::leaveSafePoint() {} | |
| 28 | |
| 29 void SafePointBarrier::doEnterSafePoint(ThreadState* state, | |
| 30 intptr_t* stackEnd) { | |
| 31 state->recordStackEnd(stackEnd); | |
| 32 state->copyStackUntilSafePointScope(); | |
| 33 } | |
| 34 | |
| 35 } // namespace blink | |
| OLD | NEW |