blob: 95a253c20e1c5c0d97a8712c8dd82dcad3317e64 [file] [log] [blame]
// Copyright 2011 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
namespace v8 {
namespace internal {
// Trampoline stub to call into native code. To call safely into native code
// in the presence of compacting GC (which can move code objects) we need to
// keep the code which called into native pinned in the memory. Currently the
// simplest approach is to generate such stub early enough so it can never be
// moved by GC
class DirectCEntryStub: public PlatformCodeStub {
explicit DirectCEntryStub(Isolate* isolate) : PlatformCodeStub(isolate) {}
void GenerateCall(MacroAssembler* masm, Register target);
Movability NeedsImmovableCode() override { return kImmovable; }
DEFINE_PLATFORM_CODE_STUB(DirectCEntry, PlatformCodeStub);
} // namespace internal
} // namespace v8