Index: test/unittests/compiler/js-typed-lowering-unittest.cc |
diff --git a/test/unittests/compiler/js-typed-lowering-unittest.cc b/test/unittests/compiler/js-typed-lowering-unittest.cc |
index a31988bfb4f03b69c3af0e4c541bdbfe5b71613d..ae6a59485ef07a883bdb515d6967af99345e5bfa 100644 |
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc |
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc |
@@ -650,37 +650,34 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) { |
NewArrayBuffer(backing_store, sizeof(backing_store)); |
ResolvedFeedbackSlot feedback; |
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { |
- TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { |
- Handle<JSTypedArray> array = |
- factory()->NewJSTypedArray(type, buffer, 0, kLength); |
- int const element_size = static_cast<int>(array->element_size()); |
- |
- Node* key = Parameter( |
- Type::Range(kMinInt / element_size, kMaxInt / element_size, zone())); |
- Node* base = HeapConstant(array); |
- Node* vector = UndefinedConstant(); |
- Node* context = UndefinedConstant(); |
- Node* effect = graph()->start(); |
- Node* control = graph()->start(); |
- Reduction r = Reduce( |
- graph()->NewNode(javascript()->LoadProperty(feedback, language_mode), |
- base, key, vector, context, EmptyFrameState(), |
- EmptyFrameState(), effect, control)); |
+ Handle<JSTypedArray> array = |
+ factory()->NewJSTypedArray(type, buffer, 0, kLength); |
+ int const element_size = static_cast<int>(array->element_size()); |
+ |
+ Node* key = Parameter( |
+ Type::Range(kMinInt / element_size, kMaxInt / element_size, zone())); |
+ Node* base = HeapConstant(array); |
+ Node* vector = UndefinedConstant(); |
+ Node* context = UndefinedConstant(); |
+ Node* effect = graph()->start(); |
+ Node* control = graph()->start(); |
+ Reduction r = Reduce(graph()->NewNode( |
+ javascript()->LoadProperty(feedback), base, key, vector, context, |
+ EmptyFrameState(), EmptyFrameState(), effect, control)); |
- Matcher<Node*> offset_matcher = |
- element_size == 1 |
- ? key |
- : IsWord32Shl(key, IsInt32Constant(WhichPowerOf2(element_size))); |
+ Matcher<Node*> offset_matcher = |
+ element_size == 1 |
+ ? key |
+ : IsWord32Shl(key, IsInt32Constant(WhichPowerOf2(element_size))); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT( |
- r.replacement(), |
- IsLoadBuffer(BufferAccess(type), |
- IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
- offset_matcher, |
- IsNumberConstant(array->byte_length()->Number()), effect, |
- control)); |
- } |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT( |
+ r.replacement(), |
+ IsLoadBuffer(BufferAccess(type), |
+ IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
+ offset_matcher, |
+ IsNumberConstant(array->byte_length()->Number()), effect, |
+ control)); |
} |
} |
@@ -692,32 +689,29 @@ TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArrayWithSafeKey) { |
NewArrayBuffer(backing_store, sizeof(backing_store)); |
ResolvedFeedbackSlot feedback; |
TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { |
- TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { |
- Handle<JSTypedArray> array = |
- factory()->NewJSTypedArray(type, buffer, 0, kLength); |
- ElementAccess access = AccessBuilder::ForTypedArrayElement(type, true); |
- |
- int min = random_number_generator()->NextInt(static_cast<int>(kLength)); |
- int max = random_number_generator()->NextInt(static_cast<int>(kLength)); |
- if (min > max) std::swap(min, max); |
- Node* key = Parameter(Type::Range(min, max, zone())); |
- Node* base = HeapConstant(array); |
- Node* vector = UndefinedConstant(); |
- Node* context = UndefinedConstant(); |
- Node* effect = graph()->start(); |
- Node* control = graph()->start(); |
- Reduction r = Reduce( |
- graph()->NewNode(javascript()->LoadProperty(feedback, language_mode), |
- base, key, vector, context, EmptyFrameState(), |
- EmptyFrameState(), effect, control)); |
+ Handle<JSTypedArray> array = |
+ factory()->NewJSTypedArray(type, buffer, 0, kLength); |
+ ElementAccess access = AccessBuilder::ForTypedArrayElement(type, true); |
+ |
+ int min = random_number_generator()->NextInt(static_cast<int>(kLength)); |
+ int max = random_number_generator()->NextInt(static_cast<int>(kLength)); |
+ if (min > max) std::swap(min, max); |
+ Node* key = Parameter(Type::Range(min, max, zone())); |
+ Node* base = HeapConstant(array); |
+ Node* vector = UndefinedConstant(); |
+ Node* context = UndefinedConstant(); |
+ Node* effect = graph()->start(); |
+ Node* control = graph()->start(); |
+ Reduction r = Reduce(graph()->NewNode( |
+ javascript()->LoadProperty(feedback), base, key, vector, context, |
+ EmptyFrameState(), EmptyFrameState(), effect, control)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT( |
- r.replacement(), |
- IsLoadElement(access, |
- IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
- key, effect, control)); |
- } |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT( |
+ r.replacement(), |
+ IsLoadElement(access, |
+ IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
+ key, effect, control)); |
} |
} |
@@ -891,17 +885,14 @@ TEST_F(JSTypedLoweringTest, JSLoadNamedGlobalConstants) { |
Node* effect = graph()->start(); |
Node* control = graph()->start(); |
- TRACED_FOREACH(LanguageMode, language_mode, kLanguageModes) { |
- for (size_t i = 0; i < arraysize(names); i++) { |
- Unique<Name> name = Unique<Name>::CreateImmovable(names[i]); |
- Reduction r = Reduce(graph()->NewNode( |
- javascript()->LoadNamed(name, feedback, language_mode), global, |
- vector, context, EmptyFrameState(), EmptyFrameState(), effect, |
- control)); |
+ for (size_t i = 0; i < arraysize(names); i++) { |
+ Unique<Name> name = Unique<Name>::CreateImmovable(names[i]); |
+ Reduction r = Reduce(graph()->NewNode( |
+ javascript()->LoadNamed(name, feedback), global, vector, context, |
+ EmptyFrameState(), EmptyFrameState(), effect, control)); |
- ASSERT_TRUE(r.Changed()); |
- EXPECT_THAT(r.replacement(), matches[i]); |
- } |
+ ASSERT_TRUE(r.Changed()); |
+ EXPECT_THAT(r.replacement(), matches[i]); |
} |
} |