• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 the V8 project 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 #ifndef SRC_FFI_FFI_COMPILER_H_
6 #define SRC_FFI_FFI_COMPILER_H_
7 
8 #include "src/code-stub-assembler.h"
9 #include "src/machine-type.h"
10 
11 namespace v8 {
12 namespace internal {
13 
14 typedef compiler::Node Node;
15 typedef compiler::CodeAssemblerState CodeAssemblerState;
16 
17 void InstallFFIMap(Isolate* isolate);
18 
19 namespace ffi {
20 
21 enum class FFIType : uint8_t { kInt32 };
22 
23 typedef Signature<FFIType> FFISignature;
24 
25 struct NativeFunction {
26   FFISignature* sig;
27   uint8_t* start;
28 };
29 
30 Handle<JSFunction> CompileJSToNativeWrapper(Isolate* isolate,
31                                             Handle<String> name,
32                                             NativeFunction func);
33 }  // namespace ffi
34 }  // namespace internal
35 }  // namespace v8
36 
37 #endif  // SRC_FFI_FFI_COMPILER_H_
38