Index: src/compiler/wasm-compiler.h |
diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h |
index 406336b0e189a05e50fe13987d2ef0924d35e496..0a027f6648e2b876d9ce18ed6d3626fdd67a3518 100644 |
--- a/src/compiler/wasm-compiler.h |
+++ b/src/compiler/wasm-compiler.h |
@@ -94,6 +94,7 @@ Handle<JSFunction> CompileJSToWasmWrapper(Isolate* isolate, |
// Abstracts details of building TurboFan graph nodes for WASM to separate |
// the WASM decoder from the internal details of TurboFan. |
class WasmTrapHelper; |
+enum class Conversion { kNone, kOpaque, kInt32, kFloat32, kFloat64 }; |
class WasmGraphBuilder { |
public: |
WasmGraphBuilder( |
@@ -127,6 +128,7 @@ class WasmGraphBuilder { |
Node* Float32Constant(float value); |
Node* Float64Constant(double value); |
Node* HeapConstant(Handle<HeapObject> value); |
+ Node* DefaultS128Value(); |
Node* Binop(wasm::WasmOpcode opcode, Node* left, Node* right, |
wasm::WasmCodePosition position = wasm::kNoCodePosition); |
Node* Unop(wasm::WasmOpcode opcode, Node* input, |
@@ -161,6 +163,8 @@ class WasmGraphBuilder { |
Node* FromJS(Node* node, Node* context, wasm::LocalType type); |
Node* Invert(Node* node); |
Node* FunctionTable(); |
+ Node* ChangeToRuntimeCall(Node* node, Runtime::FunctionId function_id, |
+ const Conversion* signature); |
titzer
2016/07/08 14:16:03
Can we make this a Signature<Conversion>, or bette
gdeepti
2016/07/11 09:50:34
Refactored this function and simd-lowering.cc to u
|
//----------------------------------------------------------------------- |
// Operations that concern the linear memory. |
@@ -192,6 +196,8 @@ class WasmGraphBuilder { |
void SetSourcePosition(Node* node, wasm::WasmCodePosition position); |
+ bool has_simd_ops() { return has_simd_ops_; } |
+ |
private: |
static const int kDefaultBufferSize = 16; |
friend class WasmTrapHelper; |
@@ -213,6 +219,7 @@ class WasmGraphBuilder { |
SetOncePointer<const Operator> allocate_heap_number_operator_; |
compiler::SourcePositionTable* source_position_table_ = nullptr; |
+ bool has_simd_ops_; |
// Internal helper methods. |
JSGraph* jsgraph() { return jsgraph_; } |
@@ -316,6 +323,7 @@ class WasmGraphBuilder { |
Node* BuildJavaScriptToNumber(Node* node, Node* context, Node* effect, |
Node* control); |
Node* BuildChangeInt32ToTagged(Node* value); |
+ Node* BuildChangeTaggedToInt32(Node* value); |
Node* BuildChangeFloat64ToTagged(Node* value); |
Node* BuildChangeTaggedToFloat64(Node* value); |
@@ -348,6 +356,9 @@ class WasmGraphBuilder { |
if (buf != buffer) memcpy(buf, buffer, old_count * sizeof(Node*)); |
return buf; |
} |
+ |
+ // Simd helper functions |
+ void set_has_simd_ops(bool has_simd_ops) { has_simd_ops_ = has_simd_ops; } |
bbudge
2016/07/08 17:17:29
Forgot to comment here. I can't think of a use cas
gdeepti
2016/07/11 09:50:34
Replaced setter with simd() method that sets this
|
}; |
} // namespace compiler |
} // namespace internal |