Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 8d01918e292902edad3c807ae65c5cabd172b4aa..db11ebb390dc5cc6bfbf08e51958cc2cff5a83e7 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1056,51 +1056,14 @@ Handle<HeapNumber> Factory::NewHeapNumber(double value, |
} |
-Handle<Float32x4> Factory::NewFloat32x4(float lanes[4], |
- PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION(isolate(), |
- isolate()->heap()->AllocateFloat32x4(lanes, pretenure), |
- Float32x4); |
-} |
- |
- |
-Handle<Int32x4> Factory::NewInt32x4(int32_t lanes[4], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION( |
- isolate(), isolate()->heap()->AllocateInt32x4(lanes, pretenure), Int32x4); |
-} |
- |
- |
-Handle<Bool32x4> Factory::NewBool32x4(bool lanes[4], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION(isolate(), |
- isolate()->heap()->AllocateBool32x4(lanes, pretenure), |
- Bool32x4); |
-} |
- |
- |
-Handle<Int16x8> Factory::NewInt16x8(int16_t lanes[8], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION( |
- isolate(), isolate()->heap()->AllocateInt16x8(lanes, pretenure), Int16x8); |
-} |
- |
- |
-Handle<Bool16x8> Factory::NewBool16x8(bool lanes[8], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION(isolate(), |
- isolate()->heap()->AllocateBool16x8(lanes, pretenure), |
- Bool16x8); |
-} |
- |
- |
-Handle<Int8x16> Factory::NewInt8x16(int8_t lanes[16], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION( |
- isolate(), isolate()->heap()->AllocateInt8x16(lanes, pretenure), Int8x16); |
-} |
- |
- |
-Handle<Bool8x16> Factory::NewBool8x16(bool lanes[16], PretenureFlag pretenure) { |
- CALL_HEAP_FUNCTION(isolate(), |
- isolate()->heap()->AllocateBool8x16(lanes, pretenure), |
- Bool8x16); |
-} |
+#define SIMD128_NEW_DEF(TYPE, Type, type, lane_count, lane_type) \ |
+ Handle<Type> Factory::New##Type(lane_type lanes[lane_count], \ |
+ PretenureFlag pretenure) { \ |
+ CALL_HEAP_FUNCTION( \ |
+ isolate(), isolate()->heap()->Allocate##Type(lanes, pretenure), Type); \ |
+ } |
+SIMD128_TYPES(SIMD128_NEW_DEF) |
+#undef SIMD128_NEW_DEF |
Handle<Object> Factory::NewError(Handle<JSFunction> constructor, |