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

Unified Diff: src/compiler/wasm-compiler.h

Issue 1915123006: [wasm] Pass byte position for trapping instructions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.h
diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h
index a27571f22b105b171b2c31cd83b2a5876c8967fa..6dd5de53bd68b618cf9c6029c551f54281d631c4 100644
--- a/src/compiler/wasm-compiler.h
+++ b/src/compiler/wasm-compiler.h
@@ -88,12 +88,13 @@ class WasmGraphBuilder {
Node* Float32Constant(float value);
Node* Float64Constant(double value);
Node* Constant(Handle<Object> value);
- Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right);
- Node* Unop(wasm::WasmOpcode opcode, Node* input);
+ Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right,
+ int position = -1);
titzer 2016/04/28 11:27:00 Let's introduce a typedef to separate normal ints
Clemens Hammacher 2016/04/28 12:43:28 Done.
+ Node* Unop(wasm::WasmOpcode opcode, Node* input, int position = -1);
unsigned InputCount(Node* node);
bool IsPhiWithMerge(Node* phi, Node* merge);
void AppendToMerge(Node* merge, Node* from);
- void AppendToPhi(Node* merge, Node* phi, Node* from);
+ void AppendToPhi(Node* phi, Node* from);
//-----------------------------------------------------------------------
// Operations that read and/or write {control} and {effect}.
@@ -104,11 +105,11 @@ class WasmGraphBuilder {
Node* IfDefault(Node* sw);
Node* Return(unsigned count, Node** vals);
Node* ReturnVoid();
- Node* Unreachable();
+ Node* Unreachable(int position);
Node* CallDirect(uint32_t index, Node** args);
Node* CallImport(uint32_t index, Node** args);
- Node* CallIndirect(uint32_t index, Node** args);
+ Node* CallIndirect(uint32_t index, Node** args, int position);
void BuildJSToWasmWrapper(Handle<Code> wasm_code, wasm::FunctionSig* sig);
void BuildWasmToJSWrapper(Handle<JSFunction> function,
wasm::FunctionSig* sig);
@@ -125,8 +126,9 @@ class WasmGraphBuilder {
Node* LoadGlobal(uint32_t index);
Node* StoreGlobal(uint32_t index, Node* val);
Node* LoadMem(wasm::LocalType type, MachineType memtype, Node* index,
- uint32_t offset);
- Node* StoreMem(MachineType type, Node* index, uint32_t offset, Node* val);
+ uint32_t offset, int position);
+ Node* StoreMem(MachineType type, Node* index, uint32_t offset, Node* val,
+ int position);
static void PrintDebugName(Node* node);
@@ -173,7 +175,8 @@ class WasmGraphBuilder {
Node* String(const char* string);
Node* MemBuffer(uint32_t offset);
- void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset);
+ void BoundsCheckMem(MachineType memtype, Node* index, uint32_t offset,
+ int position);
Node* MaskShiftCount32(Node* node);
Node* MaskShiftCount64(Node* node);
@@ -189,10 +192,10 @@ class WasmGraphBuilder {
Node* BuildF32Max(Node* left, Node* right);
Node* BuildF64Min(Node* left, Node* right);
Node* BuildF64Max(Node* left, Node* right);
- Node* BuildI32SConvertF32(Node* input);
- Node* BuildI32SConvertF64(Node* input);
- Node* BuildI32UConvertF32(Node* input);
- Node* BuildI32UConvertF64(Node* input);
+ Node* BuildI32SConvertF32(Node* input, int position);
+ Node* BuildI32SConvertF64(Node* input, int position);
+ Node* BuildI32UConvertF32(Node* input, int position);
+ Node* BuildI32UConvertF64(Node* input, int position);
Node* BuildI32Ctz(Node* input);
Node* BuildI32Popcnt(Node* input);
Node* BuildI64Ctz(Node* input);
@@ -237,23 +240,23 @@ class WasmGraphBuilder {
Node* BuildFloatToIntConversionInstruction(
Node* input, ExternalReference ref,
MachineRepresentation parameter_representation,
- const MachineType result_type);
- Node* BuildI64SConvertF32(Node* input);
- Node* BuildI64UConvertF32(Node* input);
- Node* BuildI64SConvertF64(Node* input);
- Node* BuildI64UConvertF64(Node* input);
-
- Node* BuildI32DivS(Node* left, Node* right);
- Node* BuildI32RemS(Node* left, Node* right);
- Node* BuildI32DivU(Node* left, Node* right);
- Node* BuildI32RemU(Node* left, Node* right);
-
- Node* BuildI64DivS(Node* left, Node* right);
- Node* BuildI64RemS(Node* left, Node* right);
- Node* BuildI64DivU(Node* left, Node* right);
- Node* BuildI64RemU(Node* left, Node* right);
+ const MachineType result_type, int position);
+ Node* BuildI64SConvertF32(Node* input, int position);
+ Node* BuildI64UConvertF32(Node* input, int position);
+ Node* BuildI64SConvertF64(Node* input, int position);
+ Node* BuildI64UConvertF64(Node* input, int position);
+
+ Node* BuildI32DivS(Node* left, Node* right, int position);
+ Node* BuildI32RemS(Node* left, Node* right, int position);
+ Node* BuildI32DivU(Node* left, Node* right, int position);
+ Node* BuildI32RemU(Node* left, Node* right, int position);
+
+ Node* BuildI64DivS(Node* left, Node* right, int position);
+ Node* BuildI64RemS(Node* left, Node* right, int position);
+ Node* BuildI64DivU(Node* left, Node* right, int position);
+ Node* BuildI64RemU(Node* left, Node* right, int position);
Node* BuildDiv64Call(Node* left, Node* right, ExternalReference ref,
- MachineType result_type, int trap_zero);
+ MachineType result_type, int trap_zero, int position);
Node* BuildJavaScriptToNumber(Node* node, Node* context, Node* effect,
Node* control);
« 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