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

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

Issue 2096863003: [wasm] prototype for breakpoint support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@extend-script-functionality
Patch Set: Created 4 years, 6 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
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_WASM_COMPILER_H_ 5 #ifndef V8_COMPILER_WASM_COMPILER_H_
6 #define V8_COMPILER_WASM_COMPILER_H_ 6 #define V8_COMPILER_WASM_COMPILER_H_
7 7
8 // Clients of this interface shouldn't depend on lots of compiler internals. 8 // Clients of this interface shouldn't depend on lots of compiler internals.
9 // Do not include anything from src/compiler here! 9 // Do not include anything from src/compiler here!
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 wasm::FunctionSig* sig, 82 wasm::FunctionSig* sig,
83 wasm::WasmName module_name, 83 wasm::WasmName module_name,
84 wasm::WasmName function_name); 84 wasm::WasmName function_name);
85 85
86 // Wraps a given wasm code object, producing a JSFunction that can be called 86 // Wraps a given wasm code object, producing a JSFunction that can be called
87 // from JavaScript. 87 // from JavaScript.
88 Handle<JSFunction> CompileJSToWasmWrapper( 88 Handle<JSFunction> CompileJSToWasmWrapper(
89 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name, 89 Isolate* isolate, wasm::ModuleEnv* module, Handle<String> name,
90 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index); 90 Handle<Code> wasm_code, Handle<JSObject> module_object, uint32_t index);
91 91
92 // Compiles a function which captures the parameters and calls into the wasm
93 // interpreter. It's ABI compatible with the real wasm function.
94 Handle<Code> CompileWasmToInterpreter(Isolate* isolate, uint32_t func_index,
95 wasm::FunctionSig* sig,
96 Handle<JSObject> wasm_obj);
97
92 // Abstracts details of building TurboFan graph nodes for WASM to separate 98 // Abstracts details of building TurboFan graph nodes for WASM to separate
93 // the WASM decoder from the internal details of TurboFan. 99 // the WASM decoder from the internal details of TurboFan.
94 class WasmTrapHelper; 100 class WasmTrapHelper;
95 class WasmGraphBuilder { 101 class WasmGraphBuilder {
96 public: 102 public:
97 WasmGraphBuilder( 103 WasmGraphBuilder(
98 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, 104 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature,
99 compiler::SourcePositionTable* source_position_table = nullptr); 105 compiler::SourcePositionTable* source_position_table = nullptr);
100 106
101 Node** Buffer(size_t count) { 107 Node** Buffer(size_t count) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 153
148 Node* CallDirect(uint32_t index, Node** args, 154 Node* CallDirect(uint32_t index, Node** args,
149 wasm::WasmCodePosition position); 155 wasm::WasmCodePosition position);
150 Node* CallImport(uint32_t index, Node** args, 156 Node* CallImport(uint32_t index, Node** args,
151 wasm::WasmCodePosition position); 157 wasm::WasmCodePosition position);
152 Node* CallIndirect(uint32_t index, Node** args, 158 Node* CallIndirect(uint32_t index, Node** args,
153 wasm::WasmCodePosition position); 159 wasm::WasmCodePosition position);
154 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); 160 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig);
155 void BuildWasmToJSWrapper(Handle<JSFunction> function, 161 void BuildWasmToJSWrapper(Handle<JSFunction> function,
156 wasm::FunctionSig* sig); 162 wasm::FunctionSig* sig);
163 void BuildWasmToInterpreter(uint32_t func_index, wasm::FunctionSig* sig,
164 Handle<JSObject> wasm_obj);
157 165
158 Node* ToJS(Node* node, Node* context, wasm::LocalType type); 166 Node* ToJS(Node* node, Node* context, wasm::LocalType type);
159 Node* FromJS(Node* node, Node* context, wasm::LocalType type); 167 Node* FromJS(Node* node, Node* context, wasm::LocalType type);
160 Node* Invert(Node* node); 168 Node* Invert(Node* node);
161 Node* FunctionTable(); 169 Node* FunctionTable();
162 170
163 //----------------------------------------------------------------------- 171 //-----------------------------------------------------------------------
164 // Operations that concern the linear memory. 172 // Operations that concern the linear memory.
165 //----------------------------------------------------------------------- 173 //-----------------------------------------------------------------------
166 Node* MemSize(uint32_t offset); 174 Node* MemSize(uint32_t offset);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 Node** buf = Buffer(new_count); 349 Node** buf = Buffer(new_count);
342 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); 350 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*));
343 return buf; 351 return buf;
344 } 352 }
345 }; 353 };
346 } // namespace compiler 354 } // namespace compiler
347 } // namespace internal 355 } // namespace internal
348 } // namespace v8 356 } // namespace v8
349 357
350 #endif // V8_COMPILER_WASM_COMPILER_H_ 358 #endif // V8_COMPILER_WASM_COMPILER_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698