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

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

Issue 2021323003: [wasm] remove faux code objects Base URL: https://chromium.googlesource.com/v8/v8.git@master
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/mips64/code-generator-mips64.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 // Link functions
93 void Link(Isolate* isolate, std::vector<Handle<Code>>& unlinked_functions,
94 const std::vector<Handle<Code>>& functions_to_link, int mode_mask);
95
92 // Abstracts details of building TurboFan graph nodes for WASM to separate 96 // Abstracts details of building TurboFan graph nodes for WASM to separate
93 // the WASM decoder from the internal details of TurboFan. 97 // the WASM decoder from the internal details of TurboFan.
94 class WasmTrapHelper; 98 class WasmTrapHelper;
95 class WasmGraphBuilder { 99 class WasmGraphBuilder {
96 public: 100 public:
97 WasmGraphBuilder( 101 WasmGraphBuilder(
98 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature, 102 Zone* z, JSGraph* g, wasm::FunctionSig* function_signature,
99 compiler::SourcePositionTable* source_position_table = nullptr); 103 compiler::SourcePositionTable* source_position_table = nullptr);
100 104
101 Node** Buffer(size_t count) { 105 Node** Buffer(size_t count) {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 Node* GetUnalignedStoreOffsetNode(Node* baseOffset, int numberOfBytes, 236 Node* GetUnalignedStoreOffsetNode(Node* baseOffset, int numberOfBytes,
233 int stride, int current); 237 int stride, int current);
234 Node* BuildUnalignedStore(MachineType memtype, Node* index, uint32_t offset, 238 Node* BuildUnalignedStore(MachineType memtype, Node* index, uint32_t offset,
235 uint32_t alignment, Node* val); 239 uint32_t alignment, Node* val);
236 240
237 Node* MaskShiftCount32(Node* node); 241 Node* MaskShiftCount32(Node* node);
238 Node* MaskShiftCount64(Node* node); 242 Node* MaskShiftCount64(Node* node);
239 243
240 Node* BuildCCall(MachineSignature* sig, Node** args); 244 Node* BuildCCall(MachineSignature* sig, Node** args);
241 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args, 245 Node* BuildWasmCall(wasm::FunctionSig* sig, Node** args,
242 wasm::WasmCodePosition position); 246 wasm::WasmCodePosition position, bool internal = false);
243 247
244 Node* BuildF32Neg(Node* input); 248 Node* BuildF32Neg(Node* input);
245 Node* BuildF64Neg(Node* input); 249 Node* BuildF64Neg(Node* input);
246 Node* BuildF32CopySign(Node* left, Node* right); 250 Node* BuildF32CopySign(Node* left, Node* right);
247 Node* BuildF64CopySign(Node* left, Node* right); 251 Node* BuildF64CopySign(Node* left, Node* right);
248 Node* BuildF32Min(Node* left, Node* right); 252 Node* BuildF32Min(Node* left, Node* right);
249 Node* BuildF32Max(Node* left, Node* right); 253 Node* BuildF32Max(Node* left, Node* right);
250 Node* BuildF64Min(Node* left, Node* right); 254 Node* BuildF64Min(Node* left, Node* right);
251 Node* BuildF64Max(Node* left, Node* right); 255 Node* BuildF64Max(Node* left, Node* right);
252 Node* BuildI32SConvertF32(Node* input, wasm::WasmCodePosition position); 256 Node* BuildI32SConvertF32(Node* input, wasm::WasmCodePosition position);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 Node** buf = Buffer(new_count); 351 Node** buf = Buffer(new_count);
348 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); 352 if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*));
349 return buf; 353 return buf;
350 } 354 }
351 }; 355 };
352 } // namespace compiler 356 } // namespace compiler
353 } // namespace internal 357 } // namespace internal
354 } // namespace v8 358 } // namespace v8
355 359
356 #endif // V8_COMPILER_WASM_COMPILER_H_ 360 #endif // V8_COMPILER_WASM_COMPILER_H_
OLDNEW
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698