Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: src/ffi/ffi-compiler.h

Issue 2607993003: FFI Compiler based on code stub assembler (Closed)
Patch Set: Introduce FFIAssembler class Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 typedef Signature<MachineType> FFISignature;
22
23 struct NativeFunction {
24 FFISignature* sig;
25 uint8_t* start;
26 };
27
28 class FFIAssembler : public CodeStubAssembler {
Igor Sheludko 2017/01/18 18:18:14 Since nobody uses it outside the .cc file, it coul
mattloring 2017/01/18 18:26:24 Done.
29 public:
30 explicit FFIAssembler(CodeAssemblerState* state) : CodeStubAssembler(state) {}
31
32 Node* ToJS(Node* node, Node* context, MachineType type);
33
34 Node* FromJS(Node* node, Node* context, MachineType type);
35
36 Handle<Code> GenerateJSToNativeWrapper(NativeFunction* func);
37 };
38
39 Handle<JSFunction> CompileJSToNativeWrapper(Isolate* isolate,
40 Handle<String> name,
41 NativeFunction func);
42 } // namespace ffi
43 } // namespace internal
44 } // namespace v8
45
46 #endif // SRC_FFI_FFI_COMPILER_H_
OLDNEW
« no previous file with comments | « src/ffi/OWNERS ('k') | src/ffi/ffi-compiler.cc » ('j') | src/ffi/ffi-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698