Remove SIMD.js from V8.

LOG=Y
BUG=v8:4124,v8:5948
R=bradnelson@chromium.org,bmeurer@chromium.org,jochen@chromium.org,hpayer@chromium.org,danno@chromium.org

Review-Url: https://codereview.chromium.org/2684313003
Cr-Original-Commit-Position: refs/heads/master@{#43162}
Committed: d170c57ab9
Review-Url: https://codereview.chromium.org/2684313003
Cr-Commit-Position: refs/heads/master@{#43169}
This commit is contained in:
bbudge 2017-02-13 12:43:08 -08:00 committed by Commit bot
parent 11f88ef53f
commit a9b59a11f1
108 changed files with 67 additions and 5212 deletions

1
.gitignore vendored
View File

@ -55,7 +55,6 @@ shell_g
/test/promises-aplus/promises-tests
/test/promises-aplus/promises-tests.tar.gz
/test/promises-aplus/sinon
/test/simdjs/data
/test/test262/data
/test/test262/data.tar
/test/test262/harness

View File

@ -493,7 +493,6 @@ action("js2c_experimental") {
"src/js/macros.py",
"src/messages.h",
"src/js/harmony-atomics.js",
"src/js/harmony-simd.js",
]
outputs = [
@ -1717,7 +1716,6 @@ v8_source_set("v8_base") {
"src/runtime/runtime-proxy.cc",
"src/runtime/runtime-regexp.cc",
"src/runtime/runtime-scopes.cc",
"src/runtime/runtime-simd.cc",
"src/runtime/runtime-strings.cc",
"src/runtime/runtime-symbol.cc",
"src/runtime/runtime-test.cc",

1
DEPS
View File

@ -33,7 +33,6 @@ deps = {
Var("chromium_url") + "/v8/deps/third_party/benchmarks.git" + "@" + "05d7188267b4560491ff9155c5ee13e207ecd65f",
"v8/test/mozilla/data":
Var("chromium_url") + "/v8/deps/third_party/mozilla-tests.git" + "@" + "f6c578a10ea707b1a8ab0b88943fe5115ce2b9be",
"v8/test/simdjs/data": Var("chromium_url") + "/external/github.com/tc39/ecmascript_simd.git" + "@" + "baf493985cb9ea7cdbd0d68704860a8156de9556",
"v8/test/test262/data":
Var("chromium_url") + "/external/github.com/tc39/test262.git" + "@" + "a72ee6d91275aa6524e84a9b7070103411ef2689",
"v8/test/test262/harness":

View File

@ -47,7 +47,6 @@
'../test/optimize_for_size.gyp:*',
'../test/perf.gyp:*',
'../test/preparser/preparser.gyp:*',
'../test/simdjs/simdjs.gyp:*',
'../test/test262/test262.gyp:*',
'../test/webkit/webkit.gyp:*',
'../tools/check-static-initializers.gyp:*',

View File

@ -393,8 +393,7 @@ class V8_EXPORT HeapGraphNode {
// snapshot items together.
kConsString = 10, // Concatenated string. A pair of pointers to strings.
kSlicedString = 11, // Sliced string. A fragment of another string.
kSymbol = 12, // A Symbol (ES6).
kSimdValue = 13 // A SIMD value stored in the heap (Proposed ES7).
kSymbol = 12 // A Symbol (ES6).
};
/** Returns node type (see HeapGraphNode::Type). */

View File

@ -2163,12 +2163,6 @@ class V8_EXPORT Value : public Data {
*/
bool IsFloat64Array() const;
/**
* Returns true if this value is a SIMD Float32x4.
* This is an experimental feature.
*/
bool IsFloat32x4() const;
/**
* Returns true if this value is a DataView.
*/
@ -8495,11 +8489,11 @@ class Internals {
static const int kNodeIsIndependentShift = 3;
static const int kNodeIsActiveShift = 4;
static const int kJSApiObjectType = 0xbb;
static const int kJSObjectType = 0xbc;
static const int kJSApiObjectType = 0xba;
static const int kJSObjectType = 0xbb;
static const int kFirstNonstringType = 0x80;
static const int kOddballType = 0x83;
static const int kForeignType = 0x87;
static const int kOddballType = 0x82;
static const int kForeignType = 0x86;
static const int kUndefinedOddballKind = 5;
static const int kNullOddballKind = 3;

View File

@ -195,9 +195,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmp(r4, Operand(SYMBOL_TYPE));
__ b(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmp(r4, Operand(SIMD128_VALUE_TYPE));
__ b(eq, slow);
} else {
__ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE);
__ b(eq, &heap_number);
@ -208,9 +205,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmp(r4, Operand(SYMBOL_TYPE));
__ b(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmp(r4, Operand(SIMD128_VALUE_TYPE));
__ b(eq, slow);
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -197,14 +197,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -163,9 +163,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left,
// Call runtime on identical symbols since we need to throw a TypeError.
__ Cmp(right_type, SYMBOL_TYPE);
__ B(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Cmp(right_type, SIMD128_VALUE_TYPE);
__ B(eq, slow);
} else if (cond == eq) {
__ JumpIfHeapNumber(right, &heap_number);
} else {
@ -177,9 +174,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Register left,
// Call runtime on identical symbols since we need to throw a TypeError.
__ Cmp(right_type, SYMBOL_TYPE);
__ B(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Cmp(right_type, SIMD128_VALUE_TYPE);
__ B(eq, slow);
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -217,14 +217,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -195,8 +195,6 @@ AstType::bitset AstBitsetType::Lub(i::Map* map) {
}
case HEAP_NUMBER_TYPE:
return kNumber & kTaggedPointer;
case SIMD128_VALUE_TYPE:
return kSimd;
case JS_OBJECT_TYPE:
case JS_ARGUMENTS_TYPE:
case JS_ERROR_TYPE:
@ -1298,13 +1296,6 @@ AstBitsetType::bitset AstBitsetType::UnsignedSmall() {
return i::SmiValuesAre31Bits() ? kUnsigned30 : kUnsigned31;
}
#define CONSTRUCT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \
AstType* AstType::Name(Isolate* isolate, Zone* zone) { \
return Class(i::handle(isolate->heap()->name##_map()), zone); \
}
SIMD128_TYPES(CONSTRUCT_SIMD_TYPE)
#undef CONSTRUCT_SIMD_TYPE
// -----------------------------------------------------------------------------
// Instantiations.

View File

@ -156,15 +156,15 @@ namespace internal {
#define AST_REPRESENTATION(k) ((k) & AstBitsetType::kRepresentation)
#define AST_SEMANTIC(k) ((k) & AstBitsetType::kSemantic)
// Bits 21-22 are available.
#define AST_REPRESENTATION_BITSET_TYPE_LIST(V) \
V(None, 0) \
V(UntaggedBit, 1u << 22 | kSemantic) \
V(UntaggedIntegral8, 1u << 23 | kSemantic) \
V(UntaggedIntegral16, 1u << 24 | kSemantic) \
V(UntaggedIntegral32, 1u << 25 | kSemantic) \
V(UntaggedFloat32, 1u << 26 | kSemantic) \
V(UntaggedFloat64, 1u << 27 | kSemantic) \
V(UntaggedSimd128, 1u << 28 | kSemantic) \
V(UntaggedBit, 1u << 23 | kSemantic) \
V(UntaggedIntegral8, 1u << 24 | kSemantic) \
V(UntaggedIntegral16, 1u << 25 | kSemantic) \
V(UntaggedIntegral32, 1u << 26 | kSemantic) \
V(UntaggedFloat32, 1u << 27 | kSemantic) \
V(UntaggedFloat64, 1u << 28 | kSemantic) \
V(UntaggedPointer, 1u << 29 | kSemantic) \
V(TaggedSigned, 1u << 30 | kSemantic) \
V(TaggedPointer, 1u << 31 | kSemantic) \
@ -197,13 +197,12 @@ namespace internal {
V(Symbol, 1u << 12 | AST_REPRESENTATION(kTaggedPointer)) \
V(InternalizedString, 1u << 13 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherString, 1u << 14 | AST_REPRESENTATION(kTaggedPointer)) \
V(Simd, 1u << 15 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherObject, 1u << 17 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherObject, 1u << 15 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherUndetectable, 1u << 16 | AST_REPRESENTATION(kTaggedPointer)) \
V(Proxy, 1u << 18 | AST_REPRESENTATION(kTaggedPointer)) \
V(Function, 1u << 19 | AST_REPRESENTATION(kTaggedPointer)) \
V(Hole, 1u << 20 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherInternal, 1u << 21 | \
V(Proxy, 1u << 17 | AST_REPRESENTATION(kTaggedPointer)) \
V(Function, 1u << 18 | AST_REPRESENTATION(kTaggedPointer)) \
V(Hole, 1u << 19 | AST_REPRESENTATION(kTaggedPointer)) \
V(OtherInternal, 1u << 20 | \
AST_REPRESENTATION(kTagged | kUntagged)) \
\
V(Signed31, kUnsigned30 | kNegative31) \
@ -232,11 +231,10 @@ namespace internal {
V(NullOrUndefined, kNull | kUndefined) \
V(Undetectable, kNullOrUndefined | kOtherUndetectable) \
V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | kHole) \
V(NumberOrSimdOrString, kNumber | kSimd | kString) \
V(NumberOrString, kNumber | kString) \
V(NumberOrUndefined, kNumber | kUndefined) \
V(PlainPrimitive, kNumberOrString | kBoolean | kNullOrUndefined) \
V(Primitive, kSymbol | kSimd | kPlainPrimitive) \
V(Primitive, kSymbol | kPlainPrimitive) \
V(DetectableReceiver, kFunction | kOtherObject | kProxy) \
V(Object, kFunction | kOtherObject | kOtherUndetectable) \
V(Receiver, kObject | kProxy) \
@ -770,11 +768,6 @@ class AstType {
return tuple;
}
#define CONSTRUCT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \
static AstType* Name(Isolate* isolate, Zone* zone);
SIMD128_TYPES(CONSTRUCT_SIMD_TYPE)
#undef CONSTRUCT_SIMD_TYPE
static AstType* Union(AstType* type1, AstType* type2, Zone* zone);
static AstType* Intersect(AstType* type1, AstType* type2, Zone* zone);

View File

@ -3596,38 +3596,6 @@ void Genesis::InitializeGlobal_harmony_sharedarraybuffer() {
Builtins::kAtomicsStore, 3, true);
}
void Genesis::InitializeGlobal_harmony_simd() {
if (!FLAG_harmony_simd) return;
Handle<JSGlobalObject> global(
JSGlobalObject::cast(native_context()->global_object()));
Isolate* isolate = global->GetIsolate();
Factory* factory = isolate->factory();
Handle<String> name = factory->InternalizeUtf8String("SIMD");
Handle<JSFunction> cons = factory->NewFunction(name);
JSFunction::SetInstancePrototype(
cons,
Handle<Object>(native_context()->initial_object_prototype(), isolate));
cons->shared()->set_instance_class_name(*name);
Handle<JSObject> simd_object = factory->NewJSObject(cons, TENURED);
DCHECK(simd_object->IsJSObject());
JSObject::AddProperty(global, name, simd_object, DONT_ENUM);
// Install SIMD type functions. Set the instance class names since
// InstallFunction only does this when we install on the JSGlobalObject.
#define SIMD128_INSTALL_FUNCTION(TYPE, Type, type, lane_count, lane_type) \
Handle<JSFunction> type##_function = InstallFunction( \
simd_object, #Type, JS_VALUE_TYPE, JSValue::kSize, \
isolate->initial_object_prototype(), Builtins::kIllegal); \
native_context()->set_##type##_function(*type##_function); \
type##_function->shared()->set_instance_class_name(*factory->Type##_string());
SIMD128_TYPES(SIMD128_INSTALL_FUNCTION)
#undef SIMD128_INSTALL_FUNCTION
}
void Genesis::InitializeGlobal_harmony_array_prototype_values() {
if (!FLAG_harmony_array_prototype_values) return;
Handle<JSFunction> array_constructor(native_context()->array_function());
@ -4104,8 +4072,6 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_tailcalls_natives[] = {nullptr};
static const char* harmony_sharedarraybuffer_natives[] = {
"native harmony-atomics.js", NULL};
static const char* harmony_simd_natives[] = {"native harmony-simd.js",
nullptr};
static const char* harmony_do_expressions_natives[] = {nullptr};
static const char* harmony_regexp_lookbehind_natives[] = {nullptr};
static const char* harmony_regexp_named_captures_natives[] = {nullptr};

View File

@ -1809,9 +1809,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
Variable search_num(&assembler, MachineRepresentation::kFloat64);
Label ident_loop(&assembler, &index_var),
heap_num_loop(&assembler, &search_num),
string_loop(&assembler, &index_var), simd_loop(&assembler),
undef_loop(&assembler, &index_var), not_smi(&assembler),
not_heap_num(&assembler);
string_loop(&assembler, &index_var), undef_loop(&assembler, &index_var),
not_smi(&assembler), not_heap_num(&assembler);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler.SmiToFloat64(search_element));
@ -1828,10 +1827,6 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_heap_num);
Node* search_type = assembler.LoadMapInstanceType(map);
assembler.GotoIf(assembler.IsStringInstanceType(search_type), &string_loop);
assembler.GotoIf(
assembler.Word32Equal(search_type,
assembler.Int32Constant(SIMD128_VALUE_TYPE)),
&simd_loop);
assembler.Goto(&ident_loop);
assembler.Bind(&ident_loop);
@ -1943,31 +1938,6 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one));
assembler.Goto(&string_loop);
}
assembler.Bind(&simd_loop);
{
Label continue_loop(&assembler, &index_var),
loop_body(&assembler, &index_var);
Node* map = assembler.LoadMap(search_element);
assembler.Goto(&loop_body);
assembler.Bind(&loop_body);
assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler.LoadMap(element_k);
assembler.BranchIfSimd128Equal(search_element, map, element_k, map_k,
&return_true, &continue_loop);
assembler.Bind(&continue_loop);
index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one));
assembler.Goto(&loop_body);
}
}
assembler.Bind(&if_packed_doubles);
@ -2246,9 +2216,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
Variable search_num(&assembler, MachineRepresentation::kFloat64);
Label ident_loop(&assembler, &index_var),
heap_num_loop(&assembler, &search_num),
string_loop(&assembler, &index_var), simd_loop(&assembler),
undef_loop(&assembler, &index_var), not_smi(&assembler),
not_heap_num(&assembler);
string_loop(&assembler, &index_var), undef_loop(&assembler, &index_var),
not_smi(&assembler), not_heap_num(&assembler);
assembler.GotoUnless(assembler.TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler.SmiToFloat64(search_element));
@ -2265,10 +2234,6 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.Bind(&not_heap_num);
Node* search_type = assembler.LoadMapInstanceType(map);
assembler.GotoIf(assembler.IsStringInstanceType(search_type), &string_loop);
assembler.GotoIf(
assembler.Word32Equal(search_type,
assembler.Int32Constant(SIMD128_VALUE_TYPE)),
&simd_loop);
assembler.Goto(&ident_loop);
assembler.Bind(&ident_loop);
@ -2359,31 +2324,6 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one));
assembler.Goto(&string_loop);
}
assembler.Bind(&simd_loop);
{
Label continue_loop(&assembler, &index_var),
loop_body(&assembler, &index_var);
Node* map = assembler.LoadMap(search_element);
assembler.Goto(&loop_body);
assembler.Bind(&loop_body);
assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found);
Node* element_k =
assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler.LoadMap(element_k);
assembler.BranchIfSimd128Equal(search_element, map, element_k, map_k,
&return_found, &continue_loop);
assembler.Bind(&continue_loop);
index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one));
assembler.Goto(&loop_body);
}
}
assembler.Bind(&if_packed_doubles);

View File

@ -381,14 +381,6 @@ Callable CodeFactory::AllocateHeapNumber(Isolate* isolate) {
return make_callable(stub);
}
#define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
Callable CodeFactory::Allocate##Type(Isolate* isolate) { \
Allocate##Type##Stub stub(isolate); \
return make_callable(stub); \
}
SIMD128_TYPES(SIMD128_ALLOC)
#undef SIMD128_ALLOC
// static
Callable CodeFactory::ArgumentAdaptor(Isolate* isolate) {
return Callable(isolate->builtins()->ArgumentsAdaptorTrampoline(),

View File

@ -163,10 +163,6 @@ class V8_EXPORT_PRIVATE CodeFactory final {
static Callable NewRestParameterElements(Isolate* isolate);
static Callable AllocateHeapNumber(Isolate* isolate);
#define SIMD128_ALLOC(TYPE, Type, type, lane_count, lane_type) \
static Callable Allocate##Type(Isolate* isolate);
SIMD128_TYPES(SIMD128_ALLOC)
#undef SIMD128_ALLOC
static Callable ArgumentAdaptor(Isolate* isolate);
static Callable Call(Isolate* isolate,

View File

@ -610,77 +610,6 @@ Node* CodeStubAssembler::WordIsWordAligned(Node* word) {
WordAnd(word, IntPtrConstant((1 << kPointerSizeLog2) - 1)));
}
void CodeStubAssembler::BranchIfSimd128Equal(Node* lhs, Node* lhs_map,
Node* rhs, Node* rhs_map,
Label* if_equal,
Label* if_notequal) {
Label if_mapsame(this), if_mapnotsame(this);
Branch(WordEqual(lhs_map, rhs_map), &if_mapsame, &if_mapnotsame);
Bind(&if_mapsame);
{
// Both {lhs} and {rhs} are Simd128Values with the same map, need special
// handling for Float32x4 because of NaN comparisons.
Label if_float32x4(this), if_notfloat32x4(this);
Node* float32x4_map = HeapConstant(factory()->float32x4_map());
Branch(WordEqual(lhs_map, float32x4_map), &if_float32x4, &if_notfloat32x4);
Bind(&if_float32x4);
{
// Both {lhs} and {rhs} are Float32x4, compare the lanes individually
// using a floating point comparison.
for (int offset = Float32x4::kValueOffset - kHeapObjectTag;
offset < Float32x4::kSize - kHeapObjectTag;
offset += sizeof(float)) {
// Load the floating point values for {lhs} and {rhs}.
Node* lhs_value =
Load(MachineType::Float32(), lhs, IntPtrConstant(offset));
Node* rhs_value =
Load(MachineType::Float32(), rhs, IntPtrConstant(offset));
// Perform a floating point comparison.
Label if_valueequal(this), if_valuenotequal(this);
Branch(Float32Equal(lhs_value, rhs_value), &if_valueequal,
&if_valuenotequal);
Bind(&if_valuenotequal);
Goto(if_notequal);
Bind(&if_valueequal);
}
// All 4 lanes match, {lhs} and {rhs} considered equal.
Goto(if_equal);
}
Bind(&if_notfloat32x4);
{
// For other Simd128Values we just perform a bitwise comparison.
for (int offset = Simd128Value::kValueOffset - kHeapObjectTag;
offset < Simd128Value::kSize - kHeapObjectTag;
offset += kPointerSize) {
// Load the word values for {lhs} and {rhs}.
Node* lhs_value =
Load(MachineType::Pointer(), lhs, IntPtrConstant(offset));
Node* rhs_value =
Load(MachineType::Pointer(), rhs, IntPtrConstant(offset));
// Perform a bitwise word-comparison.
Label if_valueequal(this), if_valuenotequal(this);
Branch(WordEqual(lhs_value, rhs_value), &if_valueequal,
&if_valuenotequal);
Bind(&if_valuenotequal);
Goto(if_notequal);
Bind(&if_valueequal);
}
// Bitwise comparison succeeded, {lhs} and {rhs} considered equal.
Goto(if_equal);
}
}
Bind(&if_mapnotsame);
Goto(if_notequal);
}
void CodeStubAssembler::BranchIfPrototypesHaveNoElements(
Node* receiver_map, Label* definitely_no_elements,
Label* possibly_elements) {
@ -822,7 +751,6 @@ Node* CodeStubAssembler::AllocateRawAligned(Node* size_in_bytes,
Variable adjusted_size(this, MachineType::PointerRepresentation(),
size_in_bytes);
if (flags & kDoubleAlignment) {
// TODO(epertoso): Simd128 alignment.
Label aligned(this), not_aligned(this), merge(this, &adjusted_size);
Branch(WordAnd(top, IntPtrConstant(kDoubleAlignmentMask)), &not_aligned,
&aligned);
@ -850,8 +778,6 @@ Node* CodeStubAssembler::AllocateRawAligned(Node* size_in_bytes,
Bind(&needs_filler);
// Store a filler and increase the address by kPointerSize.
// TODO(epertoso): this code assumes that we only align to kDoubleSize. Change
// it when Simd128 alignment is supported.
StoreNoWriteBarrier(MachineType::PointerRepresentation(), top,
LoadRoot(Heap::kOnePointerFillerMapRootIndex));
address.Bind(BitcastWordToTagged(
@ -4018,8 +3944,8 @@ Node* CodeStubAssembler::NonNumberToNumber(Node* context, Node* input) {
Bind(&if_inputisother);
{
// The {input} is something else (i.e. Symbol or Simd128Value), let the
// runtime figure out the correct exception.
// The {input} is something else (e.g. Symbol), let the runtime figure
// out the correct exception.
// Note: We cannot tail call to the runtime here, as js-to-wasm
// trampolines also use this code currently, and they declare all
// outgoing parameters as untagged, while we would push a tagged
@ -6845,8 +6771,6 @@ void GenerateEqual_Same(CodeStubAssembler* assembler, Node* value,
// In case of abstract or strict equality checks, we need additional checks
// for NaN values because they are not considered equal, even if both the
// left and the right hand side reference exactly the same value.
// TODO(bmeurer): This seems to violate the SIMD.js specification, but it
// seems to be what is tested in the current SIMD.js testsuite.
typedef CodeStubAssembler::Label Label;
@ -6881,15 +6805,6 @@ void GenerateEqual_Same(CodeStubAssembler* assembler, Node* value,
assembler->Bind(&if_valueissmi);
assembler->Goto(if_equal);
}
void GenerateEqual_Simd128Value_HeapObject(
CodeStubAssembler* assembler, Node* lhs, Node* lhs_map, Node* rhs,
Node* rhs_map, CodeStubAssembler::Label* if_equal,
CodeStubAssembler::Label* if_notequal) {
assembler->BranchIfSimd128Equal(lhs, lhs_map, rhs, rhs_map, if_equal,
if_notequal);
}
} // namespace
// ES6 section 7.2.12 Abstract Equality Comparison
@ -7047,8 +6962,8 @@ Node* CodeStubAssembler::Equal(ResultMode mode, Node* lhs, Node* rhs,
Bind(&if_rhsisnotsmi);
{
Label if_lhsisstring(this), if_lhsisnumber(this),
if_lhsissymbol(this), if_lhsissimd128value(this),
if_lhsisoddball(this), if_lhsisreceiver(this);
if_lhsissymbol(this), if_lhsisoddball(this),
if_lhsisreceiver(this);
// Both {lhs} and {rhs} are HeapObjects, load their maps
// and their instance types.
@ -7060,7 +6975,7 @@ Node* CodeStubAssembler::Equal(ResultMode mode, Node* lhs, Node* rhs,
Node* rhs_instance_type = LoadMapInstanceType(rhs_map);
// Dispatch based on the instance type of {lhs}.
size_t const kNumCases = FIRST_NONSTRING_TYPE + 4;
size_t const kNumCases = FIRST_NONSTRING_TYPE + 3;
Label* case_labels[kNumCases];
int32_t case_values[kNumCases];
for (int32_t i = 0; i < FIRST_NONSTRING_TYPE; ++i) {
@ -7071,10 +6986,8 @@ Node* CodeStubAssembler::Equal(ResultMode mode, Node* lhs, Node* rhs,
case_values[FIRST_NONSTRING_TYPE + 0] = HEAP_NUMBER_TYPE;
case_labels[FIRST_NONSTRING_TYPE + 1] = &if_lhsissymbol;
case_values[FIRST_NONSTRING_TYPE + 1] = SYMBOL_TYPE;
case_labels[FIRST_NONSTRING_TYPE + 2] = &if_lhsissimd128value;
case_values[FIRST_NONSTRING_TYPE + 2] = SIMD128_VALUE_TYPE;
case_labels[FIRST_NONSTRING_TYPE + 3] = &if_lhsisoddball;
case_values[FIRST_NONSTRING_TYPE + 3] = ODDBALL_TYPE;
case_labels[FIRST_NONSTRING_TYPE + 2] = &if_lhsisoddball;
case_values[FIRST_NONSTRING_TYPE + 2] = ODDBALL_TYPE;
Switch(lhs_instance_type, &if_lhsisreceiver, case_values, case_labels,
arraysize(case_values));
for (int32_t i = 0; i < FIRST_NONSTRING_TYPE; ++i) {
@ -7258,47 +7171,6 @@ Node* CodeStubAssembler::Equal(ResultMode mode, Node* lhs, Node* rhs,
}
}
Bind(&if_lhsissimd128value);
{
// Check if the {rhs} is also a Simd128Value.
Label if_rhsissimd128value(this), if_rhsisnotsimd128value(this);
Branch(Word32Equal(lhs_instance_type, rhs_instance_type),
&if_rhsissimd128value, &if_rhsisnotsimd128value);
Bind(&if_rhsissimd128value);
{
// Both {lhs} and {rhs} is a Simd128Value.
GenerateEqual_Simd128Value_HeapObject(
this, lhs, lhs_map, rhs, rhs_map, &if_equal, &if_notequal);
}
Bind(&if_rhsisnotsimd128value);
{
// Check if the {rhs} is a JSReceiver.
Label if_rhsisreceiver(this), if_rhsisnotreceiver(this);
STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
Branch(IsJSReceiverInstanceType(rhs_instance_type),
&if_rhsisreceiver, &if_rhsisnotreceiver);
Bind(&if_rhsisreceiver);
{
// The {lhs} is a Primitive and the {rhs} is a JSReceiver.
// Swapping {lhs} and {rhs} is not observable and doesn't
// matter for the result, so we can just swap them and use
// the JSReceiver handling below (for {lhs} being a JSReceiver).
var_lhs.Bind(rhs);
var_rhs.Bind(lhs);
Goto(&loop);
}
Bind(&if_rhsisnotreceiver);
{
// The {rhs} is some other Primitive.
Goto(&if_notequal);
}
}
}
Bind(&if_lhsisreceiver);
{
// Check if the {rhs} is also a JSReceiver.
@ -7417,10 +7289,6 @@ Node* CodeStubAssembler::StrictEqual(ResultMode mode, Node* lhs, Node* rhs,
// } else {
// return false;
// }
// } else if (lhs->IsSimd128()) {
// if (rhs->IsSimd128()) {
// return %StrictEqual(lhs, rhs);
// }
// } else {
// return false;
// }
@ -7454,8 +7322,8 @@ Node* CodeStubAssembler::StrictEqual(ResultMode mode, Node* lhs, Node* rhs,
Bind(&if_notsame);
{
// The {lhs} and {rhs} reference different objects, yet for Smi, HeapNumber,
// String and Simd128Value they can still be considered equal.
// The {lhs} and {rhs} reference different objects, yet for Smi, HeapNumber
// and String they can still be considered equal.
// Check if {lhs} is a Smi or a HeapObject.
Label if_lhsissmi(this), if_lhsisnotsmi(this);
@ -7554,26 +7422,7 @@ Node* CodeStubAssembler::StrictEqual(ResultMode mode, Node* lhs, Node* rhs,
}
Bind(&if_lhsisnotstring);
{
// Check if {lhs} is a Simd128Value.
Label if_lhsissimd128value(this), if_lhsisnotsimd128value(this);
Branch(Word32Equal(lhs_instance_type,
Int32Constant(SIMD128_VALUE_TYPE)),
&if_lhsissimd128value, &if_lhsisnotsimd128value);
Bind(&if_lhsissimd128value);
{
// Load the map of {rhs}.
Node* rhs_map = LoadMap(rhs);
// Check if {rhs} is also a Simd128Value that is equal to {lhs}.
GenerateEqual_Simd128Value_HeapObject(
this, lhs, lhs_map, rhs, rhs_map, &if_equal, &if_notequal);
}
Bind(&if_lhsisnotsimd128value);
Goto(&if_notequal);
}
Goto(&if_notequal);
}
}
}
@ -7880,13 +7729,6 @@ Node* CodeStubAssembler::Typeof(Node* value, Node* context) {
GotoIf(IsStringInstanceType(instance_type), &return_string);
#define SIMD128_BRANCH(TYPE, Type, type, lane_count, lane_type) \
Label return_##type(this); \
Node* type##_map = HeapConstant(factory()->type##_map()); \
GotoIf(WordEqual(map, type##_map), &return_##type);
SIMD128_TYPES(SIMD128_BRANCH)
#undef SIMD128_BRANCH
CSA_ASSERT(this, Word32Equal(instance_type, Int32Constant(SYMBOL_TYPE)));
result_var.Bind(HeapConstant(isolate()->factory()->symbol_string()));
Goto(&return_result);
@ -7928,15 +7770,6 @@ Node* CodeStubAssembler::Typeof(Node* value, Node* context) {
Goto(&return_result);
}
#define SIMD128_BIND_RETURN(TYPE, Type, type, lane_count, lane_type) \
Bind(&return_##type); \
{ \
result_var.Bind(HeapConstant(isolate()->factory()->type##_string())); \
Goto(&return_result); \
}
SIMD128_TYPES(SIMD128_BIND_RETURN)
#undef SIMD128_BIND_RETURN
Bind(&return_result);
return result_var.value();
}

View File

@ -307,14 +307,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// otherwise goes to {if_false}.
void BranchIfToBooleanIsTrue(Node* value, Label* if_true, Label* if_false);
void BranchIfSimd128Equal(Node* lhs, Node* lhs_map, Node* rhs, Node* rhs_map,
Label* if_equal, Label* if_notequal);
void BranchIfSimd128Equal(Node* lhs, Node* rhs, Label* if_equal,
Label* if_notequal) {
BranchIfSimd128Equal(lhs, LoadMap(lhs), rhs, LoadMap(rhs), if_equal,
if_notequal);
}
void BranchIfJSReceiver(Node* object, Label* if_true, Label* if_false);
void BranchIfJSObject(Node* object, Label* if_true, Label* if_false);

View File

@ -488,21 +488,6 @@ void AllocateHeapNumberStub::GenerateAssembly(
assembler.Return(result);
}
#define SIMD128_GEN_ASM(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Stub::GenerateAssembly( \
compiler::CodeAssemblerState* state) const { \
CodeStubAssembler assembler(state); \
compiler::Node* result = \
assembler.Allocate(Simd128Value::kSize, CodeStubAssembler::kNone); \
compiler::Node* map = assembler.LoadMap(result); \
assembler.StoreNoWriteBarrier( \
MachineRepresentation::kTagged, map, \
assembler.HeapConstant(isolate()->factory()->type##_map())); \
assembler.Return(result); \
}
SIMD128_TYPES(SIMD128_GEN_ASM)
#undef SIMD128_GEN_ASM
void StringLengthStub::GenerateAssembly(
compiler::CodeAssemblerState* state) const {
CodeStubAssembler assembler(state);
@ -1960,15 +1945,6 @@ void AllocateHeapNumberStub::InitializeDescriptor(
}
#define SIMD128_INIT_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Stub::InitializeDescriptor( \
CodeStubDescriptor* descriptor) { \
descriptor->Initialize( \
Runtime::FunctionForId(Runtime::kCreate##Type)->entry); \
}
SIMD128_TYPES(SIMD128_INIT_DESC)
#undef SIMD128_INIT_DESC
void ToBooleanICStub::InitializeDescriptor(CodeStubDescriptor* descriptor) {
descriptor->Initialize(FUNCTION_ADDR(Runtime_ToBooleanIC_Miss));
descriptor->SetMissHandler(Runtime::kToBooleanIC_Miss);
@ -2154,9 +2130,6 @@ bool ToBooleanICStub::UpdateStatus(Handle<Object> object) {
new_hints |= ToBooleanHint::kHeapNumber;
double value = HeapNumber::cast(*object)->value();
to_boolean_value = value != 0 && !std::isnan(value);
} else if (object->IsSimd128Value()) {
new_hints |= ToBooleanHint::kSimdValue;
to_boolean_value = true;
} else {
// We should never see an internal object at runtime here!
UNREACHABLE();

View File

@ -66,16 +66,6 @@ class Node;
V(TransitionElementsKind) \
/* --- TurboFanCodeStubs --- */ \
V(AllocateHeapNumber) \
V(AllocateFloat32x4) \
V(AllocateInt32x4) \
V(AllocateUint32x4) \
V(AllocateBool32x4) \
V(AllocateInt16x8) \
V(AllocateUint16x8) \
V(AllocateBool16x8) \
V(AllocateInt8x16) \
V(AllocateUint8x16) \
V(AllocateBool8x16) \
V(ArrayNoArgumentConstructor) \
V(ArraySingleArgumentConstructor) \
V(ArrayNArgumentsConstructor) \
@ -1568,21 +1558,6 @@ class AllocateHeapNumberStub : public TurboFanCodeStub {
DEFINE_TURBOFAN_CODE_STUB(AllocateHeapNumber, TurboFanCodeStub);
};
#define SIMD128_ALLOC_STUB(TYPE, Type, type, lane_count, lane_type) \
class Allocate##Type##Stub : public TurboFanCodeStub { \
public: \
explicit Allocate##Type##Stub(Isolate* isolate) \
: TurboFanCodeStub(isolate) {} \
\
void InitializeDescriptor(CodeStubDescriptor* descriptor) override; \
void GenerateAssembly(compiler::CodeAssemblerState* state) const override; \
\
DEFINE_CALL_INTERFACE_DESCRIPTOR(Allocate##Type); \
DEFINE_CODE_STUB(Allocate##Type, TurboFanCodeStub); \
};
SIMD128_TYPES(SIMD128_ALLOC_STUB)
#undef SIMD128_ALLOC_STUB
class CommonArrayConstructorStub : public TurboFanCodeStub {
protected:
CommonArrayConstructorStub(Isolate* isolate, ElementsKind kind,
@ -1754,7 +1729,7 @@ class ToBooleanICStub : public HydrogenCodeStub {
ToBooleanICStub(Isolate* isolate, InitializationState init_state)
: HydrogenCodeStub(isolate, init_state) {}
static const int kNumHints = 9;
static const int kNumHints = 8;
STATIC_ASSERT(static_cast<int>(ToBooleanHint::kAny) ==
((1 << kNumHints) - 1));
class HintsBits : public BitField<uint16_t, 0, kNumHints> {};

View File

@ -1000,10 +1000,10 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node, bool invert) {
return Replace(replacement);
}
}
if (r.OneInputCannotBe(Type::NumberOrSimdOrString())) {
if (r.OneInputCannotBe(Type::NumberOrString())) {
// For values with canonical representation (i.e. neither String, nor
// Simd128Value nor Number) an empty type intersection means the values
// cannot be strictly equal.
// Number) an empty type intersection means the values cannot be strictly
// equal.
if (!r.left_type()->Maybe(r.right_type())) {
Node* replacement = jsgraph()->BooleanConstant(invert);
ReplaceWithValue(node, replacement);

View File

@ -190,8 +190,6 @@ Type::bitset BitsetType::Lub(i::Map* map) {
}
case HEAP_NUMBER_TYPE:
return kNumber;
case SIMD128_VALUE_TYPE:
return kSimd;
case JS_OBJECT_TYPE:
case JS_ARGUMENTS_TYPE:
case JS_ERROR_TYPE:

View File

@ -116,17 +116,16 @@ namespace compiler {
V(Symbol, 1u << 12) \
V(InternalizedString, 1u << 13) \
V(OtherString, 1u << 14) \
V(Simd, 1u << 15) \
V(OtherCallable, 1u << 16) \
V(OtherObject, 1u << 17) \
V(OtherUndetectable, 1u << 18) \
V(CallableProxy, 1u << 19) \
V(OtherProxy, 1u << 20) \
V(Function, 1u << 21) \
V(BoundFunction, 1u << 22) \
V(Hole, 1u << 23) \
V(OtherInternal, 1u << 24) \
V(ExternalPointer, 1u << 25) \
V(OtherCallable, 1u << 15) \
V(OtherObject, 1u << 16) \
V(OtherUndetectable, 1u << 17) \
V(CallableProxy, 1u << 18) \
V(OtherProxy, 1u << 19) \
V(Function, 1u << 20) \
V(BoundFunction, 1u << 21) \
V(Hole, 1u << 22) \
V(OtherInternal, 1u << 23) \
V(ExternalPointer, 1u << 24) \
\
V(Signed31, kUnsigned30 | kNegative31) \
V(Signed32, kSigned31 | kOtherUnsigned31 | \
@ -158,12 +157,11 @@ namespace compiler {
V(Undetectable, kNullOrUndefined | kOtherUndetectable) \
V(NumberOrOddball, kNumber | kNullOrUndefined | kBoolean | \
kHole) \
V(NumberOrSimdOrString, kNumber | kSimd | kString) \
V(NumberOrString, kNumber | kString) \
V(NumberOrUndefined, kNumber | kUndefined) \
V(PlainPrimitive, kNumberOrString | kBoolean | \
kNullOrUndefined) \
V(Primitive, kSymbol | kSimd | kPlainPrimitive) \
V(Primitive, kSymbol | kPlainPrimitive) \
V(OtherUndetectableOrUndefined, kOtherUndetectable | kUndefined) \
V(Proxy, kCallableProxy | kOtherProxy) \
V(Callable, kFunction | kBoundFunction | \

View File

@ -202,9 +202,6 @@ enum ContextLookupFlags {
V(ASYNC_FUNCTION_AWAIT_RESOLVE_SHARED_FUN, SharedFunctionInfo, \
async_function_await_resolve_shared_fun) \
V(ASYNC_FUNCTION_FUNCTION_INDEX, JSFunction, async_function_constructor) \
V(BOOL16X8_FUNCTION_INDEX, JSFunction, bool16x8_function) \
V(BOOL32X4_FUNCTION_INDEX, JSFunction, bool32x4_function) \
V(BOOL8X16_FUNCTION_INDEX, JSFunction, bool8x16_function) \
V(BOOLEAN_FUNCTION_INDEX, JSFunction, boolean_function) \
V(BOUND_FUNCTION_WITH_CONSTRUCTOR_MAP_INDEX, Map, \
bound_function_with_constructor_map) \
@ -228,7 +225,6 @@ enum ContextLookupFlags {
V(FAST_TEMPLATE_INSTANTIATIONS_CACHE_INDEX, FixedArray, \
fast_template_instantiations_cache) \
V(FLOAT32_ARRAY_FUN_INDEX, JSFunction, float32_array_fun) \
V(FLOAT32X4_FUNCTION_INDEX, JSFunction, float32x4_function) \
V(FLOAT64_ARRAY_FUN_INDEX, JSFunction, float64_array_fun) \
V(FUNCTION_FUNCTION_INDEX, JSFunction, function_function) \
V(GENERATOR_FUNCTION_FUNCTION_INDEX, JSFunction, \
@ -243,11 +239,8 @@ enum ContextLookupFlags {
V(INITIAL_ITERATOR_PROTOTYPE_INDEX, JSObject, initial_iterator_prototype) \
V(INITIAL_OBJECT_PROTOTYPE_INDEX, JSObject, initial_object_prototype) \
V(INT16_ARRAY_FUN_INDEX, JSFunction, int16_array_fun) \
V(INT16X8_FUNCTION_INDEX, JSFunction, int16x8_function) \
V(INT32_ARRAY_FUN_INDEX, JSFunction, int32_array_fun) \
V(INT32X4_FUNCTION_INDEX, JSFunction, int32x4_function) \
V(INT8_ARRAY_FUN_INDEX, JSFunction, int8_array_fun) \
V(INT8X16_FUNCTION_INDEX, JSFunction, int8x16_function) \
V(INTERNAL_ARRAY_FUNCTION_INDEX, JSFunction, internal_array_function) \
V(ITERATOR_RESULT_MAP_INDEX, Map, iterator_result_map) \
V(INTL_DATE_TIME_FORMAT_FUNCTION_INDEX, JSFunction, \
@ -346,12 +339,9 @@ enum ContextLookupFlags {
V(TYPED_ARRAY_FUN_INDEX, JSFunction, typed_array_function) \
V(TYPED_ARRAY_PROTOTYPE_INDEX, JSObject, typed_array_prototype) \
V(UINT16_ARRAY_FUN_INDEX, JSFunction, uint16_array_fun) \
V(UINT16X8_FUNCTION_INDEX, JSFunction, uint16x8_function) \
V(UINT32_ARRAY_FUN_INDEX, JSFunction, uint32_array_fun) \
V(UINT32X4_FUNCTION_INDEX, JSFunction, uint32x4_function) \
V(UINT8_ARRAY_FUN_INDEX, JSFunction, uint8_array_fun) \
V(UINT8_CLAMPED_ARRAY_FUN_INDEX, JSFunction, uint8_clamped_array_fun) \
V(UINT8X16_FUNCTION_INDEX, JSFunction, uint8x16_function) \
NATIVE_CONTEXT_INTRINSIC_FUNCTIONS(V) \
NATIVE_CONTEXT_IMPORTED_FIELDS(V) \
NATIVE_CONTEXT_JS_ARRAY_ITERATOR_MAPS(V)

View File

@ -2130,12 +2130,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ b(eq, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
__ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
__ b(eq, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
DwVfpRegister dbl_scratch = double_scratch0();
@ -5136,17 +5130,6 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
final_branch_condition = eq;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label); \
__ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
__ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
final_branch_condition = eq;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ b(false_label);
}

View File

@ -1865,12 +1865,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ B(eq, true_label);
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
__ CompareInstanceType(map, scratch, SIMD128_VALUE_TYPE);
__ B(eq, true_label);
}
if (expected & ToBooleanHint::kHeapNumber) {
Label not_heap_number;
__ JumpIfNotRoot(map, Heap::kHeapNumberMapRootIndex, &not_heap_number);
@ -5452,20 +5446,6 @@ void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) {
EmitTestAndBranch(instr, eq, scratch,
(1 << Map::kIsCallable) | (1 << Map::kIsUndetectable));
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
DCHECK((instr->temp1() != NULL) && (instr->temp2() != NULL)); \
Register map = ToRegister(instr->temp1()); \
\
__ JumpIfSmi(value, false_label); \
__ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset)); \
__ CompareRoot(map, Heap::k##Type##MapRootIndex); \
EmitBranch(instr, eq);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ B(false_label);
}

View File

@ -1072,9 +1072,9 @@ std::ostream& HReturn::PrintDataTo(std::ostream& os) const { // NOLINT
Representation HBranch::observed_input_representation(int index) {
if (expected_input_types_ & (ToBooleanHint::kNull | ToBooleanHint::kReceiver |
ToBooleanHint::kString | ToBooleanHint::kSymbol |
ToBooleanHint::kSimdValue)) {
if (expected_input_types_ &
(ToBooleanHint::kNull | ToBooleanHint::kReceiver |
ToBooleanHint::kString | ToBooleanHint::kSymbol)) {
return Representation::Tagged();
}
if (expected_input_types_ & ToBooleanHint::kUndefined) {
@ -1244,17 +1244,6 @@ String* TypeOfString(HConstant* constant, Isolate* isolate) {
}
case SYMBOL_TYPE:
return heap->symbol_string();
case SIMD128_VALUE_TYPE: {
Unique<Map> map = constant->ObjectMap();
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
if (map.IsKnownGlobal(heap->type##_map())) { \
return heap->type##_string(); \
}
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
UNREACHABLE();
return nullptr;
}
default:
if (constant->IsUndetectable()) return heap->undefined_string();
if (constant->IsCallable()) return heap->function_string();

View File

@ -11137,11 +11137,9 @@ bool IsLiteralCompareStrict(Isolate* isolate, HValue* left, Token::Value op,
return op == Token::EQ_STRICT &&
((left->IsConstant() &&
!HConstant::cast(left)->handle(isolate)->IsNumber() &&
!HConstant::cast(left)->handle(isolate)->IsSimd128Value() &&
!HConstant::cast(left)->handle(isolate)->IsString()) ||
(right->IsConstant() &&
!HConstant::cast(right)->handle(isolate)->IsNumber() &&
!HConstant::cast(right)->handle(isolate)->IsSimd128Value() &&
!HConstant::cast(right)->handle(isolate)->IsString()));
}

View File

@ -1927,12 +1927,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
__ CmpInstanceType(map, SIMD128_VALUE_TYPE);
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
@ -4913,18 +4907,6 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
__ test_b(FieldOperand(input, Map::kBitFieldOffset),
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
final_branch_condition = zero;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory()->type##_string())) { \
__ JumpIfSmi(input, false_label, false_distance); \
__ cmp(FieldOperand(input, HeapObject::kMapOffset), \
factory()->type##_map()); \
final_branch_condition = equal;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ jmp(false_label, false_distance);
}

View File

@ -2025,14 +2025,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
const Register scratch = scratch1();
__ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
__ Branch(instr->TrueLabel(chunk_), eq, scratch,
Operand(SIMD128_VALUE_TYPE));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
DoubleRegister dbl_scratch = double_scratch0();
@ -5170,19 +5162,6 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
*cmp2 = Operand(zero_reg);
final_branch_condition = eq;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label); \
__ lw(input, FieldMemOperand(input, HeapObject::kMapOffset)); \
__ LoadRoot(at, Heap::k##Type##MapRootIndex); \
*cmp1 = input; \
*cmp2 = Operand(at); \
final_branch_condition = eq;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
*cmp1 = at;
*cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.

View File

@ -2146,14 +2146,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
const Register scratch = scratch1();
__ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
__ Branch(instr->TrueLabel(chunk_), eq, scratch,
Operand(SIMD128_VALUE_TYPE));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
DoubleRegister dbl_scratch = double_scratch0();
@ -5363,20 +5355,6 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
*cmp2 = Operand(zero_reg);
final_branch_condition = eq;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label); \
__ ld(input, FieldMemOperand(input, HeapObject::kMapOffset)); \
__ LoadRoot(at, Heap::k##Type##MapRootIndex); \
*cmp1 = input; \
*cmp2 = Operand(at); \
final_branch_condition = eq;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
*cmp1 = at;
*cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.

View File

@ -2206,13 +2206,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ beq(instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
Label not_simd;
__ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
__ beq(instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
@ -5442,17 +5435,6 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, Label* false_label,
__ cmpi(r0, Operand::Zero());
final_branch_condition = eq;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label); \
__ LoadP(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
__ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
final_branch_condition = eq;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ b(false_label);
}

View File

@ -2209,13 +2209,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ beq(instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
Label not_simd;
__ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
__ beq(instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
@ -5384,17 +5377,6 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, Label* false_label,
__ CmpP(r0, Operand::Zero());
final_branch_condition = eq;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label); \
__ LoadP(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
__ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
final_branch_condition = eq;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ b(false_label);
}

View File

@ -2065,12 +2065,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
__ CmpInstanceType(map, SIMD128_VALUE_TYPE);
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
@ -5195,17 +5189,6 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
final_branch_condition = zero;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory->type##_string())) { \
__ JumpIfSmi(input, false_label, false_distance); \
__ CompareRoot(FieldOperand(input, HeapObject::kMapOffset), \
Heap::k##Type##MapRootIndex); \
final_branch_condition = equal;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ jmp(false_label, false_distance);
}

View File

@ -2198,12 +2198,6 @@ void LCodeGen::DoBranch(LBranch* instr) {
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kSimdValue) {
// SIMD value -> true.
__ CmpInstanceType(map, SIMD128_VALUE_TYPE);
__ j(equal, instr->TrueLabel(chunk_));
}
if (expected & ToBooleanHint::kHeapNumber) {
// heap number -> false iff +0, -0, or NaN.
Label not_heap_number;
@ -5406,17 +5400,6 @@ Condition LCodeGen::EmitTypeofIs(LTypeofIsAndBranch* instr, Register input) {
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
final_branch_condition = zero;
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(type_name, factory()->type##_string())) { \
__ JumpIfSmi(input, false_label, false_distance); \
__ cmp(FieldOperand(input, HeapObject::kMapOffset), \
factory()->type##_map()); \
final_branch_condition = equal;
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
__ jmp(false_label, false_distance);
}

View File

@ -3929,7 +3929,6 @@ Handle<Object> TranslatedState::MaterializeCapturedObjectAt(
case SHORT_EXTERNAL_INTERNALIZED_STRING_WITH_ONE_BYTE_DATA_TYPE:
case SYMBOL_TYPE:
case ODDBALL_TYPE:
case SIMD128_VALUE_TYPE:
case JS_GLOBAL_OBJECT_TYPE:
case JS_GLOBAL_PROXY_TYPE:
case JS_API_OBJECT_TYPE:

View File

@ -1340,16 +1340,6 @@ Handle<HeapNumber> Factory::NewHeapNumber(MutableMode mode,
HeapNumber);
}
#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,
MessageTemplate::Template template_index,
Handle<Object> arg0, Handle<Object> arg1,

View File

@ -469,12 +469,6 @@ class V8_EXPORT_PRIVATE Factory final {
Handle<HeapNumber> NewHeapNumber(MutableMode mode,
PretenureFlag pretenure = NOT_TENURED);
#define SIMD128_NEW_DECL(TYPE, Type, type, lane_count, lane_type) \
Handle<Type> New##Type(lane_type lanes[lane_count], \
PretenureFlag pretenure = NOT_TENURED);
SIMD128_TYPES(SIMD128_NEW_DECL)
#undef SIMD128_NEW_DECL
Handle<JSWeakMap> NewJSWeakMap();
Handle<JSObject> NewArgumentsObject(Handle<JSFunction> callee, int length);

View File

@ -199,7 +199,6 @@ DEFINE_IMPLICATION(es_staging, move_object_start)
V(harmony_function_sent, "harmony function.sent") \
V(harmony_tailcalls, "harmony tail calls") \
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
V(harmony_simd, "harmony simd") \
V(harmony_do_expressions, "harmony do-expressions") \
V(harmony_regexp_named_captures, "harmony regexp named captures") \
V(harmony_regexp_property, "harmony unicode regexp property classes") \

View File

@ -2608,16 +2608,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset));
__ tst(r1, Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(eq, if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(r0, if_false); \
__ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); \
__ CompareRoot(r0, Heap::k##Type##MapRootIndex); \
Split(eq, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -2578,18 +2578,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ Ldrb(x10, FieldMemOperand(x10, Map::kBitFieldOffset));
__ TestAndSplit(x10, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable),
if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof " \
#type "_string"); \
__ JumpIfSmi(x0, if_true); \
__ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); \
__ CompareRoot(x0, Heap::k##Type##MapRootIndex); \
Split(eq, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof other");
if (if_false != fall_through) __ B(if_false);

View File

@ -2542,16 +2542,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ test_b(FieldOperand(edx, Map::kBitFieldOffset),
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(zero, if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(eax, if_false); \
__ cmp(FieldOperand(eax, HeapObject::kMapOffset), \
isolate()->factory()->type##_map()); \
Split(equal, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -2634,16 +2634,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ And(a1, a1,
Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(v0, if_false); \
__ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \
__ LoadRoot(at, Heap::k##Type##MapRootIndex); \
Split(eq, v0, Operand(at), if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -2635,16 +2635,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ And(a1, a1,
Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(eq, a1, Operand(zero_reg), if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(v0, if_false); \
__ ld(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); \
__ LoadRoot(at, Heap::k##Type##MapRootIndex); \
Split(eq, v0, Operand(at), if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -2621,16 +2621,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ andi(r0, r4,
Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(eq, if_true, if_false, fall_through, cr0);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(r3, if_false); \
__ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); \
__ CompareRoot(r3, Heap::k##Type##MapRootIndex); \
Split(eq, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ b(if_false);
}

View File

@ -2570,16 +2570,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ tm(FieldMemOperand(r2, Map::kBitFieldOffset),
Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(eq, if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(r2, if_false); \
__ LoadP(r2, FieldMemOperand(r2, HeapObject::kMapOffset)); \
__ CompareRoot(r2, Heap::k##Type##MapRootIndex); \
Split(eq, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ b(if_false);
}

View File

@ -2526,16 +2526,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ testb(FieldOperand(rdx, Map::kBitFieldOffset),
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(zero, if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(rax, if_false); \
__ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); \
__ CompareRoot(rax, Heap::k##Type##MapRootIndex); \
Split(equal, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -2532,16 +2532,6 @@ void FullCodeGenerator::EmitLiteralCompareTypeof(Expression* expr,
__ test_b(FieldOperand(edx, Map::kBitFieldOffset),
Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
Split(zero, if_true, if_false, fall_through);
// clang-format off
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
} else if (String::Equals(check, factory->type##_string())) { \
__ JumpIfSmi(eax, if_false); \
__ cmp(FieldOperand(eax, HeapObject::kMapOffset), \
isolate()->factory()->type##_map()); \
Split(equal, if_true, if_false, fall_through);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
// clang-format on
} else {
if (if_false != fall_through) __ jmp(if_false);
}

View File

@ -27,12 +27,6 @@
V(regexp_to_string, "[object RegExp]") \
V(string_to_string, "[object String]") \
V(bind_string, "bind") \
V(bool16x8_string, "bool16x8") \
V(Bool16x8_string, "Bool16x8") \
V(bool32x4_string, "bool32x4") \
V(Bool32x4_string, "Bool32x4") \
V(bool8x16_string, "bool8x16") \
V(Bool8x16_string, "Bool8x16") \
V(boolean_string, "boolean") \
V(Boolean_string, "Boolean") \
V(bound__string, "bound ") \
@ -77,8 +71,6 @@
V(EvalError_string, "EvalError") \
V(false_string, "false") \
V(flags_string, "flags") \
V(float32x4_string, "float32x4") \
V(Float32x4_string, "Float32x4") \
V(function_string, "function") \
V(Function_string, "Function") \
V(Generator_string, "Generator") \
@ -97,12 +89,6 @@
V(index_string, "index") \
V(infinity_string, "Infinity") \
V(input_string, "input") \
V(int16x8_string, "int16x8") \
V(Int16x8_string, "Int16x8") \
V(int32x4_string, "int32x4") \
V(Int32x4_string, "Int32x4") \
V(int8x16_string, "int8x16") \
V(Int8x16_string, "Int8x16") \
V(isExtensible_string, "isExtensible") \
V(isView_string, "isView") \
V(KeyedLoadMonomorphic_string, "KeyedLoadMonomorphic") \
@ -185,12 +171,6 @@
V(CompileError_string, "CompileError") \
V(LinkError_string, "LinkError") \
V(RuntimeError_string, "RuntimeError") \
V(uint16x8_string, "uint16x8") \
V(Uint16x8_string, "Uint16x8") \
V(uint32x4_string, "uint32x4") \
V(Uint32x4_string, "Uint32x4") \
V(uint8x16_string, "uint8x16") \
V(Uint8x16_string, "Uint8x16") \
V(undefined_string, "undefined") \
V(undefined_to_string, "[object Undefined]") \
V(unicode_string, "unicode") \

View File

@ -2282,11 +2282,6 @@ bool Heap::CreateInitialMaps() {
mutable_heap_number)
ALLOCATE_PRIMITIVE_MAP(SYMBOL_TYPE, Symbol::kSize, symbol,
Context::SYMBOL_FUNCTION_INDEX)
#define ALLOCATE_SIMD128_MAP(TYPE, Type, type, lane_count, lane_type) \
ALLOCATE_PRIMITIVE_MAP(SIMD128_VALUE_TYPE, Type::kSize, type, \
Context::TYPE##_FUNCTION_INDEX)
SIMD128_TYPES(ALLOCATE_SIMD128_MAP)
#undef ALLOCATE_SIMD128_MAP
ALLOCATE_MAP(FOREIGN_TYPE, Foreign::kSize, foreign)
ALLOCATE_PRIMITIVE_MAP(ODDBALL_TYPE, Oddball::kSize, boolean,
@ -2452,32 +2447,6 @@ AllocationResult Heap::AllocateHeapNumber(MutableMode mode,
return result;
}
#define SIMD_ALLOCATE_DEFINITION(TYPE, Type, type, lane_count, lane_type) \
AllocationResult Heap::Allocate##Type(lane_type lanes[lane_count], \
PretenureFlag pretenure) { \
int size = Type::kSize; \
STATIC_ASSERT(Type::kSize <= kMaxRegularHeapObjectSize); \
\
AllocationSpace space = SelectSpace(pretenure); \
\
HeapObject* result = nullptr; \
{ \
AllocationResult allocation = \
AllocateRaw(size, space, kSimd128Unaligned); \
if (!allocation.To(&result)) return allocation; \
} \
\
result->set_map_no_write_barrier(type##_map()); \
Type* instance = Type::cast(result); \
for (int i = 0; i < lane_count; i++) { \
instance->set_lane(i, lanes[i]); \
} \
return result; \
}
SIMD128_TYPES(SIMD_ALLOCATE_DEFINITION)
#undef SIMD_ALLOCATE_DEFINITION
AllocationResult Heap::AllocateCell(Object* value) {
int size = Cell::kSize;
STATIC_ASSERT(Cell::kSize <= kMaxRegularHeapObjectSize);

View File

@ -135,16 +135,6 @@ using v8::MemoryPressureLevel;
V(Map, fixed_float32_array_map, FixedFloat32ArrayMap) \
V(Map, fixed_float64_array_map, FixedFloat64ArrayMap) \
V(Map, fixed_uint8_clamped_array_map, FixedUint8ClampedArrayMap) \
V(Map, float32x4_map, Float32x4Map) \
V(Map, int32x4_map, Int32x4Map) \
V(Map, uint32x4_map, Uint32x4Map) \
V(Map, bool32x4_map, Bool32x4Map) \
V(Map, int16x8_map, Int16x8Map) \
V(Map, uint16x8_map, Uint16x8Map) \
V(Map, bool16x8_map, Bool16x8Map) \
V(Map, int8x16_map, Int8x16Map) \
V(Map, uint8x16_map, Uint8x16Map) \
V(Map, bool8x16_map, Bool8x16Map) \
/* Canonical empty values */ \
V(ByteArray, empty_byte_array, EmptyByteArray) \
V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \
@ -281,16 +271,6 @@ using v8::MemoryPressureLevel;
V(MetaMap) \
V(HeapNumberMap) \
V(MutableHeapNumberMap) \
V(Float32x4Map) \
V(Int32x4Map) \
V(Uint32x4Map) \
V(Bool32x4Map) \
V(Int16x8Map) \
V(Uint16x8Map) \
V(Bool16x8Map) \
V(Int8x16Map) \
V(Uint8x16Map) \
V(Bool8x16Map) \
V(NativeContextMap) \
V(FixedArrayMap) \
V(CodeMap) \
@ -1958,13 +1938,6 @@ class Heap {
MUST_USE_RESULT AllocationResult AllocateHeapNumber(
MutableMode mode = IMMUTABLE, PretenureFlag pretenure = NOT_TENURED);
// Allocates SIMD values from the given lane values.
#define SIMD_ALLOCATE_DECLARATION(TYPE, Type, type, lane_count, lane_type) \
AllocationResult Allocate##Type(lane_type lanes[lane_count], \
PretenureFlag pretenure = NOT_TENURED);
SIMD128_TYPES(SIMD_ALLOCATE_DECLARATION)
#undef SIMD_ALLOCATE_DECLARATION
// Allocates a byte array of the specified length
MUST_USE_RESULT AllocationResult
AllocateByteArray(int length, PretenureFlag pretenure = NOT_TENURED);

View File

@ -180,7 +180,6 @@ StaticVisitorBase::VisitorId StaticVisitorBase::GetVisitorId(
case FOREIGN_TYPE:
case HEAP_NUMBER_TYPE:
case MUTABLE_HEAP_NUMBER_TYPE:
case SIMD128_VALUE_TYPE:
return GetVisitorIdForSize(kVisitDataObject, kVisitDataObjectGeneric,
instance_size, has_unboxed_fields);

View File

@ -973,9 +973,6 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmpb(ecx, Immediate(SYMBOL_TYPE));
__ j(equal, &runtime_call, Label::kFar);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmpb(ecx, Immediate(SIMD128_VALUE_TYPE));
__ j(equal, &runtime_call, Label::kFar);
}
__ Move(eax, Immediate(Smi::FromInt(EQUAL)));
__ ret(0);

View File

@ -197,14 +197,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -55,16 +55,6 @@ class PlatformInterfaceDescriptor;
V(CopyFastSmiOrObjectElements) \
V(TransitionElementsKind) \
V(AllocateHeapNumber) \
V(AllocateFloat32x4) \
V(AllocateInt32x4) \
V(AllocateUint32x4) \
V(AllocateBool32x4) \
V(AllocateInt16x8) \
V(AllocateUint16x8) \
V(AllocateBool16x8) \
V(AllocateInt8x16) \
V(AllocateUint8x16) \
V(AllocateBool8x16) \
V(Builtin) \
V(ArrayConstructor) \
V(ForEach) \
@ -694,14 +684,6 @@ class AllocateHeapNumberDescriptor : public CallInterfaceDescriptor {
DECLARE_DESCRIPTOR(AllocateHeapNumberDescriptor, CallInterfaceDescriptor)
};
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
class Allocate##Type##Descriptor : public CallInterfaceDescriptor { \
public: \
DECLARE_DESCRIPTOR(Allocate##Type##Descriptor, CallInterfaceDescriptor) \
};
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
class BuiltinDescriptor : public CallInterfaceDescriptor {
public:
// TODO(ishell): Where is kFunction??

View File

@ -1,923 +0,0 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
(function(global, utils) {
"use strict";
%CheckIsBootstrapping();
// -------------------------------------------------------------------
// Imports
var GlobalSIMD = global.SIMD;
var toStringTagSymbol = utils.ImportNow("to_string_tag_symbol");
// -------------------------------------------------------------------
macro SIMD_FLOAT_TYPES(FUNCTION)
FUNCTION(Float32x4, float32x4, 4)
endmacro
macro SIMD_INT_TYPES(FUNCTION)
FUNCTION(Int32x4, int32x4, 4)
FUNCTION(Int16x8, int16x8, 8)
FUNCTION(Int8x16, int8x16, 16)
endmacro
macro SIMD_UINT_TYPES(FUNCTION)
FUNCTION(Uint32x4, uint32x4, 4)
FUNCTION(Uint16x8, uint16x8, 8)
FUNCTION(Uint8x16, uint8x16, 16)
endmacro
macro SIMD_BOOL_TYPES(FUNCTION)
FUNCTION(Bool32x4, bool32x4, 4)
FUNCTION(Bool16x8, bool16x8, 8)
FUNCTION(Bool8x16, bool8x16, 16)
endmacro
macro SIMD_ALL_TYPES(FUNCTION)
SIMD_FLOAT_TYPES(FUNCTION)
SIMD_INT_TYPES(FUNCTION)
SIMD_UINT_TYPES(FUNCTION)
SIMD_BOOL_TYPES(FUNCTION)
endmacro
macro DECLARE_GLOBALS(NAME, TYPE, LANES)
var GlobalNAME = GlobalSIMD.NAME;
endmacro
SIMD_ALL_TYPES(DECLARE_GLOBALS)
macro DECLARE_COMMON_FUNCTIONS(NAME, TYPE, LANES)
function NAMECheckJS(a) {
return %NAMECheck(a);
}
function NAMEToString() {
var value = %ValueOf(this);
if (typeof(value) !== 'TYPE') {
throw %make_type_error(kIncompatibleMethodReceiver,
"NAME.prototype.toString", this);
}
var str = "SIMD.NAME(";
str += %NAMEExtractLane(value, 0);
for (var i = 1; i < LANES; i++) {
str += ", " + %NAMEExtractLane(value, i);
}
return str + ")";
}
function NAMEToLocaleString() {
var value = %ValueOf(this);
if (typeof(value) !== 'TYPE') {
throw %make_type_error(kIncompatibleMethodReceiver,
"NAME.prototype.toLocaleString", this);
}
var str = "SIMD.NAME(";
str += %NAMEExtractLane(value, 0).toLocaleString();
for (var i = 1; i < LANES; i++) {
str += ", " + %NAMEExtractLane(value, i).toLocaleString();
}
return str + ")";
}
function NAMEValueOf() {
var value = %ValueOf(this);
if (typeof(value) !== 'TYPE') {
throw %make_type_error(kIncompatibleMethodReceiver,
"NAME.prototype.valueOf", this);
}
return value;
}
function NAMEExtractLaneJS(instance, lane) {
return %NAMEExtractLane(instance, lane);
}
endmacro
SIMD_ALL_TYPES(DECLARE_COMMON_FUNCTIONS)
macro DECLARE_SHIFT_FUNCTIONS(NAME, TYPE, LANES)
function NAMEShiftLeftByScalarJS(instance, shift) {
return %NAMEShiftLeftByScalar(instance, shift);
}
function NAMEShiftRightByScalarJS(instance, shift) {
return %NAMEShiftRightByScalar(instance, shift);
}
endmacro
SIMD_INT_TYPES(DECLARE_SHIFT_FUNCTIONS)
SIMD_UINT_TYPES(DECLARE_SHIFT_FUNCTIONS)
macro SIMD_SMALL_INT_TYPES(FUNCTION)
FUNCTION(Int16x8)
FUNCTION(Int8x16)
FUNCTION(Uint8x16)
FUNCTION(Uint16x8)
endmacro
macro DECLARE_SMALL_INT_FUNCTIONS(NAME)
function NAMEAddSaturateJS(a, b) {
return %NAMEAddSaturate(a, b);
}
function NAMESubSaturateJS(a, b) {
return %NAMESubSaturate(a, b);
}
endmacro
SIMD_SMALL_INT_TYPES(DECLARE_SMALL_INT_FUNCTIONS)
macro DECLARE_SIGNED_FUNCTIONS(NAME, TYPE, LANES)
function NAMENegJS(a) {
return %NAMENeg(a);
}
endmacro
SIMD_FLOAT_TYPES(DECLARE_SIGNED_FUNCTIONS)
SIMD_INT_TYPES(DECLARE_SIGNED_FUNCTIONS)
macro DECLARE_BOOL_FUNCTIONS(NAME, TYPE, LANES)
function NAMEReplaceLaneJS(instance, lane, value) {
return %NAMEReplaceLane(instance, lane, value);
}
function NAMEAnyTrueJS(s) {
return %NAMEAnyTrue(s);
}
function NAMEAllTrueJS(s) {
return %NAMEAllTrue(s);
}
endmacro
SIMD_BOOL_TYPES(DECLARE_BOOL_FUNCTIONS)
macro SIMD_NUMERIC_TYPES(FUNCTION)
SIMD_FLOAT_TYPES(FUNCTION)
SIMD_INT_TYPES(FUNCTION)
SIMD_UINT_TYPES(FUNCTION)
endmacro
macro DECLARE_NUMERIC_FUNCTIONS(NAME, TYPE, LANES)
function NAMEReplaceLaneJS(instance, lane, value) {
return %NAMEReplaceLane(instance, lane, TO_NUMBER(value));
}
function NAMESelectJS(selector, a, b) {
return %NAMESelect(selector, a, b);
}
function NAMEAddJS(a, b) {
return %NAMEAdd(a, b);
}
function NAMESubJS(a, b) {
return %NAMESub(a, b);
}
function NAMEMulJS(a, b) {
return %NAMEMul(a, b);
}
function NAMEMinJS(a, b) {
return %NAMEMin(a, b);
}
function NAMEMaxJS(a, b) {
return %NAMEMax(a, b);
}
function NAMEEqualJS(a, b) {
return %NAMEEqual(a, b);
}
function NAMENotEqualJS(a, b) {
return %NAMENotEqual(a, b);
}
function NAMELessThanJS(a, b) {
return %NAMELessThan(a, b);
}
function NAMELessThanOrEqualJS(a, b) {
return %NAMELessThanOrEqual(a, b);
}
function NAMEGreaterThanJS(a, b) {
return %NAMEGreaterThan(a, b);
}
function NAMEGreaterThanOrEqualJS(a, b) {
return %NAMEGreaterThanOrEqual(a, b);
}
function NAMELoadJS(tarray, index) {
return %NAMELoad(tarray, index);
}
function NAMEStoreJS(tarray, index, a) {
return %NAMEStore(tarray, index, a);
}
endmacro
SIMD_NUMERIC_TYPES(DECLARE_NUMERIC_FUNCTIONS)
macro SIMD_LOGICAL_TYPES(FUNCTION)
SIMD_INT_TYPES(FUNCTION)
SIMD_UINT_TYPES(FUNCTION)
SIMD_BOOL_TYPES(FUNCTION)
endmacro
macro DECLARE_LOGICAL_FUNCTIONS(NAME, TYPE, LANES)
function NAMEAndJS(a, b) {
return %NAMEAnd(a, b);
}
function NAMEOrJS(a, b) {
return %NAMEOr(a, b);
}
function NAMEXorJS(a, b) {
return %NAMEXor(a, b);
}
function NAMENotJS(a) {
return %NAMENot(a);
}
endmacro
SIMD_LOGICAL_TYPES(DECLARE_LOGICAL_FUNCTIONS)
macro SIMD_FROM_TYPES(FUNCTION)
FUNCTION(Float32x4, Int32x4)
FUNCTION(Float32x4, Uint32x4)
FUNCTION(Int32x4, Float32x4)
FUNCTION(Int32x4, Uint32x4)
FUNCTION(Uint32x4, Float32x4)
FUNCTION(Uint32x4, Int32x4)
FUNCTION(Int16x8, Uint16x8)
FUNCTION(Uint16x8, Int16x8)
FUNCTION(Int8x16, Uint8x16)
FUNCTION(Uint8x16, Int8x16)
endmacro
macro DECLARE_FROM_FUNCTIONS(TO, FROM)
function TOFromFROMJS(a) {
return %TOFromFROM(a);
}
endmacro
SIMD_FROM_TYPES(DECLARE_FROM_FUNCTIONS)
macro SIMD_FROM_BITS_TYPES(FUNCTION)
FUNCTION(Float32x4, Int32x4)
FUNCTION(Float32x4, Uint32x4)
FUNCTION(Float32x4, Int16x8)
FUNCTION(Float32x4, Uint16x8)
FUNCTION(Float32x4, Int8x16)
FUNCTION(Float32x4, Uint8x16)
FUNCTION(Int32x4, Float32x4)
FUNCTION(Int32x4, Uint32x4)
FUNCTION(Int32x4, Int16x8)
FUNCTION(Int32x4, Uint16x8)
FUNCTION(Int32x4, Int8x16)
FUNCTION(Int32x4, Uint8x16)
FUNCTION(Uint32x4, Float32x4)
FUNCTION(Uint32x4, Int32x4)
FUNCTION(Uint32x4, Int16x8)
FUNCTION(Uint32x4, Uint16x8)
FUNCTION(Uint32x4, Int8x16)
FUNCTION(Uint32x4, Uint8x16)
FUNCTION(Int16x8, Float32x4)
FUNCTION(Int16x8, Int32x4)
FUNCTION(Int16x8, Uint32x4)
FUNCTION(Int16x8, Uint16x8)
FUNCTION(Int16x8, Int8x16)
FUNCTION(Int16x8, Uint8x16)
FUNCTION(Uint16x8, Float32x4)
FUNCTION(Uint16x8, Int32x4)
FUNCTION(Uint16x8, Uint32x4)
FUNCTION(Uint16x8, Int16x8)
FUNCTION(Uint16x8, Int8x16)
FUNCTION(Uint16x8, Uint8x16)
FUNCTION(Int8x16, Float32x4)
FUNCTION(Int8x16, Int32x4)
FUNCTION(Int8x16, Uint32x4)
FUNCTION(Int8x16, Int16x8)
FUNCTION(Int8x16, Uint16x8)
FUNCTION(Int8x16, Uint8x16)
FUNCTION(Uint8x16, Float32x4)
FUNCTION(Uint8x16, Int32x4)
FUNCTION(Uint8x16, Uint32x4)
FUNCTION(Uint8x16, Int16x8)
FUNCTION(Uint8x16, Uint16x8)
FUNCTION(Uint8x16, Int8x16)
endmacro
macro DECLARE_FROM_BITS_FUNCTIONS(TO, FROM)
function TOFromFROMBitsJS(a) {
return %TOFromFROMBits(a);
}
endmacro
SIMD_FROM_BITS_TYPES(DECLARE_FROM_BITS_FUNCTIONS)
macro SIMD_LOADN_STOREN_TYPES(FUNCTION)
FUNCTION(Float32x4, 1)
FUNCTION(Float32x4, 2)
FUNCTION(Float32x4, 3)
FUNCTION(Int32x4, 1)
FUNCTION(Int32x4, 2)
FUNCTION(Int32x4, 3)
FUNCTION(Uint32x4, 1)
FUNCTION(Uint32x4, 2)
FUNCTION(Uint32x4, 3)
endmacro
macro DECLARE_LOADN_STOREN_FUNCTIONS(NAME, COUNT)
function NAMELoadCOUNTJS(tarray, index) {
return %NAMELoadCOUNT(tarray, index);
}
function NAMEStoreCOUNTJS(tarray, index, a) {
return %NAMEStoreCOUNT(tarray, index, a);
}
endmacro
SIMD_LOADN_STOREN_TYPES(DECLARE_LOADN_STOREN_FUNCTIONS)
//-------------------------------------------------------------------
macro SIMD_X4_TYPES(FUNCTION)
FUNCTION(Float32x4)
FUNCTION(Int32x4)
FUNCTION(Uint32x4)
FUNCTION(Bool32x4)
endmacro
macro DECLARE_X4_FUNCTIONS(NAME)
function NAMESplat(s) {
return %CreateNAME(s, s, s, s);
}
function NAMESwizzleJS(a, c0, c1, c2, c3) {
return %NAMESwizzle(a, c0, c1, c2, c3);
}
function NAMEShuffleJS(a, b, c0, c1, c2, c3) {
return %NAMEShuffle(a, b, c0, c1, c2, c3);
}
endmacro
SIMD_X4_TYPES(DECLARE_X4_FUNCTIONS)
macro SIMD_X8_TYPES(FUNCTION)
FUNCTION(Int16x8)
FUNCTION(Uint16x8)
FUNCTION(Bool16x8)
endmacro
macro DECLARE_X8_FUNCTIONS(NAME)
function NAMESplat(s) {
return %CreateNAME(s, s, s, s, s, s, s, s);
}
function NAMESwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7) {
return %NAMESwizzle(a, c0, c1, c2, c3, c4, c5, c6, c7);
}
function NAMEShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7) {
return %NAMEShuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7);
}
endmacro
SIMD_X8_TYPES(DECLARE_X8_FUNCTIONS)
macro SIMD_X16_TYPES(FUNCTION)
FUNCTION(Int8x16)
FUNCTION(Uint8x16)
FUNCTION(Bool8x16)
endmacro
macro DECLARE_X16_FUNCTIONS(NAME)
function NAMESplat(s) {
return %CreateNAME(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s);
}
function NAMESwizzleJS(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15) {
return %NAMESwizzle(a, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15);
}
function NAMEShuffleJS(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
c11, c12, c13, c14, c15) {
return %NAMEShuffle(a, b, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10,
c11, c12, c13, c14, c15);
}
endmacro
SIMD_X16_TYPES(DECLARE_X16_FUNCTIONS)
//-------------------------------------------------------------------
function Float32x4Constructor(c0, c1, c2, c3) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Float32x4");
}
return %CreateFloat32x4(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3));
}
function Int32x4Constructor(c0, c1, c2, c3) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Int32x4");
}
return %CreateInt32x4(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3));
}
function Uint32x4Constructor(c0, c1, c2, c3) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Uint32x4");
}
return %CreateUint32x4(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3));
}
function Bool32x4Constructor(c0, c1, c2, c3) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Bool32x4");
}
return %CreateBool32x4(c0, c1, c2, c3);
}
function Int16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Int16x8");
}
return %CreateInt16x8(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3),
TO_NUMBER(c4), TO_NUMBER(c5),
TO_NUMBER(c6), TO_NUMBER(c7));
}
function Uint16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Uint16x8");
}
return %CreateUint16x8(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3),
TO_NUMBER(c4), TO_NUMBER(c5),
TO_NUMBER(c6), TO_NUMBER(c7));
}
function Bool16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Bool16x8");
}
return %CreateBool16x8(c0, c1, c2, c3, c4, c5, c6, c7);
}
function Int8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Int8x16");
}
return %CreateInt8x16(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3),
TO_NUMBER(c4), TO_NUMBER(c5),
TO_NUMBER(c6), TO_NUMBER(c7),
TO_NUMBER(c8), TO_NUMBER(c9),
TO_NUMBER(c10), TO_NUMBER(c11),
TO_NUMBER(c12), TO_NUMBER(c13),
TO_NUMBER(c14), TO_NUMBER(c15));
}
function Uint8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Uint8x16");
}
return %CreateUint8x16(TO_NUMBER(c0), TO_NUMBER(c1),
TO_NUMBER(c2), TO_NUMBER(c3),
TO_NUMBER(c4), TO_NUMBER(c5),
TO_NUMBER(c6), TO_NUMBER(c7),
TO_NUMBER(c8), TO_NUMBER(c9),
TO_NUMBER(c10), TO_NUMBER(c11),
TO_NUMBER(c12), TO_NUMBER(c13),
TO_NUMBER(c14), TO_NUMBER(c15));
}
function Bool8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11,
c12, c13, c14, c15) {
if (!IS_UNDEFINED(new.target)) {
throw %make_type_error(kNotConstructor, "Bool8x16");
}
return %CreateBool8x16(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
c13, c14, c15);
}
function Float32x4AbsJS(a) {
return %Float32x4Abs(a);
}
function Float32x4SqrtJS(a) {
return %Float32x4Sqrt(a);
}
function Float32x4RecipApproxJS(a) {
return %Float32x4RecipApprox(a);
}
function Float32x4RecipSqrtApproxJS(a) {
return %Float32x4RecipSqrtApprox(a);
}
function Float32x4DivJS(a, b) {
return %Float32x4Div(a, b);
}
function Float32x4MinNumJS(a, b) {
return %Float32x4MinNum(a, b);
}
function Float32x4MaxNumJS(a, b) {
return %Float32x4MaxNum(a, b);
}
%AddNamedProperty(GlobalSIMD, toStringTagSymbol, 'SIMD', READ_ONLY | DONT_ENUM);
macro SETUP_SIMD_TYPE(NAME, TYPE, LANES)
%SetCode(GlobalNAME, NAMEConstructor);
%FunctionSetPrototype(GlobalNAME, {});
%AddNamedProperty(GlobalNAME.prototype, 'constructor', GlobalNAME,
DONT_ENUM);
%AddNamedProperty(GlobalNAME.prototype, toStringTagSymbol, 'NAME',
DONT_ENUM | READ_ONLY);
utils.InstallFunctions(GlobalNAME.prototype, DONT_ENUM, [
'toLocaleString', NAMEToLocaleString,
'toString', NAMEToString,
'valueOf', NAMEValueOf,
]);
endmacro
SIMD_ALL_TYPES(SETUP_SIMD_TYPE)
//-------------------------------------------------------------------
utils.InstallFunctions(GlobalFloat32x4, DONT_ENUM, [
'splat', Float32x4Splat,
'check', Float32x4CheckJS,
'extractLane', Float32x4ExtractLaneJS,
'replaceLane', Float32x4ReplaceLaneJS,
'neg', Float32x4NegJS,
'abs', Float32x4AbsJS,
'sqrt', Float32x4SqrtJS,
'reciprocalApproximation', Float32x4RecipApproxJS,
'reciprocalSqrtApproximation', Float32x4RecipSqrtApproxJS,
'add', Float32x4AddJS,
'sub', Float32x4SubJS,
'mul', Float32x4MulJS,
'div', Float32x4DivJS,
'min', Float32x4MinJS,
'max', Float32x4MaxJS,
'minNum', Float32x4MinNumJS,
'maxNum', Float32x4MaxNumJS,
'lessThan', Float32x4LessThanJS,
'lessThanOrEqual', Float32x4LessThanOrEqualJS,
'greaterThan', Float32x4GreaterThanJS,
'greaterThanOrEqual', Float32x4GreaterThanOrEqualJS,
'equal', Float32x4EqualJS,
'notEqual', Float32x4NotEqualJS,
'select', Float32x4SelectJS,
'swizzle', Float32x4SwizzleJS,
'shuffle', Float32x4ShuffleJS,
'fromInt32x4', Float32x4FromInt32x4JS,
'fromUint32x4', Float32x4FromUint32x4JS,
'fromInt32x4Bits', Float32x4FromInt32x4BitsJS,
'fromUint32x4Bits', Float32x4FromUint32x4BitsJS,
'fromInt16x8Bits', Float32x4FromInt16x8BitsJS,
'fromUint16x8Bits', Float32x4FromUint16x8BitsJS,
'fromInt8x16Bits', Float32x4FromInt8x16BitsJS,
'fromUint8x16Bits', Float32x4FromUint8x16BitsJS,
'load', Float32x4LoadJS,
'load1', Float32x4Load1JS,
'load2', Float32x4Load2JS,
'load3', Float32x4Load3JS,
'store', Float32x4StoreJS,
'store1', Float32x4Store1JS,
'store2', Float32x4Store2JS,
'store3', Float32x4Store3JS,
]);
utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [
'splat', Int32x4Splat,
'check', Int32x4CheckJS,
'extractLane', Int32x4ExtractLaneJS,
'replaceLane', Int32x4ReplaceLaneJS,
'neg', Int32x4NegJS,
'add', Int32x4AddJS,
'sub', Int32x4SubJS,
'mul', Int32x4MulJS,
'min', Int32x4MinJS,
'max', Int32x4MaxJS,
'and', Int32x4AndJS,
'or', Int32x4OrJS,
'xor', Int32x4XorJS,
'not', Int32x4NotJS,
'shiftLeftByScalar', Int32x4ShiftLeftByScalarJS,
'shiftRightByScalar', Int32x4ShiftRightByScalarJS,
'lessThan', Int32x4LessThanJS,
'lessThanOrEqual', Int32x4LessThanOrEqualJS,
'greaterThan', Int32x4GreaterThanJS,
'greaterThanOrEqual', Int32x4GreaterThanOrEqualJS,
'equal', Int32x4EqualJS,
'notEqual', Int32x4NotEqualJS,
'select', Int32x4SelectJS,
'swizzle', Int32x4SwizzleJS,
'shuffle', Int32x4ShuffleJS,
'fromFloat32x4', Int32x4FromFloat32x4JS,
'fromUint32x4', Int32x4FromUint32x4JS,
'fromFloat32x4Bits', Int32x4FromFloat32x4BitsJS,
'fromUint32x4Bits', Int32x4FromUint32x4BitsJS,
'fromInt16x8Bits', Int32x4FromInt16x8BitsJS,
'fromUint16x8Bits', Int32x4FromUint16x8BitsJS,
'fromInt8x16Bits', Int32x4FromInt8x16BitsJS,
'fromUint8x16Bits', Int32x4FromUint8x16BitsJS,
'load', Int32x4LoadJS,
'load1', Int32x4Load1JS,
'load2', Int32x4Load2JS,
'load3', Int32x4Load3JS,
'store', Int32x4StoreJS,
'store1', Int32x4Store1JS,
'store2', Int32x4Store2JS,
'store3', Int32x4Store3JS,
]);
utils.InstallFunctions(GlobalUint32x4, DONT_ENUM, [
'splat', Uint32x4Splat,
'check', Uint32x4CheckJS,
'extractLane', Uint32x4ExtractLaneJS,
'replaceLane', Uint32x4ReplaceLaneJS,
'add', Uint32x4AddJS,
'sub', Uint32x4SubJS,
'mul', Uint32x4MulJS,
'min', Uint32x4MinJS,
'max', Uint32x4MaxJS,
'and', Uint32x4AndJS,
'or', Uint32x4OrJS,
'xor', Uint32x4XorJS,
'not', Uint32x4NotJS,
'shiftLeftByScalar', Uint32x4ShiftLeftByScalarJS,
'shiftRightByScalar', Uint32x4ShiftRightByScalarJS,
'lessThan', Uint32x4LessThanJS,
'lessThanOrEqual', Uint32x4LessThanOrEqualJS,
'greaterThan', Uint32x4GreaterThanJS,
'greaterThanOrEqual', Uint32x4GreaterThanOrEqualJS,
'equal', Uint32x4EqualJS,
'notEqual', Uint32x4NotEqualJS,
'select', Uint32x4SelectJS,
'swizzle', Uint32x4SwizzleJS,
'shuffle', Uint32x4ShuffleJS,
'fromFloat32x4', Uint32x4FromFloat32x4JS,
'fromInt32x4', Uint32x4FromInt32x4JS,
'fromFloat32x4Bits', Uint32x4FromFloat32x4BitsJS,
'fromInt32x4Bits', Uint32x4FromInt32x4BitsJS,
'fromInt16x8Bits', Uint32x4FromInt16x8BitsJS,
'fromUint16x8Bits', Uint32x4FromUint16x8BitsJS,
'fromInt8x16Bits', Uint32x4FromInt8x16BitsJS,
'fromUint8x16Bits', Uint32x4FromUint8x16BitsJS,
'load', Uint32x4LoadJS,
'load1', Uint32x4Load1JS,
'load2', Uint32x4Load2JS,
'load3', Uint32x4Load3JS,
'store', Uint32x4StoreJS,
'store1', Uint32x4Store1JS,
'store2', Uint32x4Store2JS,
'store3', Uint32x4Store3JS,
]);
utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [
'splat', Bool32x4Splat,
'check', Bool32x4CheckJS,
'extractLane', Bool32x4ExtractLaneJS,
'replaceLane', Bool32x4ReplaceLaneJS,
'and', Bool32x4AndJS,
'or', Bool32x4OrJS,
'xor', Bool32x4XorJS,
'not', Bool32x4NotJS,
'anyTrue', Bool32x4AnyTrueJS,
'allTrue', Bool32x4AllTrueJS,
'swizzle', Bool32x4SwizzleJS,
'shuffle', Bool32x4ShuffleJS,
]);
utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [
'splat', Int16x8Splat,
'check', Int16x8CheckJS,
'extractLane', Int16x8ExtractLaneJS,
'replaceLane', Int16x8ReplaceLaneJS,
'neg', Int16x8NegJS,
'add', Int16x8AddJS,
'sub', Int16x8SubJS,
'addSaturate', Int16x8AddSaturateJS,
'subSaturate', Int16x8SubSaturateJS,
'mul', Int16x8MulJS,
'min', Int16x8MinJS,
'max', Int16x8MaxJS,
'and', Int16x8AndJS,
'or', Int16x8OrJS,
'xor', Int16x8XorJS,
'not', Int16x8NotJS,
'shiftLeftByScalar', Int16x8ShiftLeftByScalarJS,
'shiftRightByScalar', Int16x8ShiftRightByScalarJS,
'lessThan', Int16x8LessThanJS,
'lessThanOrEqual', Int16x8LessThanOrEqualJS,
'greaterThan', Int16x8GreaterThanJS,
'greaterThanOrEqual', Int16x8GreaterThanOrEqualJS,
'equal', Int16x8EqualJS,
'notEqual', Int16x8NotEqualJS,
'select', Int16x8SelectJS,
'swizzle', Int16x8SwizzleJS,
'shuffle', Int16x8ShuffleJS,
'fromUint16x8', Int16x8FromUint16x8JS,
'fromFloat32x4Bits', Int16x8FromFloat32x4BitsJS,
'fromInt32x4Bits', Int16x8FromInt32x4BitsJS,
'fromUint32x4Bits', Int16x8FromUint32x4BitsJS,
'fromUint16x8Bits', Int16x8FromUint16x8BitsJS,
'fromInt8x16Bits', Int16x8FromInt8x16BitsJS,
'fromUint8x16Bits', Int16x8FromUint8x16BitsJS,
'load', Int16x8LoadJS,
'store', Int16x8StoreJS,
]);
utils.InstallFunctions(GlobalUint16x8, DONT_ENUM, [
'splat', Uint16x8Splat,
'check', Uint16x8CheckJS,
'extractLane', Uint16x8ExtractLaneJS,
'replaceLane', Uint16x8ReplaceLaneJS,
'add', Uint16x8AddJS,
'sub', Uint16x8SubJS,
'addSaturate', Uint16x8AddSaturateJS,
'subSaturate', Uint16x8SubSaturateJS,
'mul', Uint16x8MulJS,
'min', Uint16x8MinJS,
'max', Uint16x8MaxJS,
'and', Uint16x8AndJS,
'or', Uint16x8OrJS,
'xor', Uint16x8XorJS,
'not', Uint16x8NotJS,
'shiftLeftByScalar', Uint16x8ShiftLeftByScalarJS,
'shiftRightByScalar', Uint16x8ShiftRightByScalarJS,
'lessThan', Uint16x8LessThanJS,
'lessThanOrEqual', Uint16x8LessThanOrEqualJS,
'greaterThan', Uint16x8GreaterThanJS,
'greaterThanOrEqual', Uint16x8GreaterThanOrEqualJS,
'equal', Uint16x8EqualJS,
'notEqual', Uint16x8NotEqualJS,
'select', Uint16x8SelectJS,
'swizzle', Uint16x8SwizzleJS,
'shuffle', Uint16x8ShuffleJS,
'fromInt16x8', Uint16x8FromInt16x8JS,
'fromFloat32x4Bits', Uint16x8FromFloat32x4BitsJS,
'fromInt32x4Bits', Uint16x8FromInt32x4BitsJS,
'fromUint32x4Bits', Uint16x8FromUint32x4BitsJS,
'fromInt16x8Bits', Uint16x8FromInt16x8BitsJS,
'fromInt8x16Bits', Uint16x8FromInt8x16BitsJS,
'fromUint8x16Bits', Uint16x8FromUint8x16BitsJS,
'load', Uint16x8LoadJS,
'store', Uint16x8StoreJS,
]);
utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [
'splat', Bool16x8Splat,
'check', Bool16x8CheckJS,
'extractLane', Bool16x8ExtractLaneJS,
'replaceLane', Bool16x8ReplaceLaneJS,
'and', Bool16x8AndJS,
'or', Bool16x8OrJS,
'xor', Bool16x8XorJS,
'not', Bool16x8NotJS,
'anyTrue', Bool16x8AnyTrueJS,
'allTrue', Bool16x8AllTrueJS,
'swizzle', Bool16x8SwizzleJS,
'shuffle', Bool16x8ShuffleJS,
]);
utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [
'splat', Int8x16Splat,
'check', Int8x16CheckJS,
'extractLane', Int8x16ExtractLaneJS,
'replaceLane', Int8x16ReplaceLaneJS,
'neg', Int8x16NegJS,
'add', Int8x16AddJS,
'sub', Int8x16SubJS,
'addSaturate', Int8x16AddSaturateJS,
'subSaturate', Int8x16SubSaturateJS,
'mul', Int8x16MulJS,
'min', Int8x16MinJS,
'max', Int8x16MaxJS,
'and', Int8x16AndJS,
'or', Int8x16OrJS,
'xor', Int8x16XorJS,
'not', Int8x16NotJS,
'shiftLeftByScalar', Int8x16ShiftLeftByScalarJS,
'shiftRightByScalar', Int8x16ShiftRightByScalarJS,
'lessThan', Int8x16LessThanJS,
'lessThanOrEqual', Int8x16LessThanOrEqualJS,
'greaterThan', Int8x16GreaterThanJS,
'greaterThanOrEqual', Int8x16GreaterThanOrEqualJS,
'equal', Int8x16EqualJS,
'notEqual', Int8x16NotEqualJS,
'select', Int8x16SelectJS,
'swizzle', Int8x16SwizzleJS,
'shuffle', Int8x16ShuffleJS,
'fromUint8x16', Int8x16FromUint8x16JS,
'fromFloat32x4Bits', Int8x16FromFloat32x4BitsJS,
'fromInt32x4Bits', Int8x16FromInt32x4BitsJS,
'fromUint32x4Bits', Int8x16FromUint32x4BitsJS,
'fromInt16x8Bits', Int8x16FromInt16x8BitsJS,
'fromUint16x8Bits', Int8x16FromUint16x8BitsJS,
'fromUint8x16Bits', Int8x16FromUint8x16BitsJS,
'load', Int8x16LoadJS,
'store', Int8x16StoreJS,
]);
utils.InstallFunctions(GlobalUint8x16, DONT_ENUM, [
'splat', Uint8x16Splat,
'check', Uint8x16CheckJS,
'extractLane', Uint8x16ExtractLaneJS,
'replaceLane', Uint8x16ReplaceLaneJS,
'add', Uint8x16AddJS,
'sub', Uint8x16SubJS,
'addSaturate', Uint8x16AddSaturateJS,
'subSaturate', Uint8x16SubSaturateJS,
'mul', Uint8x16MulJS,
'min', Uint8x16MinJS,
'max', Uint8x16MaxJS,
'and', Uint8x16AndJS,
'or', Uint8x16OrJS,
'xor', Uint8x16XorJS,
'not', Uint8x16NotJS,
'shiftLeftByScalar', Uint8x16ShiftLeftByScalarJS,
'shiftRightByScalar', Uint8x16ShiftRightByScalarJS,
'lessThan', Uint8x16LessThanJS,
'lessThanOrEqual', Uint8x16LessThanOrEqualJS,
'greaterThan', Uint8x16GreaterThanJS,
'greaterThanOrEqual', Uint8x16GreaterThanOrEqualJS,
'equal', Uint8x16EqualJS,
'notEqual', Uint8x16NotEqualJS,
'select', Uint8x16SelectJS,
'swizzle', Uint8x16SwizzleJS,
'shuffle', Uint8x16ShuffleJS,
'fromInt8x16', Uint8x16FromInt8x16JS,
'fromFloat32x4Bits', Uint8x16FromFloat32x4BitsJS,
'fromInt32x4Bits', Uint8x16FromInt32x4BitsJS,
'fromUint32x4Bits', Uint8x16FromUint32x4BitsJS,
'fromInt16x8Bits', Uint8x16FromInt16x8BitsJS,
'fromUint16x8Bits', Uint8x16FromUint16x8BitsJS,
'fromInt8x16Bits', Uint8x16FromInt8x16BitsJS,
'load', Uint8x16LoadJS,
'store', Uint8x16StoreJS,
]);
utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [
'splat', Bool8x16Splat,
'check', Bool8x16CheckJS,
'extractLane', Bool8x16ExtractLaneJS,
'replaceLane', Bool8x16ReplaceLaneJS,
'and', Bool8x16AndJS,
'or', Bool8x16OrJS,
'xor', Bool8x16XorJS,
'not', Bool8x16NotJS,
'anyTrue', Bool8x16AnyTrueJS,
'allTrue', Bool8x16AllTrueJS,
'swizzle', Bool8x16SwizzleJS,
'shuffle', Bool8x16ShuffleJS,
]);
})

View File

@ -64,7 +64,6 @@ macro IS_SCRIPT(arg) = (%_ClassOf(arg) === 'Script');
macro IS_SET(arg) = (%_ClassOf(arg) === 'Set');
macro IS_SET_ITERATOR(arg) = (%_ClassOf(arg) === 'Set Iterator');
macro IS_SHAREDARRAYBUFFER(arg) = (%_ClassOf(arg) === 'SharedArrayBuffer');
macro IS_SIMD_VALUE(arg) = (%IsSimdValue(arg));
macro IS_STRING(arg) = (typeof(arg) === 'string');
macro IS_SYMBOL(arg) = (typeof(arg) === 'symbol');
macro IS_TYPEDARRAY(arg) = (%_IsTypedArray(arg));

View File

@ -323,7 +323,6 @@ JsonStringifier::Result JsonStringifier::Serialize_(Handle<Object> object,
case JS_VALUE_TYPE:
if (deferred_string_key) SerializeDeferredKey(comma, key);
return SerializeJSValue(Handle<JSValue>::cast(object));
case SIMD128_VALUE_TYPE:
case SYMBOL_TYPE:
return UNCHANGED;
default:

View File

@ -316,7 +316,6 @@ class ErrorUtils : public AllStatic {
T(InvalidInOperatorUse, "Cannot use 'in' operator to search for '%' in %") \
T(InvalidRegExpExecResult, \
"RegExp exec method returned something other than an Object or null") \
T(InvalidSimdOperation, "% is not a valid type for this SIMD operation.") \
T(IteratorResultNotAnObject, "Iterator result % is not an object") \
T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \
T(LanguageID, "Language ID should be string or object.") \
@ -479,7 +478,6 @@ class ErrorUtils : public AllStatic {
T(SymbolKeyFor, "% is not a symbol") \
T(SymbolToNumber, "Cannot convert a Symbol value to a number") \
T(SymbolToString, "Cannot convert a Symbol value to a string") \
T(SimdToNumber, "Cannot convert a SIMD value to a number") \
T(ThrowMethodMissing, "The iterator does not provide a 'throw' method.") \
T(UndefinedOrNullToObject, "Cannot convert undefined or null to object") \
T(ValueAndAccessor, \
@ -518,8 +516,6 @@ class ErrorUtils : public AllStatic {
T(InvalidTypedArrayAlignment, "% of % should be a multiple of %") \
T(InvalidTypedArrayIndex, "Invalid typed array index") \
T(InvalidTypedArrayLength, "Invalid typed array length") \
T(InvalidSimdIndex, "Index out of bounds for SIMD operation") \
T(InvalidSimdLaneValue, "Lane value out of bounds for SIMD operation") \
T(LetInLexicalBinding, "let is disallowed as a lexically bound name") \
T(LocaleMatcher, "Illegal value for localeMatcher:%") \
T(NormalizationForm, "The normalization form should be one of %.") \

View File

@ -235,8 +235,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE));
// Call runtime on identical symbols since we need to throw a TypeError.
__ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE));
} else {
__ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
// Comparing JS objects with <=, >= is complicated.
@ -244,8 +242,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE));
// Call runtime on identical symbols since we need to throw a TypeError.
__ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE));
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -196,14 +196,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -233,8 +233,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ Branch(slow, greater, t0, Operand(FIRST_JS_RECEIVER_TYPE));
// Call runtime on identical symbols since we need to throw a TypeError.
__ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Branch(slow, eq, t0, Operand(SIMD128_VALUE_TYPE));
} else {
__ Branch(&heap_number, eq, t0, Operand(HEAP_NUMBER_TYPE));
// Comparing JS objects with <=, >= is complicated.
@ -242,8 +240,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ Branch(slow, greater, t0, Operand(FIRST_JS_RECEIVER_TYPE));
// Call runtime on identical symbols since we need to throw a TypeError.
__ Branch(slow, eq, t0, Operand(SYMBOL_TYPE));
// Call runtime on identical SIMD values since we must throw a TypeError.
__ Branch(slow, eq, t0, Operand(SIMD128_VALUE_TYPE));
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -196,14 +196,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -555,7 +555,6 @@ ReturnType BodyDescriptorApply(InstanceType type, T1 p1, T2 p2, T3 p3) {
case HEAP_NUMBER_TYPE:
case MUTABLE_HEAP_NUMBER_TYPE:
case SIMD128_VALUE_TYPE:
case FILLER_TYPE:
case BYTE_ARRAY_TYPE:
case FREE_SPACE_TYPE:

View File

@ -64,9 +64,6 @@ void HeapObject::HeapObjectVerify() {
case MUTABLE_HEAP_NUMBER_TYPE:
HeapNumber::cast(this)->HeapNumberVerify();
break;
case SIMD128_VALUE_TYPE:
Simd128Value::cast(this)->Simd128ValueVerify();
break;
case FIXED_ARRAY_TYPE:
FixedArray::cast(this)->FixedArrayVerify();
break;
@ -269,10 +266,6 @@ void HeapNumber::HeapNumberVerify() {
CHECK(IsHeapNumber() || IsMutableHeapNumber());
}
void Simd128Value::Simd128ValueVerify() { CHECK(IsSimd128Value()); }
void ByteArray::ByteArrayVerify() {
CHECK(IsByteArray());
}

View File

@ -174,7 +174,6 @@ TYPE_CHECKER(MutableHeapNumber, MUTABLE_HEAP_NUMBER_TYPE)
TYPE_CHECKER(Oddball, ODDBALL_TYPE)
TYPE_CHECKER(PropertyCell, PROPERTY_CELL_TYPE)
TYPE_CHECKER(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE)
TYPE_CHECKER(Simd128Value, SIMD128_VALUE_TYPE)
TYPE_CHECKER(Symbol, SYMBOL_TYPE)
TYPE_CHECKER(TransitionArray, TRANSITION_ARRAY_TYPE)
TYPE_CHECKER(WeakCell, WEAK_CELL_TYPE)
@ -204,11 +203,6 @@ bool HeapObject::IsExternal() const {
return map() == GetHeap()->external_map();
}
#define SIMD128_TYPE_CHECKER(TYPE, Type, type, lane_count, lane_type) \
bool HeapObject::Is##Type() const { return map() == GetHeap()->type##_map(); }
SIMD128_TYPES(SIMD128_TYPE_CHECKER)
#undef SIMD128_TYPE_CHECKER
#define IS_TYPE_FUNCTION_DEF(type_) \
bool Object::Is##type_() const { \
return IsHeapObject() && HeapObject::cast(this)->Is##type_(); \
@ -617,9 +611,6 @@ bool Object::IsMinusZero() const {
CAST_ACCESSOR(AbstractCode)
CAST_ACCESSOR(ArrayList)
CAST_ACCESSOR(BoilerplateDescription)
CAST_ACCESSOR(Bool16x8)
CAST_ACCESSOR(Bool32x4)
CAST_ACCESSOR(Bool8x16)
CAST_ACCESSOR(ByteArray)
CAST_ACCESSOR(BytecodeArray)
CAST_ACCESSOR(Cell)
@ -638,15 +629,11 @@ CAST_ACCESSOR(FixedArray)
CAST_ACCESSOR(FixedArrayBase)
CAST_ACCESSOR(FixedDoubleArray)
CAST_ACCESSOR(FixedTypedArrayBase)
CAST_ACCESSOR(Float32x4)
CAST_ACCESSOR(Foreign)
CAST_ACCESSOR(FrameArray)
CAST_ACCESSOR(GlobalDictionary)
CAST_ACCESSOR(HandlerTable)
CAST_ACCESSOR(HeapObject)
CAST_ACCESSOR(Int16x8)
CAST_ACCESSOR(Int32x4)
CAST_ACCESSOR(Int8x16)
CAST_ACCESSOR(JSArray)
CAST_ACCESSOR(JSArrayBuffer)
CAST_ACCESSOR(JSArrayBufferView)
@ -697,7 +684,6 @@ CAST_ACCESSOR(SeqOneByteString)
CAST_ACCESSOR(SeqString)
CAST_ACCESSOR(SeqTwoByteString)
CAST_ACCESSOR(SharedFunctionInfo)
CAST_ACCESSOR(Simd128Value)
CAST_ACCESSOR(SlicedString)
CAST_ACCESSOR(Smi)
CAST_ACCESSOR(String)
@ -707,9 +693,6 @@ CAST_ACCESSOR(Struct)
CAST_ACCESSOR(Symbol)
CAST_ACCESSOR(TemplateInfo)
CAST_ACCESSOR(ThinString)
CAST_ACCESSOR(Uint16x8)
CAST_ACCESSOR(Uint32x4)
CAST_ACCESSOR(Uint8x16)
CAST_ACCESSOR(UnseededNumberDictionary)
CAST_ACCESSOR(WeakCell)
CAST_ACCESSOR(WeakFixedArray)
@ -1575,110 +1558,6 @@ int HeapNumber::get_sign() {
return READ_INT_FIELD(this, kExponentOffset) & kSignMask;
}
bool Simd128Value::Equals(Simd128Value* that) {
// TODO(bmeurer): This doesn't match the SIMD.js specification, but it seems
// to be consistent with what the CompareICStub does, and what is tested in
// the current SIMD.js testsuite.
if (this == that) return true;
#define SIMD128_VALUE(TYPE, Type, type, lane_count, lane_type) \
if (this->Is##Type()) { \
if (!that->Is##Type()) return false; \
return Type::cast(this)->Equals(Type::cast(that)); \
}
SIMD128_TYPES(SIMD128_VALUE)
#undef SIMD128_VALUE
return false;
}
// static
bool Simd128Value::Equals(Handle<Simd128Value> one, Handle<Simd128Value> two) {
return one->Equals(*two);
}
#define SIMD128_VALUE_EQUALS(TYPE, Type, type, lane_count, lane_type) \
bool Type::Equals(Type* that) { \
for (int lane = 0; lane < lane_count; ++lane) { \
if (this->get_lane(lane) != that->get_lane(lane)) return false; \
} \
return true; \
}
SIMD128_TYPES(SIMD128_VALUE_EQUALS)
#undef SIMD128_VALUE_EQUALS
#if defined(V8_TARGET_LITTLE_ENDIAN)
#define SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \
lane_type value = \
READ_##field_type##_FIELD(this, kValueOffset + lane * field_size);
#elif defined(V8_TARGET_BIG_ENDIAN)
#define SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \
lane_type value = READ_##field_type##_FIELD( \
this, kValueOffset + (lane_count - lane - 1) * field_size);
#else
#error Unknown byte ordering
#endif
#if defined(V8_TARGET_LITTLE_ENDIAN)
#define SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \
WRITE_##field_type##_FIELD(this, kValueOffset + lane * field_size, value);
#elif defined(V8_TARGET_BIG_ENDIAN)
#define SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \
WRITE_##field_type##_FIELD( \
this, kValueOffset + (lane_count - lane - 1) * field_size, value);
#else
#error Unknown byte ordering
#endif
#define SIMD128_NUMERIC_LANE_FNS(type, lane_type, lane_count, field_type, \
field_size) \
lane_type type::get_lane(int lane) const { \
DCHECK(lane < lane_count && lane >= 0); \
SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \
return value; \
} \
\
void type::set_lane(int lane, lane_type value) { \
DCHECK(lane < lane_count && lane >= 0); \
SIMD128_WRITE_LANE(lane_count, field_type, field_size, value) \
}
SIMD128_NUMERIC_LANE_FNS(Float32x4, float, 4, FLOAT, kFloatSize)
SIMD128_NUMERIC_LANE_FNS(Int32x4, int32_t, 4, INT32, kInt32Size)
SIMD128_NUMERIC_LANE_FNS(Uint32x4, uint32_t, 4, UINT32, kInt32Size)
SIMD128_NUMERIC_LANE_FNS(Int16x8, int16_t, 8, INT16, kShortSize)
SIMD128_NUMERIC_LANE_FNS(Uint16x8, uint16_t, 8, UINT16, kShortSize)
SIMD128_NUMERIC_LANE_FNS(Int8x16, int8_t, 16, INT8, kCharSize)
SIMD128_NUMERIC_LANE_FNS(Uint8x16, uint8_t, 16, UINT8, kCharSize)
#undef SIMD128_NUMERIC_LANE_FNS
#define SIMD128_BOOLEAN_LANE_FNS(type, lane_type, lane_count, field_type, \
field_size) \
bool type::get_lane(int lane) const { \
DCHECK(lane < lane_count && lane >= 0); \
SIMD128_READ_LANE(lane_type, lane_count, field_type, field_size) \
DCHECK(value == 0 || value == -1); \
return value != 0; \
} \
\
void type::set_lane(int lane, bool value) { \
DCHECK(lane < lane_count && lane >= 0); \
int32_t int_val = value ? -1 : 0; \
SIMD128_WRITE_LANE(lane_count, field_type, field_size, int_val) \
}
SIMD128_BOOLEAN_LANE_FNS(Bool32x4, int32_t, 4, INT32, kInt32Size)
SIMD128_BOOLEAN_LANE_FNS(Bool16x8, int16_t, 8, INT16, kShortSize)
SIMD128_BOOLEAN_LANE_FNS(Bool8x16, int8_t, 16, INT8, kCharSize)
#undef SIMD128_BOOLEAN_LANE_FNS
#undef SIMD128_READ_LANE
#undef SIMD128_WRITE_LANE
ACCESSORS(JSReceiver, properties, FixedArray, kPropertiesOffset)
@ -2458,8 +2337,8 @@ void Object::VerifyApiCallResultType() {
DCHECK(IsHeapObject());
Isolate* isolate = HeapObject::cast(this)->GetIsolate();
if (!(IsString() || IsSymbol() || IsJSReceiver() || IsHeapNumber() ||
IsSimd128Value() || IsUndefined(isolate) || IsTrue(isolate) ||
IsFalse(isolate) || IsNull(isolate))) {
IsUndefined(isolate) || IsTrue(isolate) || IsFalse(isolate) ||
IsNull(isolate))) {
FATAL("API call returned invalid object");
}
#endif // DEBUG
@ -2722,7 +2601,6 @@ AllocationAlignment HeapObject::RequiredAlignment() {
return kDoubleAligned;
}
if (IsHeapNumber()) return kDoubleUnaligned;
if (IsSimd128Value()) return kSimd128Unaligned;
#endif // V8_HOST_ARCH_32_BIT
return kWordAligned;
}

View File

@ -74,9 +74,6 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
HeapNumber::cast(this)->HeapNumberPrint(os);
os << ">\n";
break;
case SIMD128_VALUE_TYPE:
Simd128Value::cast(this)->Simd128ValuePrint(os);
break;
case FIXED_DOUBLE_ARRAY_TYPE:
FixedDoubleArray::cast(this)->FixedDoubleArrayPrint(os);
break;
@ -253,59 +250,6 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
}
}
void Simd128Value::Simd128ValuePrint(std::ostream& os) { // NOLINT
#define PRINT_SIMD128_VALUE(TYPE, Type, type, lane_count, lane_type) \
if (Is##Type()) return Type::cast(this)->Type##Print(os);
SIMD128_TYPES(PRINT_SIMD128_VALUE)
#undef PRINT_SIMD128_VALUE
UNREACHABLE();
}
void Float32x4::Float32x4Print(std::ostream& os) { // NOLINT
char arr[100];
Vector<char> buffer(arr, arraysize(arr));
os << std::string(DoubleToCString(get_lane(0), buffer)) << ", "
<< std::string(DoubleToCString(get_lane(1), buffer)) << ", "
<< std::string(DoubleToCString(get_lane(2), buffer)) << ", "
<< std::string(DoubleToCString(get_lane(3), buffer));
}
#define SIMD128_INT_PRINT_FUNCTION(type, lane_count) \
void type::type##Print(std::ostream& os) { \
char arr[100]; \
Vector<char> buffer(arr, arraysize(arr)); \
os << std::string(IntToCString(get_lane(0), buffer)); \
for (int i = 1; i < lane_count; i++) { \
os << ", " << std::string(IntToCString(get_lane(i), buffer)); \
} \
}
SIMD128_INT_PRINT_FUNCTION(Int32x4, 4)
SIMD128_INT_PRINT_FUNCTION(Uint32x4, 4)
SIMD128_INT_PRINT_FUNCTION(Int16x8, 8)
SIMD128_INT_PRINT_FUNCTION(Uint16x8, 8)
SIMD128_INT_PRINT_FUNCTION(Int8x16, 16)
SIMD128_INT_PRINT_FUNCTION(Uint8x16, 16)
#undef SIMD128_INT_PRINT_FUNCTION
#define SIMD128_BOOL_PRINT_FUNCTION(type, lane_count) \
void type::type##Print(std::ostream& os) { \
char arr[100]; \
Vector<char> buffer(arr, arraysize(arr)); \
os << std::string(get_lane(0) ? "true" : "false"); \
for (int i = 1; i < lane_count; i++) { \
os << ", " << std::string(get_lane(i) ? "true" : "false"); \
} \
}
SIMD128_BOOL_PRINT_FUNCTION(Bool32x4, 4)
SIMD128_BOOL_PRINT_FUNCTION(Bool16x8, 8)
SIMD128_BOOL_PRINT_FUNCTION(Bool8x16, 16)
#undef SIMD128_BOOL_PRINT_FUNCTION
void ByteArray::ByteArrayPrint(std::ostream& os) { // NOLINT
os << "byte array, data starts at " << GetDataStartAddress();
}

View File

@ -158,10 +158,6 @@ MaybeHandle<Object> Object::ConvertToNumber(Isolate* isolate,
THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kSymbolToNumber),
Object);
}
if (input->IsSimd128Value()) {
THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kSimdToNumber),
Object);
}
ASSIGN_RETURN_ON_EXCEPTION(
isolate, input, JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(input),
ToPrimitiveHint::kNumber),
@ -245,9 +241,6 @@ MaybeHandle<String> Object::ConvertToString(Isolate* isolate,
THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kSymbolToString),
String);
}
if (input->IsSimd128Value()) {
return Simd128Value::ToString(Handle<Simd128Value>::cast(input));
}
ASSIGN_RETURN_ON_EXCEPTION(
isolate, input, JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(input),
ToPrimitiveHint::kString),
@ -304,8 +297,7 @@ Handle<String> Object::NoSideEffectsToString(Isolate* isolate,
Handle<Object> input) {
DisallowJavascriptExecution no_js(isolate);
if (input->IsString() || input->IsNumber() || input->IsOddball() ||
input->IsSimd128Value()) {
if (input->IsString() || input->IsNumber() || input->IsOddball()) {
return Object::ToString(isolate, input).ToHandleChecked();
} else if (input->IsFunction()) {
// -- F u n c t i o n
@ -580,18 +572,6 @@ Maybe<bool> Object::Equals(Handle<Object> x, Handle<Object> y) {
} else {
return Just(false);
}
} else if (x->IsSimd128Value()) {
if (y->IsSimd128Value()) {
return Just(Simd128Value::Equals(Handle<Simd128Value>::cast(x),
Handle<Simd128Value>::cast(y)));
} else if (y->IsJSReceiver()) {
if (!JSReceiver::ToPrimitive(Handle<JSReceiver>::cast(y))
.ToHandle(&y)) {
return Nothing<bool>();
}
} else {
return Just(false);
}
} else if (x->IsJSReceiver()) {
if (y->IsJSReceiver()) {
return Just(x.is_identical_to(y));
@ -617,9 +597,6 @@ bool Object::StrictEquals(Object* that) {
} else if (this->IsString()) {
if (!that->IsString()) return false;
return String::cast(this)->Equals(String::cast(that));
} else if (this->IsSimd128Value()) {
if (!that->IsSimd128Value()) return false;
return Simd128Value::cast(this)->Equals(Simd128Value::cast(that));
}
return this == that;
}
@ -635,10 +612,6 @@ Handle<String> Object::TypeOf(Isolate* isolate, Handle<Object> object) {
if (object->IsString()) return isolate->factory()->string_string();
if (object->IsSymbol()) return isolate->factory()->symbol_string();
if (object->IsString()) return isolate->factory()->string_string();
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
if (object->Is##Type()) return isolate->factory()->type##_string();
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
if (object->IsCallable()) return isolate->factory()->function_string();
return isolate->factory()->object_string();
}
@ -2181,8 +2154,8 @@ Map* Object::GetPrototypeChainRootMap(Isolate* isolate) {
return native_context->number_function()->initial_map();
}
// The object is either a number, a string, a symbol, a boolean, a SIMD value,
// a real JS object, or a Harmony proxy.
// The object is either a number, a string, a symbol, a boolean, a real JS
// object, or a Harmony proxy.
HeapObject* heap_object = HeapObject::cast(this);
return heap_object->map()->GetPrototypeChainRootMap(isolate);
}
@ -2208,8 +2181,8 @@ namespace {
// objects. This avoids a double lookup in the cases where we know we will
// add the hash to the JSObject if it does not already exist.
Object* GetSimpleHash(Object* object) {
// The object is either a Smi, a HeapNumber, a name, an odd-ball,
// a SIMD value type, a real JS object, or a Harmony proxy.
// The object is either a Smi, a HeapNumber, a name, an odd-ball, a real JS
// object, or a Harmony proxy.
if (object->IsSmi()) {
uint32_t hash =
ComputeIntegerHash(Smi::cast(object)->value(), kZeroHashSeed);
@ -2233,10 +2206,6 @@ Object* GetSimpleHash(Object* object) {
uint32_t hash = Oddball::cast(object)->to_string()->Hash();
return Smi::FromInt(hash);
}
if (object->IsSimd128Value()) {
uint32_t hash = Simd128Value::cast(object)->Hash();
return Smi::FromInt(hash & Smi::kMaxValue);
}
DCHECK(object->IsJSReceiver());
// Simply return the receiver as it is guaranteed to not be a SMI.
return object;
@ -2283,23 +2252,6 @@ bool Object::SameValue(Object* other) {
if (IsString() && other->IsString()) {
return String::cast(this)->Equals(String::cast(other));
}
if (IsFloat32x4() && other->IsFloat32x4()) {
Float32x4* a = Float32x4::cast(this);
Float32x4* b = Float32x4::cast(other);
for (int i = 0; i < 4; i++) {
float x = a->get_lane(i);
float y = b->get_lane(i);
// Implements the ES5 SameValue operation for floating point types.
// http://www.ecma-international.org/ecma-262/6.0/#sec-samevalue
if (x != y && !(std::isnan(x) && std::isnan(y))) return false;
if (std::signbit(x) != std::signbit(y)) return false;
}
return true;
} else if (IsSimd128Value() && other->IsSimd128Value()) {
Simd128Value* a = Simd128Value::cast(this);
Simd128Value* b = Simd128Value::cast(other);
return a->map() == b->map() && a->BitwiseEquals(b);
}
return false;
}
@ -2319,23 +2271,6 @@ bool Object::SameValueZero(Object* other) {
if (IsString() && other->IsString()) {
return String::cast(this)->Equals(String::cast(other));
}
if (IsFloat32x4() && other->IsFloat32x4()) {
Float32x4* a = Float32x4::cast(this);
Float32x4* b = Float32x4::cast(other);
for (int i = 0; i < 4; i++) {
float x = a->get_lane(i);
float y = b->get_lane(i);
// Implements the ES6 SameValueZero operation for floating point types.
// http://www.ecma-international.org/ecma-262/6.0/#sec-samevaluezero
if (x != y && !(std::isnan(x) && std::isnan(y))) return false;
// SameValueZero doesn't distinguish between 0 and -0.
}
return true;
} else if (IsSimd128Value() && other->IsSimd128Value()) {
Simd128Value* a = Simd128Value::cast(this);
Simd128Value* b = Simd128Value::cast(other);
return a->map() == b->map() && a->BitwiseEquals(b);
}
return false;
}
@ -3077,17 +3012,6 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
os << '>';
break;
}
case SIMD128_VALUE_TYPE: {
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
if (Is##Type()) { \
os << "<" #Type ">"; \
break; \
}
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
UNREACHABLE();
break;
}
case JS_PROXY_TYPE:
os << "<JSProxy>";
break;
@ -3178,101 +3102,6 @@ void HeapNumber::HeapNumberPrint(std::ostream& os) { // NOLINT
#define READ_BYTE_FIELD(p, offset) \
(*reinterpret_cast<const byte*>(FIELD_ADDR_CONST(p, offset)))
// static
Handle<String> Simd128Value::ToString(Handle<Simd128Value> input) {
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
if (input->Is##Type()) return Type::ToString(Handle<Type>::cast(input));
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
UNREACHABLE();
return Handle<String>::null();
}
// static
Handle<String> Float32x4::ToString(Handle<Float32x4> input) {
Isolate* const isolate = input->GetIsolate();
char arr[100];
Vector<char> buffer(arr, arraysize(arr));
std::ostringstream os;
os << "SIMD.Float32x4("
<< std::string(DoubleToCString(input->get_lane(0), buffer)) << ", "
<< std::string(DoubleToCString(input->get_lane(1), buffer)) << ", "
<< std::string(DoubleToCString(input->get_lane(2), buffer)) << ", "
<< std::string(DoubleToCString(input->get_lane(3), buffer)) << ")";
return isolate->factory()->NewStringFromAsciiChecked(os.str().c_str());
}
#define SIMD128_BOOL_TO_STRING(Type, lane_count) \
Handle<String> Type::ToString(Handle<Type> input) { \
Isolate* const isolate = input->GetIsolate(); \
std::ostringstream os; \
os << "SIMD." #Type "("; \
os << (input->get_lane(0) ? "true" : "false"); \
for (int i = 1; i < lane_count; i++) { \
os << ", " << (input->get_lane(i) ? "true" : "false"); \
} \
os << ")"; \
return isolate->factory()->NewStringFromAsciiChecked(os.str().c_str()); \
}
SIMD128_BOOL_TO_STRING(Bool32x4, 4)
SIMD128_BOOL_TO_STRING(Bool16x8, 8)
SIMD128_BOOL_TO_STRING(Bool8x16, 16)
#undef SIMD128_BOOL_TO_STRING
#define SIMD128_INT_TO_STRING(Type, lane_count) \
Handle<String> Type::ToString(Handle<Type> input) { \
Isolate* const isolate = input->GetIsolate(); \
char arr[100]; \
Vector<char> buffer(arr, arraysize(arr)); \
std::ostringstream os; \
os << "SIMD." #Type "("; \
os << IntToCString(input->get_lane(0), buffer); \
for (int i = 1; i < lane_count; i++) { \
os << ", " << IntToCString(input->get_lane(i), buffer); \
} \
os << ")"; \
return isolate->factory()->NewStringFromAsciiChecked(os.str().c_str()); \
}
SIMD128_INT_TO_STRING(Int32x4, 4)
SIMD128_INT_TO_STRING(Uint32x4, 4)
SIMD128_INT_TO_STRING(Int16x8, 8)
SIMD128_INT_TO_STRING(Uint16x8, 8)
SIMD128_INT_TO_STRING(Int8x16, 16)
SIMD128_INT_TO_STRING(Uint8x16, 16)
#undef SIMD128_INT_TO_STRING
bool Simd128Value::BitwiseEquals(const Simd128Value* other) const {
return READ_INT64_FIELD(this, kValueOffset) ==
READ_INT64_FIELD(other, kValueOffset) &&
READ_INT64_FIELD(this, kValueOffset + kInt64Size) ==
READ_INT64_FIELD(other, kValueOffset + kInt64Size);
}
uint32_t Simd128Value::Hash() const {
uint32_t seed = v8::internal::kZeroHashSeed;
uint32_t hash;
hash = ComputeIntegerHash(READ_INT32_FIELD(this, kValueOffset), seed);
hash = ComputeIntegerHash(
READ_INT32_FIELD(this, kValueOffset + 1 * kInt32Size), hash * 31);
hash = ComputeIntegerHash(
READ_INT32_FIELD(this, kValueOffset + 2 * kInt32Size), hash * 31);
hash = ComputeIntegerHash(
READ_INT32_FIELD(this, kValueOffset + 3 * kInt32Size), hash * 31);
return hash;
}
void Simd128Value::CopyBits(void* destination) const {
memcpy(destination, &READ_BYTE_FIELD(this, kValueOffset), kSimd128Size);
}
String* JSReceiver::class_name() {
if (IsFunction()) {
return GetHeap()->Function_string();
@ -12729,7 +12558,6 @@ bool CanSubclassHaveInobjectProperties(InstanceType instance_type) {
case ODDBALL_TYPE:
case PROPERTY_CELL_TYPE:
case SHARED_FUNCTION_INFO_TYPE:
case SIMD128_VALUE_TYPE:
case SYMBOL_TYPE:
case WEAK_CELL_TYPE:

View File

@ -122,17 +122,6 @@
// - ExternalTwoByteInternalizedString
// - Symbol
// - HeapNumber
// - Simd128Value
// - Float32x4
// - Int32x4
// - Uint32x4
// - Bool32x4
// - Int16x8
// - Uint16x8
// - Bool16x8
// - Int8x16
// - Uint8x16
// - Bool8x16
// - Cell
// - PropertyCell
// - Code
@ -330,7 +319,6 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
\
V(SYMBOL_TYPE) \
V(HEAP_NUMBER_TYPE) \
V(SIMD128_VALUE_TYPE) \
V(ODDBALL_TYPE) \
\
V(MAP_TYPE) \
@ -668,7 +656,6 @@ enum InstanceType {
// Other primitives (cannot contain non-map-word pointers to heap objects).
HEAP_NUMBER_TYPE,
SIMD128_VALUE_TYPE,
ODDBALL_TYPE, // LAST_PRIMITIVE_TYPE
// Objects allocated in their own spaces (never in new space).
@ -985,17 +972,6 @@ template <class C> inline bool Is(Object* obj);
#define HEAP_OBJECT_TYPE_LIST(V) \
V(HeapNumber) \
V(MutableHeapNumber) \
V(Simd128Value) \
V(Float32x4) \
V(Int32x4) \
V(Uint32x4) \
V(Bool32x4) \
V(Int16x8) \
V(Uint16x8) \
V(Bool16x8) \
V(Int8x16) \
V(Uint8x16) \
V(Bool8x16) \
V(Name) \
V(UniqueName) \
V(String) \
@ -1866,71 +1842,6 @@ class HeapNumber: public HeapObject {
DISALLOW_IMPLICIT_CONSTRUCTORS(HeapNumber);
};
// The Simd128Value class describes heap allocated 128 bit SIMD values.
class Simd128Value : public HeapObject {
public:
DECLARE_CAST(Simd128Value)
DECLARE_PRINTER(Simd128Value)
DECLARE_VERIFIER(Simd128Value)
static Handle<String> ToString(Handle<Simd128Value> input);
// Equality operations.
inline bool Equals(Simd128Value* that);
static inline bool Equals(Handle<Simd128Value> one, Handle<Simd128Value> two);
// Checks that another instance is bit-wise equal.
bool BitwiseEquals(const Simd128Value* other) const;
// Computes a hash from the 128 bit value, viewed as 4 32-bit integers.
uint32_t Hash() const;
// Copies the 16 bytes of SIMD data to the destination address.
void CopyBits(void* destination) const;
// Layout description.
static const int kValueOffset = HeapObject::kHeaderSize;
static const int kSize = kValueOffset + kSimd128Size;
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Simd128Value);
};
// V has parameters (TYPE, Type, type, lane count, lane type)
#define SIMD128_TYPES(V) \
V(FLOAT32X4, Float32x4, float32x4, 4, float) \
V(INT32X4, Int32x4, int32x4, 4, int32_t) \
V(UINT32X4, Uint32x4, uint32x4, 4, uint32_t) \
V(BOOL32X4, Bool32x4, bool32x4, 4, bool) \
V(INT16X8, Int16x8, int16x8, 8, int16_t) \
V(UINT16X8, Uint16x8, uint16x8, 8, uint16_t) \
V(BOOL16X8, Bool16x8, bool16x8, 8, bool) \
V(INT8X16, Int8x16, int8x16, 16, int8_t) \
V(UINT8X16, Uint8x16, uint8x16, 16, uint8_t) \
V(BOOL8X16, Bool8x16, bool8x16, 16, bool)
#define SIMD128_VALUE_CLASS(TYPE, Type, type, lane_count, lane_type) \
class Type final : public Simd128Value { \
public: \
inline lane_type get_lane(int lane) const; \
inline void set_lane(int lane, lane_type value); \
\
DECLARE_CAST(Type) \
\
DECLARE_PRINTER(Type) \
\
static Handle<String> ToString(Handle<Type> input); \
\
inline bool Equals(Type* that); \
\
private: \
DISALLOW_IMPLICIT_CONSTRUCTORS(Type); \
};
SIMD128_TYPES(SIMD128_VALUE_CLASS)
#undef SIMD128_VALUE_CLASS
enum EnsureElementsMode {
DONT_ALLOW_DOUBLE_ELEMENTS,
ALLOW_COPIED_DOUBLE_ELEMENTS,

View File

@ -205,9 +205,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmpi(r7, Operand(SYMBOL_TYPE));
__ beq(slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmpi(r7, Operand(SIMD128_VALUE_TYPE));
__ beq(slow);
} else {
__ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE);
__ beq(&heap_number);
@ -218,9 +215,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmpi(r7, Operand(SYMBOL_TYPE));
__ beq(slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmpi(r7, Operand(SIMD128_VALUE_TYPE));
__ beq(slow);
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -195,14 +195,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -154,7 +154,6 @@ const char* HeapEntry::TypeAsString() {
case kConsString: return "/concatenated string/";
case kSlicedString: return "/sliced string/";
case kSymbol: return "/symbol/";
case kSimdValue: return "/simd/";
default: return "???";
}
}
@ -838,8 +837,6 @@ HeapEntry* V8HeapExplorer::AddEntry(HeapObject* object) {
return AddEntry(object, HeapEntry::kArray, "");
} else if (object->IsHeapNumber()) {
return AddEntry(object, HeapEntry::kHeapNumber, "number");
} else if (object->IsSimd128Value()) {
return AddEntry(object, HeapEntry::kSimdValue, "simd");
}
return AddEntry(object, HeapEntry::kHidden, GetSystemEntryName(object));
}

View File

@ -92,8 +92,7 @@ class HeapEntry BASE_EMBEDDED {
kSynthetic = v8::HeapGraphNode::kSynthetic,
kConsString = v8::HeapGraphNode::kConsString,
kSlicedString = v8::HeapGraphNode::kSlicedString,
kSymbol = v8::HeapGraphNode::kSymbol,
kSimdValue = v8::HeapGraphNode::kSimdValue
kSymbol = v8::HeapGraphNode::kSymbol
};
static const int kNoEntry;

File diff suppressed because it is too large Load Diff

View File

@ -511,316 +511,6 @@ namespace internal {
F(StoreLookupSlot_Sloppy, 2, 1) \
F(StoreLookupSlot_Strict, 2, 1)
#define FOR_EACH_INTRINSIC_SIMD(F) \
F(IsSimdValue, 1, 1) \
F(CreateFloat32x4, 4, 1) \
F(CreateInt32x4, 4, 1) \
F(CreateUint32x4, 4, 1) \
F(CreateBool32x4, 4, 1) \
F(CreateInt16x8, 8, 1) \
F(CreateUint16x8, 8, 1) \
F(CreateBool16x8, 8, 1) \
F(CreateInt8x16, 16, 1) \
F(CreateUint8x16, 16, 1) \
F(CreateBool8x16, 16, 1) \
F(Float32x4Check, 1, 1) \
F(Float32x4ExtractLane, 2, 1) \
F(Float32x4ReplaceLane, 3, 1) \
F(Float32x4Abs, 1, 1) \
F(Float32x4Neg, 1, 1) \
F(Float32x4Sqrt, 1, 1) \
F(Float32x4RecipApprox, 1, 1) \
F(Float32x4RecipSqrtApprox, 1, 1) \
F(Float32x4Add, 2, 1) \
F(Float32x4Sub, 2, 1) \
F(Float32x4Mul, 2, 1) \
F(Float32x4Div, 2, 1) \
F(Float32x4Min, 2, 1) \
F(Float32x4Max, 2, 1) \
F(Float32x4MinNum, 2, 1) \
F(Float32x4MaxNum, 2, 1) \
F(Float32x4Equal, 2, 1) \
F(Float32x4NotEqual, 2, 1) \
F(Float32x4LessThan, 2, 1) \
F(Float32x4LessThanOrEqual, 2, 1) \
F(Float32x4GreaterThan, 2, 1) \
F(Float32x4GreaterThanOrEqual, 2, 1) \
F(Float32x4Select, 3, 1) \
F(Float32x4Swizzle, 5, 1) \
F(Float32x4Shuffle, 6, 1) \
F(Float32x4FromInt32x4, 1, 1) \
F(Float32x4FromUint32x4, 1, 1) \
F(Float32x4FromInt32x4Bits, 1, 1) \
F(Float32x4FromUint32x4Bits, 1, 1) \
F(Float32x4FromInt16x8Bits, 1, 1) \
F(Float32x4FromUint16x8Bits, 1, 1) \
F(Float32x4FromInt8x16Bits, 1, 1) \
F(Float32x4FromUint8x16Bits, 1, 1) \
F(Float32x4Load, 2, 1) \
F(Float32x4Load1, 2, 1) \
F(Float32x4Load2, 2, 1) \
F(Float32x4Load3, 2, 1) \
F(Float32x4Store, 3, 1) \
F(Float32x4Store1, 3, 1) \
F(Float32x4Store2, 3, 1) \
F(Float32x4Store3, 3, 1) \
F(Int32x4Check, 1, 1) \
F(Int32x4ExtractLane, 2, 1) \
F(Int32x4ReplaceLane, 3, 1) \
F(Int32x4Neg, 1, 1) \
F(Int32x4Add, 2, 1) \
F(Int32x4Sub, 2, 1) \
F(Int32x4Mul, 2, 1) \
F(Int32x4Min, 2, 1) \
F(Int32x4Max, 2, 1) \
F(Int32x4And, 2, 1) \
F(Int32x4Or, 2, 1) \
F(Int32x4Xor, 2, 1) \
F(Int32x4Not, 1, 1) \
F(Int32x4ShiftLeftByScalar, 2, 1) \
F(Int32x4ShiftRightByScalar, 2, 1) \
F(Int32x4Equal, 2, 1) \
F(Int32x4NotEqual, 2, 1) \
F(Int32x4LessThan, 2, 1) \
F(Int32x4LessThanOrEqual, 2, 1) \
F(Int32x4GreaterThan, 2, 1) \
F(Int32x4GreaterThanOrEqual, 2, 1) \
F(Int32x4Select, 3, 1) \
F(Int32x4Swizzle, 5, 1) \
F(Int32x4Shuffle, 6, 1) \
F(Int32x4FromFloat32x4, 1, 1) \
F(Int32x4FromUint32x4, 1, 1) \
F(Int32x4FromFloat32x4Bits, 1, 1) \
F(Int32x4FromUint32x4Bits, 1, 1) \
F(Int32x4FromInt16x8Bits, 1, 1) \
F(Int32x4FromUint16x8Bits, 1, 1) \
F(Int32x4FromInt8x16Bits, 1, 1) \
F(Int32x4FromUint8x16Bits, 1, 1) \
F(Int32x4Load, 2, 1) \
F(Int32x4Load1, 2, 1) \
F(Int32x4Load2, 2, 1) \
F(Int32x4Load3, 2, 1) \
F(Int32x4Store, 3, 1) \
F(Int32x4Store1, 3, 1) \
F(Int32x4Store2, 3, 1) \
F(Int32x4Store3, 3, 1) \
F(Uint32x4Check, 1, 1) \
F(Uint32x4ExtractLane, 2, 1) \
F(Uint32x4ReplaceLane, 3, 1) \
F(Uint32x4Add, 2, 1) \
F(Uint32x4Sub, 2, 1) \
F(Uint32x4Mul, 2, 1) \
F(Uint32x4Min, 2, 1) \
F(Uint32x4Max, 2, 1) \
F(Uint32x4And, 2, 1) \
F(Uint32x4Or, 2, 1) \
F(Uint32x4Xor, 2, 1) \
F(Uint32x4Not, 1, 1) \
F(Uint32x4ShiftLeftByScalar, 2, 1) \
F(Uint32x4ShiftRightByScalar, 2, 1) \
F(Uint32x4Equal, 2, 1) \
F(Uint32x4NotEqual, 2, 1) \
F(Uint32x4LessThan, 2, 1) \
F(Uint32x4LessThanOrEqual, 2, 1) \
F(Uint32x4GreaterThan, 2, 1) \
F(Uint32x4GreaterThanOrEqual, 2, 1) \
F(Uint32x4Select, 3, 1) \
F(Uint32x4Swizzle, 5, 1) \
F(Uint32x4Shuffle, 6, 1) \
F(Uint32x4FromFloat32x4, 1, 1) \
F(Uint32x4FromInt32x4, 1, 1) \
F(Uint32x4FromFloat32x4Bits, 1, 1) \
F(Uint32x4FromInt32x4Bits, 1, 1) \
F(Uint32x4FromInt16x8Bits, 1, 1) \
F(Uint32x4FromUint16x8Bits, 1, 1) \
F(Uint32x4FromInt8x16Bits, 1, 1) \
F(Uint32x4FromUint8x16Bits, 1, 1) \
F(Uint32x4Load, 2, 1) \
F(Uint32x4Load1, 2, 1) \
F(Uint32x4Load2, 2, 1) \
F(Uint32x4Load3, 2, 1) \
F(Uint32x4Store, 3, 1) \
F(Uint32x4Store1, 3, 1) \
F(Uint32x4Store2, 3, 1) \
F(Uint32x4Store3, 3, 1) \
F(Bool32x4Check, 1, 1) \
F(Bool32x4ExtractLane, 2, 1) \
F(Bool32x4ReplaceLane, 3, 1) \
F(Bool32x4And, 2, 1) \
F(Bool32x4Or, 2, 1) \
F(Bool32x4Xor, 2, 1) \
F(Bool32x4Not, 1, 1) \
F(Bool32x4AnyTrue, 1, 1) \
F(Bool32x4AllTrue, 1, 1) \
F(Bool32x4Swizzle, 5, 1) \
F(Bool32x4Shuffle, 6, 1) \
F(Bool32x4Equal, 2, 1) \
F(Bool32x4NotEqual, 2, 1) \
F(Int16x8Check, 1, 1) \
F(Int16x8ExtractLane, 2, 1) \
F(Int16x8ReplaceLane, 3, 1) \
F(Int16x8Neg, 1, 1) \
F(Int16x8Add, 2, 1) \
F(Int16x8AddSaturate, 2, 1) \
F(Int16x8Sub, 2, 1) \
F(Int16x8SubSaturate, 2, 1) \
F(Int16x8Mul, 2, 1) \
F(Int16x8Min, 2, 1) \
F(Int16x8Max, 2, 1) \
F(Int16x8And, 2, 1) \
F(Int16x8Or, 2, 1) \
F(Int16x8Xor, 2, 1) \
F(Int16x8Not, 1, 1) \
F(Int16x8ShiftLeftByScalar, 2, 1) \
F(Int16x8ShiftRightByScalar, 2, 1) \
F(Int16x8Equal, 2, 1) \
F(Int16x8NotEqual, 2, 1) \
F(Int16x8LessThan, 2, 1) \
F(Int16x8LessThanOrEqual, 2, 1) \
F(Int16x8GreaterThan, 2, 1) \
F(Int16x8GreaterThanOrEqual, 2, 1) \
F(Int16x8Select, 3, 1) \
F(Int16x8Swizzle, 9, 1) \
F(Int16x8Shuffle, 10, 1) \
F(Int16x8FromUint16x8, 1, 1) \
F(Int16x8FromFloat32x4Bits, 1, 1) \
F(Int16x8FromInt32x4Bits, 1, 1) \
F(Int16x8FromUint32x4Bits, 1, 1) \
F(Int16x8FromUint16x8Bits, 1, 1) \
F(Int16x8FromInt8x16Bits, 1, 1) \
F(Int16x8FromUint8x16Bits, 1, 1) \
F(Int16x8Load, 2, 1) \
F(Int16x8Store, 3, 1) \
F(Uint16x8Check, 1, 1) \
F(Uint16x8ExtractLane, 2, 1) \
F(Uint16x8ReplaceLane, 3, 1) \
F(Uint16x8Add, 2, 1) \
F(Uint16x8AddSaturate, 2, 1) \
F(Uint16x8Sub, 2, 1) \
F(Uint16x8SubSaturate, 2, 1) \
F(Uint16x8Mul, 2, 1) \
F(Uint16x8Min, 2, 1) \
F(Uint16x8Max, 2, 1) \
F(Uint16x8And, 2, 1) \
F(Uint16x8Or, 2, 1) \
F(Uint16x8Xor, 2, 1) \
F(Uint16x8Not, 1, 1) \
F(Uint16x8ShiftLeftByScalar, 2, 1) \
F(Uint16x8ShiftRightByScalar, 2, 1) \
F(Uint16x8Equal, 2, 1) \
F(Uint16x8NotEqual, 2, 1) \
F(Uint16x8LessThan, 2, 1) \
F(Uint16x8LessThanOrEqual, 2, 1) \
F(Uint16x8GreaterThan, 2, 1) \
F(Uint16x8GreaterThanOrEqual, 2, 1) \
F(Uint16x8Select, 3, 1) \
F(Uint16x8Swizzle, 9, 1) \
F(Uint16x8Shuffle, 10, 1) \
F(Uint16x8FromInt16x8, 1, 1) \
F(Uint16x8FromFloat32x4Bits, 1, 1) \
F(Uint16x8FromInt32x4Bits, 1, 1) \
F(Uint16x8FromUint32x4Bits, 1, 1) \
F(Uint16x8FromInt16x8Bits, 1, 1) \
F(Uint16x8FromInt8x16Bits, 1, 1) \
F(Uint16x8FromUint8x16Bits, 1, 1) \
F(Uint16x8Load, 2, 1) \
F(Uint16x8Store, 3, 1) \
F(Bool16x8Check, 1, 1) \
F(Bool16x8ExtractLane, 2, 1) \
F(Bool16x8ReplaceLane, 3, 1) \
F(Bool16x8And, 2, 1) \
F(Bool16x8Or, 2, 1) \
F(Bool16x8Xor, 2, 1) \
F(Bool16x8Not, 1, 1) \
F(Bool16x8AnyTrue, 1, 1) \
F(Bool16x8AllTrue, 1, 1) \
F(Bool16x8Swizzle, 9, 1) \
F(Bool16x8Shuffle, 10, 1) \
F(Bool16x8Equal, 2, 1) \
F(Bool16x8NotEqual, 2, 1) \
F(Int8x16Check, 1, 1) \
F(Int8x16ExtractLane, 2, 1) \
F(Int8x16ReplaceLane, 3, 1) \
F(Int8x16Neg, 1, 1) \
F(Int8x16Add, 2, 1) \
F(Int8x16AddSaturate, 2, 1) \
F(Int8x16Sub, 2, 1) \
F(Int8x16SubSaturate, 2, 1) \
F(Int8x16Mul, 2, 1) \
F(Int8x16Min, 2, 1) \
F(Int8x16Max, 2, 1) \
F(Int8x16And, 2, 1) \
F(Int8x16Or, 2, 1) \
F(Int8x16Xor, 2, 1) \
F(Int8x16Not, 1, 1) \
F(Int8x16ShiftLeftByScalar, 2, 1) \
F(Int8x16ShiftRightByScalar, 2, 1) \
F(Int8x16Equal, 2, 1) \
F(Int8x16NotEqual, 2, 1) \
F(Int8x16LessThan, 2, 1) \
F(Int8x16LessThanOrEqual, 2, 1) \
F(Int8x16GreaterThan, 2, 1) \
F(Int8x16GreaterThanOrEqual, 2, 1) \
F(Int8x16Select, 3, 1) \
F(Int8x16Swizzle, 17, 1) \
F(Int8x16Shuffle, 18, 1) \
F(Int8x16FromUint8x16, 1, 1) \
F(Int8x16FromFloat32x4Bits, 1, 1) \
F(Int8x16FromInt32x4Bits, 1, 1) \
F(Int8x16FromUint32x4Bits, 1, 1) \
F(Int8x16FromInt16x8Bits, 1, 1) \
F(Int8x16FromUint16x8Bits, 1, 1) \
F(Int8x16FromUint8x16Bits, 1, 1) \
F(Int8x16Load, 2, 1) \
F(Int8x16Store, 3, 1) \
F(Uint8x16Check, 1, 1) \
F(Uint8x16ExtractLane, 2, 1) \
F(Uint8x16ReplaceLane, 3, 1) \
F(Uint8x16Add, 2, 1) \
F(Uint8x16AddSaturate, 2, 1) \
F(Uint8x16Sub, 2, 1) \
F(Uint8x16SubSaturate, 2, 1) \
F(Uint8x16Mul, 2, 1) \
F(Uint8x16Min, 2, 1) \
F(Uint8x16Max, 2, 1) \
F(Uint8x16And, 2, 1) \
F(Uint8x16Or, 2, 1) \
F(Uint8x16Xor, 2, 1) \
F(Uint8x16Not, 1, 1) \
F(Uint8x16ShiftLeftByScalar, 2, 1) \
F(Uint8x16ShiftRightByScalar, 2, 1) \
F(Uint8x16Equal, 2, 1) \
F(Uint8x16NotEqual, 2, 1) \
F(Uint8x16LessThan, 2, 1) \
F(Uint8x16LessThanOrEqual, 2, 1) \
F(Uint8x16GreaterThan, 2, 1) \
F(Uint8x16GreaterThanOrEqual, 2, 1) \
F(Uint8x16Select, 3, 1) \
F(Uint8x16Swizzle, 17, 1) \
F(Uint8x16Shuffle, 18, 1) \
F(Uint8x16FromInt8x16, 1, 1) \
F(Uint8x16FromFloat32x4Bits, 1, 1) \
F(Uint8x16FromInt32x4Bits, 1, 1) \
F(Uint8x16FromUint32x4Bits, 1, 1) \
F(Uint8x16FromInt16x8Bits, 1, 1) \
F(Uint8x16FromUint16x8Bits, 1, 1) \
F(Uint8x16FromInt8x16Bits, 1, 1) \
F(Uint8x16Load, 2, 1) \
F(Uint8x16Store, 3, 1) \
F(Bool8x16Check, 1, 1) \
F(Bool8x16ExtractLane, 2, 1) \
F(Bool8x16ReplaceLane, 3, 1) \
F(Bool8x16And, 2, 1) \
F(Bool8x16Or, 2, 1) \
F(Bool8x16Xor, 2, 1) \
F(Bool8x16Not, 1, 1) \
F(Bool8x16AnyTrue, 1, 1) \
F(Bool8x16AllTrue, 1, 1) \
F(Bool8x16Swizzle, 17, 1) \
F(Bool8x16Shuffle, 18, 1) \
F(Bool8x16Equal, 2, 1) \
F(Bool8x16NotEqual, 2, 1)
#define FOR_EACH_INTRINSIC_STRINGS(F) \
F(GetSubstitution, 4, 1) \
F(StringReplaceOneCharWithString, 3, 1) \
@ -1010,7 +700,6 @@ namespace internal {
FOR_EACH_INTRINSIC_PROXY(F) \
FOR_EACH_INTRINSIC_REGEXP(F) \
FOR_EACH_INTRINSIC_SCOPES(F) \
FOR_EACH_INTRINSIC_SIMD(F) \
FOR_EACH_INTRINSIC_STRINGS(F) \
FOR_EACH_INTRINSIC_SYMBOL(F) \
FOR_EACH_INTRINSIC_TEST(F) \

View File

@ -206,9 +206,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ CmpP(r6, Operand(SYMBOL_TYPE));
__ beq(slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ CmpP(r6, Operand(SIMD128_VALUE_TYPE));
__ beq(slow);
} else {
__ CompareObjectType(r2, r6, r6, HEAP_NUMBER_TYPE);
__ beq(&heap_number);
@ -219,9 +216,6 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// Call runtime on identical symbols since we need to throw a TypeError.
__ CmpP(r6, Operand(SYMBOL_TYPE));
__ beq(slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ CmpP(r6, Operand(SIMD128_VALUE_TYPE));
__ beq(slow);
// Normally here we fall through to return_equal, but undefined is
// special: (undefined == undefined) == true, but
// (undefined <= undefined) == false! See ECMAScript 11.8.5.

View File

@ -181,14 +181,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -69,8 +69,6 @@ std::ostream& operator<<(std::ostream& os, ToBooleanHint hint) {
return os << "Symbol";
case ToBooleanHint::kHeapNumber:
return os << "HeapNumber";
case ToBooleanHint::kSimdValue:
return os << "SimdValue";
case ToBooleanHint::kAny:
return os << "Any";
case ToBooleanHint::kNeedsMap:
@ -100,8 +98,6 @@ std::string ToString(ToBooleanHint hint) {
return "Symbol";
case ToBooleanHint::kHeapNumber:
return "HeapNumber";
case ToBooleanHint::kSimdValue:
return "SimdValue";
case ToBooleanHint::kAny:
return "Any";
case ToBooleanHint::kNeedsMap:

View File

@ -56,10 +56,9 @@ enum class ToBooleanHint : uint16_t {
kString = 1u << 5,
kSymbol = 1u << 6,
kHeapNumber = 1u << 7,
kSimdValue = 1u << 8,
kAny = kUndefined | kBoolean | kNull | kSmallInteger | kReceiver | kString |
kSymbol | kHeapNumber | kSimdValue,
kNeedsMap = kReceiver | kString | kSymbol | kHeapNumber | kSimdValue,
kSymbol | kHeapNumber,
kNeedsMap = kReceiver | kString | kSymbol | kHeapNumber,
kCanBeUndetectable = kReceiver,
};

View File

@ -61,8 +61,7 @@ Handle<Object> TypeFeedbackOracle::GetInfo(FeedbackSlot slot) {
obj = cell->value();
}
if (obj->IsJSFunction() || obj->IsAllocationSite() || obj->IsSymbol() ||
obj->IsSimd128Value()) {
if (obj->IsJSFunction() || obj->IsAllocationSite() || obj->IsSymbol()) {
return Handle<Object>(obj, isolate());
}

View File

@ -1213,7 +1213,6 @@
'runtime/runtime-proxy.cc',
'runtime/runtime-regexp.cc',
'runtime/runtime-scopes.cc',
'runtime/runtime-simd.cc',
'runtime/runtime-strings.cc',
'runtime/runtime-symbol.cc',
'runtime/runtime-test.cc',
@ -2281,7 +2280,6 @@
'js/macros.py',
'messages.h',
'js/harmony-atomics.js',
'js/harmony-simd.js',
],
'libraries_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries.bin',
'libraries_experimental_bin_file': '<(SHARED_INTERMEDIATE_DIR)/libraries-experimental.bin',

View File

@ -866,9 +866,6 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE)));
__ j(equal, &runtime_call, Label::kFar);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmpb(rcx, Immediate(static_cast<uint8_t>(SIMD128_VALUE_TYPE)));
__ j(equal, &runtime_call, Label::kFar);
}
__ Set(rax, EQUAL);
__ ret(0);

View File

@ -195,14 +195,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// kTarget, kNewTarget, kActualArgumentsCount, kAllocationSite

View File

@ -792,9 +792,6 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmpb(ecx, Immediate(SYMBOL_TYPE));
__ j(equal, &runtime_call, Label::kFar);
// Call runtime on identical SIMD values since we must throw a TypeError.
__ cmpb(ecx, Immediate(SIMD128_VALUE_TYPE));
__ j(equal, &runtime_call, Label::kFar);
}
__ Move(eax, Immediate(Smi::FromInt(EQUAL)));
__ ret(0);

View File

@ -209,14 +209,6 @@ void AllocateHeapNumberDescriptor::InitializePlatformSpecific(
data->InitializePlatformSpecific(0, nullptr, nullptr);
}
#define SIMD128_ALLOC_DESC(TYPE, Type, type, lane_count, lane_type) \
void Allocate##Type##Descriptor::InitializePlatformSpecific( \
CallInterfaceDescriptorData* data) { \
data->InitializePlatformSpecific(0, nullptr, nullptr); \
}
SIMD128_TYPES(SIMD128_ALLOC_DESC)
#undef SIMD128_ALLOC_DESC
void ArrayNoArgumentConstructorDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
// register state

View File

@ -31,7 +31,6 @@ group("gn_all") {
":bot_default_run",
":default_run",
":mozilla_run",
":simdjs_run",
"test262:test262_run",
]
}
@ -185,14 +184,6 @@ v8_isolate_run("preparser") {
isolate = "preparser/preparser.isolate"
}
v8_isolate_run("simdjs") {
deps = [
"..:d8_run",
]
isolate = "simdjs/simdjs.isolate"
}
v8_isolate_run("unittests") {
deps = [
"unittests:unittests",

View File

@ -163,7 +163,6 @@ v8_executable("cctest") {
"test-representation.cc",
"test-sampler-api.cc",
"test-serialize.cc",
"test-simd.cc",
"test-strings.cc",
"test-strtod.cc",
"test-symbols.cc",

View File

@ -116,6 +116,7 @@ class AstTypes {
for (int i = 0; i < 30; ++i) {
types.push_back(Fuzz());
}
USE(isolate_); // Currently unused.
}
Handle<i::Map> object_map;
@ -287,19 +288,6 @@ class AstTypes {
}
return type;
}
case 8: { // simd
static const int num_simd_types =
#define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) +1
SIMD128_TYPES(COUNT_SIMD_TYPE);
#undef COUNT_SIMD_TYPE
AstType* (*simd_constructors[num_simd_types])(Isolate*, Zone*) = {
#define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) &AstType::Name,
SIMD128_TYPES(COUNT_SIMD_TYPE)
#undef COUNT_SIMD_TYPE
};
return simd_constructors[rng_->NextInt(num_simd_types)](isolate_,
zone_);
}
default: { // union
int n = rng_->NextInt(10);
AstType* type = None;

View File

@ -183,7 +183,6 @@
'test-representation.cc',
'test-sampler-api.cc',
'test-serialize.cc',
'test-simd.cc',
'test-strings.cc',
'test-symbols.cc',
'test-strtod.cc',

View File

@ -68,10 +68,6 @@ TEST(HeapMaps) {
Heap* heap = CcTest::heap();
CheckMap(heap->meta_map(), MAP_TYPE, Map::kSize);
CheckMap(heap->heap_number_map(), HEAP_NUMBER_TYPE, HeapNumber::kSize);
#define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
CheckMap(heap->type##_map(), SIMD128_VALUE_TYPE, Type::kSize);
SIMD128_TYPES(SIMD128_TYPE)
#undef SIMD128_TYPE
CheckMap(heap->fixed_array_map(), FIXED_ARRAY_TYPE, kVariableSizeSentinel);
CheckMap(heap->string_map(), STRING_TYPE, kVariableSizeSentinel);
}
@ -324,206 +320,6 @@ TEST(HeapObjects) {
CheckFindCodeObject(isolate);
}
template <typename T, typename LANE_TYPE, int LANES>
static void CheckSimdValue(T* value, LANE_TYPE lane_values[LANES],
LANE_TYPE other_value) {
// Check against lane_values, and check that all lanes can be set to
// other_value without disturbing the other lanes.
for (int i = 0; i < LANES; i++) {
CHECK_EQ(lane_values[i], value->get_lane(i));
}
for (int i = 0; i < LANES; i++) {
value->set_lane(i, other_value); // change the value
for (int j = 0; j < LANES; j++) {
if (i != j)
CHECK_EQ(lane_values[j], value->get_lane(j));
else
CHECK_EQ(other_value, value->get_lane(j));
}
value->set_lane(i, lane_values[i]); // restore the lane
}
CHECK(value->BooleanValue()); // SIMD values are 'true'.
}
TEST(SimdObjects) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
HandleScope sc(isolate);
// Float32x4
{
float lanes[4] = {1, 2, 3, 4};
float quiet_NaN = std::numeric_limits<float>::quiet_NaN();
float signaling_NaN = std::numeric_limits<float>::signaling_NaN();
Handle<Float32x4> value = factory->NewFloat32x4(lanes);
CHECK(value->IsFloat32x4());
CheckSimdValue<Float32x4, float, 4>(*value, lanes, 3.14f);
// Check special lane values.
value->set_lane(1, -0.0);
CHECK_EQ(-0.0f, value->get_lane(1));
CHECK(std::signbit(value->get_lane(1))); // Sign bit should be preserved.
value->set_lane(2, quiet_NaN);
CHECK(std::isnan(value->get_lane(2)));
value->set_lane(3, signaling_NaN);
CHECK(std::isnan(value->get_lane(3)));
#ifdef OBJECT_PRINT
// Check value printing.
{
value = factory->NewFloat32x4(lanes);
std::ostringstream os;
value->Float32x4Print(os);
CHECK_EQ("1, 2, 3, 4", os.str());
}
{
float special_lanes[4] = {0, -0.0, quiet_NaN, signaling_NaN};
value = factory->NewFloat32x4(special_lanes);
std::ostringstream os;
value->Float32x4Print(os);
// Value printing doesn't preserve signed zeroes.
CHECK_EQ("0, 0, NaN, NaN", os.str());
}
#endif // OBJECT_PRINT
}
// Int32x4
{
int32_t lanes[4] = {1, 2, 3, 4};
Handle<Int32x4> value = factory->NewInt32x4(lanes);
CHECK(value->IsInt32x4());
CheckSimdValue<Int32x4, int32_t, 4>(*value, lanes, 3);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int32x4Print(os);
CHECK_EQ("1, 2, 3, 4", os.str());
#endif // OBJECT_PRINT
}
// Uint32x4
{
uint32_t lanes[4] = {1, 2, 3, 4};
Handle<Uint32x4> value = factory->NewUint32x4(lanes);
CHECK(value->IsUint32x4());
CheckSimdValue<Uint32x4, uint32_t, 4>(*value, lanes, 3);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint32x4Print(os);
CHECK_EQ("1, 2, 3, 4", os.str());
#endif // OBJECT_PRINT
}
// Bool32x4
{
bool lanes[4] = {true, false, true, false};
Handle<Bool32x4> value = factory->NewBool32x4(lanes);
CHECK(value->IsBool32x4());
CheckSimdValue<Bool32x4, bool, 4>(*value, lanes, false);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Bool32x4Print(os);
CHECK_EQ("true, false, true, false", os.str());
#endif // OBJECT_PRINT
}
// Int16x8
{
int16_t lanes[8] = {1, 2, 3, 4, 5, 6, 7, 8};
Handle<Int16x8> value = factory->NewInt16x8(lanes);
CHECK(value->IsInt16x8());
CheckSimdValue<Int16x8, int16_t, 8>(*value, lanes, 32767);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int16x8Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8", os.str());
#endif // OBJECT_PRINT
}
// Uint16x8
{
uint16_t lanes[8] = {1, 2, 3, 4, 5, 6, 7, 8};
Handle<Uint16x8> value = factory->NewUint16x8(lanes);
CHECK(value->IsUint16x8());
CheckSimdValue<Uint16x8, uint16_t, 8>(*value, lanes, 32767);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint16x8Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8", os.str());
#endif // OBJECT_PRINT
}
// Bool16x8
{
bool lanes[8] = {true, false, true, false, true, false, true, false};
Handle<Bool16x8> value = factory->NewBool16x8(lanes);
CHECK(value->IsBool16x8());
CheckSimdValue<Bool16x8, bool, 8>(*value, lanes, false);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Bool16x8Print(os);
CHECK_EQ("true, false, true, false, true, false, true, false", os.str());
#endif // OBJECT_PRINT
}
// Int8x16
{
int8_t lanes[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
Handle<Int8x16> value = factory->NewInt8x16(lanes);
CHECK(value->IsInt8x16());
CheckSimdValue<Int8x16, int8_t, 16>(*value, lanes, 127);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Int8x16Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16", os.str());
#endif // OBJECT_PRINT
}
// Uint8x16
{
uint8_t lanes[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
Handle<Uint8x16> value = factory->NewUint8x16(lanes);
CHECK(value->IsUint8x16());
CheckSimdValue<Uint8x16, uint8_t, 16>(*value, lanes, 127);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Uint8x16Print(os);
CHECK_EQ("1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16", os.str());
#endif // OBJECT_PRINT
}
// Bool8x16
{
bool lanes[16] = {true, false, true, false, true, false, true, false,
true, false, true, false, true, false, true, false};
Handle<Bool8x16> value = factory->NewBool8x16(lanes);
CHECK(value->IsBool8x16());
CheckSimdValue<Bool8x16, bool, 16>(*value, lanes, false);
#ifdef OBJECT_PRINT
std::ostringstream os;
value->Bool8x16Print(os);
CHECK_EQ(
"true, false, true, false, true, false, true, false, true, false, "
"true, false, true, false, true, false",
os.str());
#endif // OBJECT_PRINT
}
}
TEST(Tagging) {
CcTest::InitializeVM();
int request = 24;

View File

@ -88,7 +88,7 @@ bytecodes: [
B(TestEqualStrict), R(12), U8(21),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(131),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(12),
B(LdaConstant), U8(9),
B(Star), R(13),
@ -233,7 +233,7 @@ bytecodes: [
B(TestEqualStrict), R(13), U8(20),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(131),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(13),
B(LdaConstant), U8(9),
B(Star), R(14),
@ -391,7 +391,7 @@ bytecodes: [
B(TestEqualStrict), R(12), U8(23),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(131),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(12),
B(LdaConstant), U8(9),
B(Star), R(13),
@ -539,7 +539,7 @@ bytecodes: [
B(TestEqualStrict), R(11), U8(26),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(131),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(11),
B(LdaConstant), U8(11),
B(Star), R(12),

View File

@ -496,7 +496,7 @@ bytecodes: [
B(TestEqualStrict), R(11), U8(21),
B(JumpIfFalse), U8(4),
B(Jump), U8(18),
B(Wide), B(LdaSmi), I16(131),
B(Wide), B(LdaSmi), I16(130),
B(Star), R(11),
B(LdaConstant), U8(11),
B(Star), R(12),

View File

@ -478,48 +478,6 @@ TEST(HeapSnapshotSymbol) {
CHECK(v8_str("mySymbol")->Equals(env.local(), name->GetName()).FromJust());
}
void CheckSimdSnapshot(const char* program, const char* var_name) {
i::FLAG_harmony_simd = true;
LocalContext env;
v8::HandleScope scope(env->GetIsolate());
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
CompileRun(program);
// The TakeHeapSnapshot function does not do enough GCs to ensure
// that all garbage is collected. We perform addition GC here
// to reclaim a floating AllocationSite and to fix the following failure:
// # Check failed: ValidateSnapshot(snapshot).
// Stdout:
// 28 @ 13523 entry with no retainer: /hidden/ system / AllocationSite
// 44 @ 767 $map: /hidden/ system / Map
// 44 @ 59 $map: /hidden/ system / Map
CcTest::CollectAllGarbage(i::Heap::kFinalizeIncrementalMarkingMask);
const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot));
const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
const v8::HeapGraphNode* var =
GetProperty(global, v8::HeapGraphEdge::kProperty, var_name);
CHECK(var);
CHECK_EQ(var->GetType(), v8::HeapGraphNode::kSimdValue);
}
TEST(HeapSnapshotSimd) {
CheckSimdSnapshot("a = SIMD.Float32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Int32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool32x4();\n", "a");
CheckSimdSnapshot("a = SIMD.Int16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool16x8();\n", "a");
CheckSimdSnapshot("a = SIMD.Int8x16();\n", "a");
CheckSimdSnapshot("a = SIMD.Uint8x16();\n", "a");
CheckSimdSnapshot("a = SIMD.Bool8x16();\n", "a");
}
TEST(HeapSnapshotWeakCollection) {
LocalContext env;
v8::HandleScope scope(env->GetIsolate());

View File

@ -58,9 +58,6 @@ TEST(NoSideEffectsToString) {
CheckObject(isolate, factory->undefined_value(), "undefined");
CheckObject(isolate, factory->null_value(), "null");
int lanes[] = {0, 1, 2, 3};
CheckObject(isolate, factory->NewInt32x4(lanes), "SIMD.Int32x4(0, 1, 2, 3)");
CheckObject(isolate, factory->error_to_string(), "[object Error]");
CheckObject(isolate, factory->stack_trace_symbol(),
"Symbol(stack_trace_symbol)");

View File

@ -1,129 +0,0 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/v8.h"
#include "src/factory.h"
#include "src/isolate.h"
#include "src/objects.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
#include "src/ostreams.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/feedback-vector.h ->
// src/feedback-vector-inl.h
#include "src/feedback-vector-inl.h"
#include "test/cctest/cctest.h"
using namespace v8::internal;
#define FLOAT_TEST(type, lane_count) \
{ \
float nan = std::numeric_limits<float>::quiet_NaN(); \
float lanes[lane_count] = {0}; \
Handle<type> a = factory->New##type(lanes); \
Handle<type> b = factory->New##type(lanes); \
CHECK(a->BitwiseEquals(*b)); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
for (int i = 0; i < lane_count; i++) { \
a->set_lane(i, -0.0); \
CHECK(!a->BitwiseEquals(*b)); \
CHECK_NE(a->Hash(), b->Hash()); \
CHECK(!a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
b->set_lane(i, -0.0); \
CHECK(a->BitwiseEquals(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
a->set_lane(i, nan); \
CHECK(!a->BitwiseEquals(*b)); \
CHECK(!a->SameValue(*b)); \
CHECK(!a->SameValueZero(*b)); \
CHECK_NE(a->Hash(), b->Hash()); \
b->set_lane(i, nan); \
CHECK(a->BitwiseEquals(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
} \
}
#define INT_TEST(type, lane_count, lane_type) \
{ \
lane_type lanes[lane_count] = {0}; \
Handle<type> a = factory->New##type(lanes); \
Handle<type> b = factory->New##type(lanes); \
CHECK(a->BitwiseEquals(*b)); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
for (int i = 0; i < lane_count; i++) { \
a->set_lane(i, i + 1); \
CHECK(!a->BitwiseEquals(*b)); \
CHECK_NE(a->Hash(), b->Hash()); \
CHECK(!a->SameValue(*b)); \
CHECK(!a->SameValueZero(*b)); \
b->set_lane(i, i + 1); \
CHECK(a->BitwiseEquals(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
a->set_lane(i, -(i + 1)); \
CHECK(!a->BitwiseEquals(*b)); \
CHECK_NE(a->Hash(), b->Hash()); \
CHECK(!a->SameValue(*b)); \
CHECK(!a->SameValueZero(*b)); \
b->set_lane(i, -(i + 1)); \
CHECK(a->BitwiseEquals(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
} \
}
#define BOOL_TEST(type, lane_count) \
{ \
bool lanes[lane_count] = {false}; \
Handle<type> a = factory->New##type(lanes); \
Handle<type> b = factory->New##type(lanes); \
CHECK(a->BitwiseEquals(*b)); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
for (int i = 0; i < lane_count; i++) { \
a->set_lane(i, true); \
CHECK(!a->BitwiseEquals(*b)); \
CHECK_NE(a->Hash(), b->Hash()); \
CHECK(!a->SameValue(*b)); \
CHECK(!a->SameValueZero(*b)); \
b->set_lane(i, true); \
CHECK(a->BitwiseEquals(*b)); \
CHECK_EQ(a->Hash(), b->Hash()); \
CHECK(a->SameValue(*b)); \
CHECK(a->SameValueZero(*b)); \
} \
}
TEST(SimdTypes) {
CcTest::InitializeVM();
Isolate* isolate = CcTest::i_isolate();
Factory* factory = isolate->factory();
HandleScope sc(isolate);
FLOAT_TEST(Float32x4, 4)
INT_TEST(Int32x4, 4, int32_t)
INT_TEST(Uint32x4, 4, uint32_t)
BOOL_TEST(Bool32x4, 4)
INT_TEST(Int16x8, 8, int16_t)
INT_TEST(Uint16x8, 8, uint16_t)
BOOL_TEST(Bool16x8, 8)
INT_TEST(Int8x16, 16, int8_t)
INT_TEST(Uint8x16, 16, uint8_t)
BOOL_TEST(Bool8x16, 16)
}

View File

@ -25,8 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --harmony-simd
/**
* This test uses assert{True,False}(... == ...) instead of
* assertEquals(..., ...) to not rely on the details of the
@ -242,9 +240,3 @@ testEqual(s, s);
testEqual(Object(s), s);
testEqual(new Wrapper(s), s);
testNotEqual(Object(s), Object(s));
var simd = SIMD.Float32x4(1, 2, 3, 4);
testEqual(simd, simd);
testEqual(Object(simd), simd);
testEqual(new Wrapper(simd), simd);
testNotEqual(Object(simd), Object(simd));

View File

@ -1,636 +0,0 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-simd
// Flags: --allow-natives-syntax --expose-natives-as natives --noalways-opt
function lanesForType(typeName) {
// The lane count follows the first 'x' in the type name, which begins with
// 'float', 'int', or 'bool'.
return Number.parseInt(typeName.substr(typeName.indexOf('x') + 1));
}
// Creates an instance that has been zeroed, so it can be used for equality
// testing.
function createInstance(type) {
// Provide enough parameters for the longest type (currently 16). It's
// important that instances be consistent to better test that different SIMD
// types can't be compared and are never equal or the same in any sense.
return SIMD[type](0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
}
function isValidSimdString(string, value, type, lanes) {
var simdFn = SIMD[type],
parseFn =
type.indexOf('Float') === 0 ? Number.parseFloat : Number.parseInt,
indexOfOpenParen = string.indexOf('(');
// Check prefix (e.g. SIMD.Float32x4.)
if (string.substr(0, indexOfOpenParen) !== 'SIMD.' + type)
return false;
// Remove type name (e.g. SIMD.Float32x4) and open parenthesis.
string = string.substr(indexOfOpenParen + 1);
var laneStrings = string.split(',');
if (laneStrings.length !== lanes)
return false;
for (var i = 0; i < lanes; i++) {
var fromString = parseFn(laneStrings[i]),
fromValue = simdFn.extractLane(value, i);
if (Math.abs(fromString - fromValue) > Number.EPSILON)
return false;
}
return true;
}
var simdTypeNames = ['Float32x4', 'Int32x4', 'Uint32x4', 'Bool32x4',
'Int16x8', 'Uint16x8', 'Bool16x8',
'Int8x16', 'Uint8x16', 'Bool8x16'];
var nonSimdValues = [347, 1.275, NaN, "string", null, undefined, {},
function() {}];
function checkTypeMatrix(type, fn) {
// Check against non-SIMD types.
nonSimdValues.forEach(fn);
// Check against SIMD values of a different type.
for (var i = 0; i < simdTypeNames.length; i++) {
var otherType = simdTypeNames[i];
if (type != otherType) fn(createInstance(otherType));
}
}
// Test different forms of constructor calls.
function TestConstructor(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertFalse(Object === simdFn.prototype.constructor)
assertFalse(simdFn === Object.prototype.constructor)
assertSame(simdFn, simdFn.prototype.constructor)
assertSame(simdFn, instance.__proto__.constructor)
assertSame(simdFn, Object(instance).__proto__.constructor)
assertSame(simdFn.prototype, instance.__proto__)
assertSame(simdFn.prototype, Object(instance).__proto__)
}
function TestType(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
var typeofString = type.charAt(0).toLowerCase() + type.slice(1);
assertEquals(typeofString, typeof instance)
assertTrue(typeof instance === typeofString)
assertTrue(typeof Object(instance) === 'object')
assertEquals(null, %_ClassOf(instance))
assertEquals(type, %_ClassOf(Object(instance)))
}
function TestPrototype(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertSame(Object.prototype, simdFn.prototype.__proto__)
assertSame(simdFn.prototype, instance.__proto__)
assertSame(simdFn.prototype, Object(instance).__proto__)
}
function TestValueOf(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertTrue(instance === Object(instance).valueOf())
assertTrue(instance === instance.valueOf())
assertTrue(simdFn.prototype.valueOf.call(Object(instance)) === instance)
assertTrue(simdFn.prototype.valueOf.call(instance) === instance)
}
function TestGet(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertEquals(undefined, instance.a)
assertEquals(undefined, instance["a" + "b"])
assertEquals(undefined, instance["" + "1"])
assertEquals(undefined, instance[42])
}
function TestToBoolean(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertTrue(Boolean(Object(instance)))
assertFalse(!Object(instance))
assertTrue(Boolean(instance).valueOf())
assertFalse(!instance)
assertTrue(!!instance)
assertTrue(instance && true)
assertFalse(!instance && false)
assertTrue(!instance || true)
assertEquals(1, instance ? 1 : 2)
assertEquals(2, !instance ? 1 : 2)
if (!instance) assertUnreachable();
if (instance) {} else assertUnreachable();
}
function TestToString(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertEquals(instance.toString(), String(instance))
assertTrue(isValidSimdString(instance.toString(), instance, type, lanes))
assertTrue(
isValidSimdString(Object(instance).toString(), instance, type, lanes))
assertTrue(isValidSimdString(
simdFn.prototype.toString.call(instance), instance, type, lanes))
}
function TestToNumber(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
assertThrows(function() { Number(Object(instance)) }, TypeError)
assertThrows(function() { +Object(instance) }, TypeError)
assertThrows(function() { Number(instance) }, TypeError)
assertThrows(function() { instance + 0 }, TypeError)
}
function TestCoercions(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
// Test that setting a lane to value 'a' results in a lane with value 'b'.
function test(a, b) {
for (var i = 0; i < lanes; i++) {
var ainstance = simdFn.replaceLane(instance, i, a);
var lane_value = simdFn.extractLane(ainstance, i);
assertSame(b, lane_value);
}
}
switch (type) {
case 'Float32x4':
test(0, 0);
test(-0, -0);
test(NaN, NaN);
test(null, 0);
test(undefined, NaN);
test("5.25", 5.25);
test(Number.MAX_VALUE, Infinity);
test(-Number.MAX_VALUE, -Infinity);
test(Number.MIN_VALUE, 0);
break;
case 'Int32x4':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, -1);
test(-1.6, -1);
test(2147483647, 2147483647);
test(2147483648, -2147483648);
test(2147483649, -2147483647);
test(4294967295, -1);
test(4294967296, 0);
test(4294967297, 1);
break;
case 'Uint32x4':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 4294967295);
test(-1.6, 4294967295);
test(4294967295, 4294967295);
test(4294967296, 0);
test(4294967297, 1);
break;
case 'Int16x8':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, -1);
test(-1.6, -1);
test(32767, 32767);
test(32768, -32768);
test(32769, -32767);
test(65535, -1);
test(65536, 0);
test(65537, 1);
break;
case 'Uint16x8':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 65535);
test(-1.6, 65535);
test(65535, 65535);
test(65536, 0);
test(65537, 1);
break;
case 'Int8x16':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, -1);
test(-1.6, -1);
test(127, 127);
test(128, -128);
test(129, -127);
test(255, -1);
test(256, 0);
test(257, 1);
break;
case 'Uint8x16':
test(Infinity, 0);
test(-Infinity, 0);
test(NaN, 0);
test(0, 0);
test(-0, 0);
test(Number.MIN_VALUE, 0);
test(-Number.MIN_VALUE, 0);
test(0.1, 0);
test(-0.1, 0);
test(1, 1);
test(1.1, 1);
test(-1, 255);
test(-1.6, 255);
test(255, 255);
test(256, 0);
test(257, 1);
break;
case 'Bool32x4':
case 'Bool16x8':
case 'Bool8x16':
test(true, true);
test(false, false);
test(0, false);
test(1, true);
test(0.1, true);
test(NaN, false);
test(null, false);
test("", false);
test("false", true);
break;
}
}
function TestEquality(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
// Every SIMD value should equal itself, and non-strictly equal its wrapper.
assertSame(instance, instance)
assertEquals(instance, instance)
assertTrue(Object.is(instance, instance))
assertTrue(instance === instance)
assertTrue(instance == instance)
assertFalse(instance === Object(instance))
assertFalse(Object(instance) === instance)
assertTrue(instance == Object(instance))
assertTrue(Object(instance) == instance)
assertTrue(instance === instance.valueOf())
assertTrue(instance.valueOf() === instance)
assertTrue(instance == instance.valueOf())
assertTrue(instance.valueOf() == instance)
assertFalse(Object(instance) === Object(instance))
assertEquals(Object(instance).valueOf(), Object(instance).valueOf())
function notEqual(other) {
assertFalse(instance === other)
assertFalse(other === instance)
assertFalse(instance == other)
assertFalse(other == instance)
}
// SIMD values should not be equal to instances of different types.
checkTypeMatrix(type, function(other) {
assertFalse(instance === other)
assertFalse(other === instance)
assertFalse(instance == other)
assertFalse(other == instance)
});
// Test that f(a, b) is the same as f(SIMD(a), SIMD(b)) for equality and
// strict equality, at every lane.
function test(a, b) {
for (var i = 0; i < lanes; i++) {
var aval = simdFn.replaceLane(instance, i, a);
var bval = simdFn.replaceLane(instance, i, b);
assertSame(a == b, aval == bval);
assertSame(a === b, aval === bval);
}
}
switch (type) {
case 'Float32x4':
test(1, 2.5);
test(1, 1);
test(0, 0);
test(-0, +0);
test(+0, -0);
test(-0, -0);
test(0, NaN);
test(NaN, NaN);
break;
case 'Int32x4':
case 'Uint32x4':
case 'Int16x8':
case 'Uint16x8':
case 'Int8x16':
case 'Uint8x16':
test(1, 2);
test(1, 1);
test(1, -1);
break;
case 'Bool32x4':
case 'Bool16x8':
case 'Bool8x16':
test(true, false);
test(false, true);
break;
}
}
function TestSameValue(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
var sameValue = Object.is
var sameValueZero = function(x, y) { return %SameValueZero(x, y); }
// SIMD values should not be the same as instances of different types.
checkTypeMatrix(type, function(other) {
assertFalse(sameValue(instance, other));
assertFalse(sameValueZero(instance, other));
});
// Test that f(a, b) is the same as f(SIMD(a), SIMD(b)) for sameValue and
// sameValueZero, at every lane.
function test(a, b) {
for (var i = 0; i < lanes; i++) {
var aval = simdFn.replaceLane(instance, i, a);
var bval = simdFn.replaceLane(instance, i, b);
assertSame(sameValue(a, b), sameValue(aval, bval));
assertSame(sameValueZero(a, b), sameValueZero(aval, bval));
}
}
switch (type) {
case 'Float32x4':
test(1, 2.5);
test(1, 1);
test(0, 0);
test(-0, +0);
test(+0, -0);
test(-0, -0);
test(0, NaN);
test(NaN, NaN);
break;
case 'Int32x4':
case 'Uint32x4':
case 'Int16x8':
case 'Uint16x8':
case 'Int8x16':
case 'Uint8x16':
test(1, 2);
test(1, 1);
test(1, -1);
break;
case 'Bool32x4':
case 'Bool16x8':
case 'Bool8x16':
test(true, false);
test(false, true);
break;
}
}
function TestComparison(type, lanes) {
var simdFn = SIMD[type];
var a = createInstance(type), b = createInstance(type);
function compare(other) {
var throwFuncs = [
function lt() { a < b; },
function gt() { a > b; },
function le() { a <= b; },
function ge() { a >= b; },
function lt_same() { a < a; },
function gt_same() { a > a; },
function le_same() { a <= a; },
function ge_same() { a >= a; },
];
for (var f of throwFuncs) {
assertThrows(f, TypeError);
%OptimizeFunctionOnNextCall(f);
assertThrows(f, TypeError);
assertThrows(f, TypeError);
}
}
// Test comparison against the same SIMD type.
compare(b);
// Test comparison against other types.
checkTypeMatrix(type, compare);
}
// Test SIMD value wrapping/boxing over non-builtins.
function TestCall(type, lanes) {
var simdFn = SIMD[type];
var instance = createInstance(type);
simdFn.prototype.getThisProto = function () {
return Object.getPrototypeOf(this);
}
assertTrue(instance.getThisProto() === simdFn.prototype)
}
function TestAsSetKey(type, lanes, set) {
var simdFn = SIMD[type];
var instance = createInstance(type);
function test(set, key) {
assertFalse(set.has(key));
assertFalse(set.delete(key));
if (!(set instanceof WeakSet)) {
assertSame(set, set.add(key));
assertTrue(set.has(key));
assertTrue(set.delete(key));
} else {
// SIMD values can't be used as keys in WeakSets.
assertThrows(function() { set.add(key) });
}
assertFalse(set.has(key));
assertFalse(set.delete(key));
assertFalse(set.has(key));
}
test(set, instance);
}
function TestAsMapKey(type, lanes, map) {
var simdFn = SIMD[type];
var instance = createInstance(type);
function test(map, key, value) {
assertFalse(map.has(key));
assertSame(undefined, map.get(key));
assertFalse(map.delete(key));
if (!(map instanceof WeakMap)) {
assertSame(map, map.set(key, value));
assertSame(value, map.get(key));
assertTrue(map.has(key));
assertTrue(map.delete(key));
} else {
// SIMD values can't be used as keys in WeakMaps.
assertThrows(function() { map.set(key, value) });
}
assertFalse(map.has(key));
assertSame(undefined, map.get(key));
assertFalse(map.delete(key));
assertFalse(map.has(key));
assertSame(undefined, map.get(key));
}
test(map, instance, {});
}
// Test SIMD type with Harmony reflect-apply.
function TestReflectApply(type) {
var simdFn = SIMD[type];
var instance = createInstance(type);
function returnThis() { return this; }
function returnThisStrict() { 'use strict'; return this; }
function noop() {}
function noopStrict() { 'use strict'; }
var R = void 0;
assertSame(SIMD[type].prototype,
Object.getPrototypeOf(
Reflect.apply(returnThis, instance, [])));
assertSame(instance, Reflect.apply(returnThisStrict, instance, []));
assertThrows(
function() { 'use strict'; Reflect.apply(instance); }, TypeError);
assertThrows(
function() { Reflect.apply(instance); }, TypeError);
assertThrows(
function() { Reflect.apply(noopStrict, R, instance); }, TypeError);
assertThrows(
function() { Reflect.apply(noop, R, instance); }, TypeError);
}
function TestSIMDTypes() {
for (var i = 0; i < simdTypeNames.length; ++i) {
var type = simdTypeNames[i],
lanes = lanesForType(type);
TestConstructor(type, lanes);
TestType(type, lanes);
TestPrototype(type, lanes);
TestValueOf(type, lanes);
TestGet(type, lanes);
TestToBoolean(type, lanes);
TestToString(type, lanes);
TestToNumber(type, lanes);
TestCoercions(type, lanes);
TestEquality(type, lanes);
TestSameValue(type, lanes);
TestComparison(type, lanes);
TestCall(type, lanes);
TestAsSetKey(type, lanes, new Set);
TestAsSetKey(type, lanes, new WeakSet);
TestAsMapKey(type, lanes, new Map);
TestAsMapKey(type, lanes, new WeakMap);
TestReflectApply(type);
}
}
TestSIMDTypes();
// Tests for the global SIMD object.
function TestSIMDObject() {
assertSame(typeof SIMD, 'object');
assertSame(SIMD.constructor, Object);
assertSame(Object.getPrototypeOf(SIMD), Object.prototype);
assertSame(SIMD + "", "[object SIMD]");
// The SIMD object is mutable.
SIMD.foo = "foo";
assertSame(SIMD.foo, "foo");
delete SIMD.foo;
delete SIMD.Bool8x16;
assertSame(SIMD.Bool8x16, undefined);
}
TestSIMDObject()
function TestStringify(expected, input) {
assertEquals(expected, JSON.stringify(input));
assertEquals(expected, JSON.stringify(input, (key, value) => value));
assertEquals(JSON.stringify(input, null, "="),
JSON.stringify(input, (key, value) => value, "="));
}
TestStringify(undefined, SIMD.Float32x4(1, 2, 3, 4));
TestStringify('[null]', [SIMD.Float32x4(1, 2, 3, 4)]);
TestStringify('[{}]', [Object(SIMD.Float32x4(1, 2, 3, 4))]);
var simd_wrapper = Object(SIMD.Float32x4(1, 2, 3, 4));
TestStringify('{}', simd_wrapper);
simd_wrapper.a = 1;
TestStringify('{"a":1}', simd_wrapper);

View File

@ -3,7 +3,6 @@
// found in the LICENSE file.
// Flags: --stack-size=100 --harmony
// Flags: --harmony-simd
function test(f, expected, type) {
try {
@ -320,11 +319,6 @@ test(function() {
1 + Symbol();
}, "Cannot convert a Symbol value to a number", TypeError);
// kSimdToNumber
test(function() {
1 + SIMD.Float32x4(1, 2, 3, 4);
}, "Cannot convert a SIMD value to a number", TypeError);
// kUndefinedOrNullToObject
test(function() {
Array.prototype.toString.call(null);

View File

@ -18,7 +18,6 @@
'../tools/whitespace.txt',
'js-perf-test/',
'memory/',
'simdjs/',
],
},
'includes': [

View File

@ -1,244 +0,0 @@
{
"flags": [
"--harmony-simd",
"test/simdjs/harness-adapt.js"
],
"name": "SIMDJS",
"path": [
"../../"
],
"resources": [
"test/simdjs/data/src/benchmarks/base.js",
"test/simdjs/harness-adapt.js",
"test/simdjs/harness-finish.js",
"test/simdjs/data/src/benchmarks/kernel-template.js",
"test/simdjs/data/src/benchmarks/averageFloat32x4.js",
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadFromInt8Array.js",
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadX.js",
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadXY.js",
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadXYZ.js",
"test/simdjs/data/src/benchmarks/matrix-multiplication.js",
"test/simdjs/data/src/benchmarks/transform.js",
"test/simdjs/data/src/benchmarks/shiftrows.js",
"test/simdjs/data/src/benchmarks/transpose4x4.js",
"test/simdjs/data/src/benchmarks/inverse4x4.js",
"test/simdjs/data/src/benchmarks/memset.js",
"test/simdjs/data/src/benchmarks/memcpy.js"
],
"run_count": 5,
"run_count_arm": 3,
"run_count_arm64": 3,
"tests": [
{
"flags": [
"test/simdjs/data/src/benchmarks/kernel-template.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "kernel-template",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/averageFloat32x4.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "averageFloat32x4",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadFromInt8Array.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "averageFloat32x4LoadFromInt8Array",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadX.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "averageFloat32x4LoadX",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadXY.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "averageFloat32x4LoadXY",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/averageFloat32x4LoadXYZ.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "averageFloat32x4LoadXYZ",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/matrix-multiplication.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "matrix-multiplication",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/transform.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "transform",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/shiftrows.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "shiftrows",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/transpose4x4.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "transpose4x4",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/inverse4x4.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "inverse4x4",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/memset.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "memset",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
},
{
"flags": [
"test/simdjs/data/src/benchmarks/memcpy.js"
],
"main": "test/simdjs/harness-finish.js",
"name": "memcpy",
"results_regexp": "%s\\([ ]*([0-9.]+)(ms)?\\)",
"tests": [
{
"name": "SIMD"
},
{
"name": "Non-SIMD"
}
]
}
],
"timeout_arm": 480,
"timeout_arm64": 120,
"units": "ms"
}

Some files were not shown because too many files have changed in this diff Show More