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

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

Issue 2137993003: [wasm] Adding feature to JIT a wasm function at runtime and hook up the compiled code into the indi… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Changed casting Created 4 years, 5 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 | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')
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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 //----------------------------------------------------------------------- 115 //-----------------------------------------------------------------------
116 Node* Error(); 116 Node* Error();
117 Node* Start(unsigned params); 117 Node* Start(unsigned params);
118 Node* Param(unsigned index, wasm::LocalType type); 118 Node* Param(unsigned index, wasm::LocalType type);
119 Node* Loop(Node* entry); 119 Node* Loop(Node* entry);
120 Node* Terminate(Node* effect, Node* control); 120 Node* Terminate(Node* effect, Node* control);
121 Node* Merge(unsigned count, Node** controls); 121 Node* Merge(unsigned count, Node** controls);
122 Node* Phi(wasm::LocalType type, unsigned count, Node** vals, Node* control); 122 Node* Phi(wasm::LocalType type, unsigned count, Node** vals, Node* control);
123 Node* EffectPhi(unsigned count, Node** effects, Node* control); 123 Node* EffectPhi(unsigned count, Node** effects, Node* control);
124 Node* NumberConstant(int32_t value); 124 Node* NumberConstant(int32_t value);
125 Node* Uint32Constant(uint32_t value);
125 Node* Int32Constant(int32_t value); 126 Node* Int32Constant(int32_t value);
126 Node* Int64Constant(int64_t value); 127 Node* Int64Constant(int64_t value);
127 Node* Float32Constant(float value); 128 Node* Float32Constant(float value);
128 Node* Float64Constant(double value); 129 Node* Float64Constant(double value);
129 Node* HeapConstant(Handle<HeapObject> value); 130 Node* HeapConstant(Handle<HeapObject> value);
130 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right, 131 Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right,
131 wasm::WasmCodePosition position = wasm::kNoCodePosition); 132 wasm::WasmCodePosition position = wasm::kNoCodePosition);
132 Node* Unop(wasm::WasmOpcode opcode, Node* input, 133 Node* Unop(wasm::WasmOpcode opcode, Node* input,
133 wasm::WasmCodePosition position = wasm::kNoCodePosition); 134 wasm::WasmCodePosition position = wasm::kNoCodePosition);
134 unsigned InputCount(Node* node); 135 unsigned InputCount(Node* node);
(...skipping 11 matching lines...) Expand all
146 Node* Return(unsigned count, Node** vals); 147 Node* Return(unsigned count, Node** vals);
147 Node* ReturnVoid(); 148 Node* ReturnVoid();
148 Node* Unreachable(wasm::WasmCodePosition position); 149 Node* Unreachable(wasm::WasmCodePosition position);
149 150
150 Node* CallDirect(uint32_t index, Node** args, 151 Node* CallDirect(uint32_t index, Node** args,
151 wasm::WasmCodePosition position); 152 wasm::WasmCodePosition position);
152 Node* CallImport(uint32_t index, Node** args, 153 Node* CallImport(uint32_t index, Node** args,
153 wasm::WasmCodePosition position); 154 wasm::WasmCodePosition position);
154 Node* CallIndirect(uint32_t index, Node** args, 155 Node* CallIndirect(uint32_t index, Node** args,
155 wasm::WasmCodePosition position); 156 wasm::WasmCodePosition position);
157 Node* JITSingleFunction(Node* base, Node* length, Node* index,
158 uint32_t sig_index, wasm::FunctionSig* sig);
156 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig); 159 void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig);
157 void BuildWasmToJSWrapper(Handle<JSFunction> function, 160 void BuildWasmToJSWrapper(Handle<JSFunction> function,
158 wasm::FunctionSig* sig); 161 wasm::FunctionSig* sig);
159 162
160 Node* ToJS(Node* node, Node* context, wasm::LocalType type); 163 Node* ToJS(Node* node, Node* context, wasm::LocalType type);
161 Node* FromJS(Node* node, Node* context, wasm::LocalType type); 164 Node* FromJS(Node* node, Node* context, wasm::LocalType type);
162 Node* Invert(Node* node); 165 Node* Invert(Node* node);
163 Node* FunctionTable(); 166 Node* FunctionTable();
164 167
165 //----------------------------------------------------------------------- 168 //-----------------------------------------------------------------------
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref, 315 Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref,
313 MachineType result_type, int trap_zero, 316 MachineType result_type, int trap_zero,
314 wasm::WasmCodePosition position); 317 wasm::WasmCodePosition position);
315 318
316 Node* BuildJavaScriptToNumber(Node* node, Node* context, Node* effect, 319 Node* BuildJavaScriptToNumber(Node* node, Node* context, Node* effect,
317 Node* control); 320 Node* control);
318 Node* BuildChangeInt32ToTagged(Node* value); 321 Node* BuildChangeInt32ToTagged(Node* value);
319 Node* BuildChangeFloat64ToTagged(Node* value); 322 Node* BuildChangeFloat64ToTagged(Node* value);
320 Node* BuildChangeTaggedToFloat64(Node* value); 323 Node* BuildChangeTaggedToFloat64(Node* value);
321 324
325 Node* BuildChangeIntPtrToSmi(Node* value);
322 Node* BuildChangeInt32ToSmi(Node* value); 326 Node* BuildChangeInt32ToSmi(Node* value);
323 Node* BuildChangeSmiToInt32(Node* value); 327 Node* BuildChangeSmiToInt32(Node* value);
324 Node* BuildChangeUint32ToSmi(Node* value); 328 Node* BuildChangeUint32ToSmi(Node* value);
325 Node* BuildChangeSmiToFloat64(Node* value); 329 Node* BuildChangeSmiToFloat64(Node* value);
326 Node* BuildTestNotSmi(Node* value); 330 Node* BuildTestNotSmi(Node* value);
327 Node* BuildSmiShiftBitsConstant(); 331 Node* BuildSmiShiftBitsConstant();
328 332
329 Node* BuildAllocateHeapNumberWithValue(Node* value, Node* control); 333 Node* BuildAllocateHeapNumberWithValue(Node* value, Node* control);
330 Node* BuildLoadHeapNumberValue(Node* value, Node* control); 334 Node* BuildLoadHeapNumberValue(Node* value, Node* control);
331 Node* BuildHeapNumberValueIndexConstant(); 335 Node* BuildHeapNumberValueIndexConstant();
(...skipping 15 matching lines...) Expand all
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 | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698