summaryrefslogtreecommitdiff
path: root/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/cctest/compiler/test-js-context-specialization.cc')
-rw-r--r--deps/v8/test/cctest/compiler/test-js-context-specialization.cc48
1 files changed, 3 insertions, 45 deletions
diff --git a/deps/v8/test/cctest/compiler/test-js-context-specialization.cc b/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
index 7938c50069..5e6e3b3cc2 100644
--- a/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
+++ b/deps/v8/test/cctest/compiler/test-js-context-specialization.cc
@@ -82,7 +82,7 @@ void ContextSpecializationTester::CheckContextInputAndDepthChanges(
Node* new_context = NodeProperties::GetContextInput(r.replacement());
CHECK_EQ(IrOpcode::kHeapConstant, new_context->opcode());
HeapObjectMatcher match(new_context);
- CHECK_EQ(*match.Value(), *expected_new_context_object);
+ CHECK_EQ(Context::cast(*match.Value()), *expected_new_context_object);
ContextAccess new_access = ContextAccessOf(r.replacement()->op());
CHECK_EQ(new_access.depth(), expected_new_depth);
@@ -108,11 +108,6 @@ void ContextSpecializationTester::CheckContextInputAndDepthChanges(
static const int slot_index = Context::NATIVE_CONTEXT_INDEX;
TEST(ReduceJSLoadContext0) {
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
@@ -158,7 +153,7 @@ TEST(ReduceJSLoadContext0) {
Node* new_context_input = NodeProperties::GetContextInput(r.replacement());
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
HeapObjectMatcher match(new_context_input);
- CHECK_EQ(*native, *match.Value());
+ CHECK_EQ(*native, Context::cast(*match.Value()));
ContextAccess access = ContextAccessOf(r.replacement()->op());
CHECK_EQ(Context::GLOBAL_EVAL_FUN_INDEX, static_cast<int>(access.index()));
CHECK_EQ(0, static_cast<int>(access.depth()));
@@ -177,8 +172,6 @@ TEST(ReduceJSLoadContext0) {
CHECK(match.HasValue());
CHECK_EQ(*expected, *match.Value());
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(ReduceJSLoadContext1) {
@@ -256,11 +249,6 @@ TEST(ReduceJSLoadContext2) {
// context2 <-- context1 <-- context0 (= HeapConstant(context_object1))
// context_object1 <~~ context_object0
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
@@ -331,8 +319,6 @@ TEST(ReduceJSLoadContext2) {
t.javascript()->LoadContext(3, slot_index, true), context2, start);
t.CheckChangesToValue(load, slot_value0);
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(ReduceJSLoadContext3) {
@@ -342,11 +328,6 @@ TEST(ReduceJSLoadContext3) {
// context_object2 from ReduceJSLoadContext2 for this, so almost all test
// expectations are the same as in ReduceJSLoadContext2.
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
HandleAndZoneScope handle_zone_scope;
auto factory = handle_zone_scope.main_isolate()->factory();
@@ -421,16 +402,9 @@ TEST(ReduceJSLoadContext3) {
t.javascript()->LoadContext(3, slot_index, true), context2, start);
t.CheckChangesToValue(load, slot_value0);
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(ReduceJSStoreContext0) {
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
@@ -484,14 +458,12 @@ TEST(ReduceJSStoreContext0) {
Node* new_context_input = NodeProperties::GetContextInput(r.replacement());
CHECK_EQ(IrOpcode::kHeapConstant, new_context_input->opcode());
HeapObjectMatcher match(new_context_input);
- CHECK_EQ(*native, *match.Value());
+ CHECK_EQ(*native, Context::cast(*match.Value()));
ContextAccess access = ContextAccessOf(r.replacement()->op());
CHECK_EQ(Context::GLOBAL_EVAL_FUN_INDEX, static_cast<int>(access.index()));
CHECK_EQ(0, static_cast<int>(access.depth()));
CHECK_EQ(false, access.immutable());
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(ReduceJSStoreContext1) {
@@ -539,11 +511,6 @@ TEST(ReduceJSStoreContext1) {
}
TEST(ReduceJSStoreContext2) {
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
ContextSpecializationTester t(Nothing<OuterContext>());
Node* start = t.graph()->NewNode(t.common()->Start(0));
@@ -594,16 +561,9 @@ TEST(ReduceJSStoreContext2) {
context2, context2, start, start);
t.CheckContextInputAndDepthChanges(store, context_object0, 0);
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(ReduceJSStoreContext3) {
- // TODO(neis): The native context below does not have all the fields
- // initialized that the heap broker wants to serialize.
- bool concurrent_compiler_frontend = FLAG_concurrent_compiler_frontend;
- FLAG_concurrent_compiler_frontend = false;
-
HandleAndZoneScope handle_zone_scope;
auto factory = handle_zone_scope.main_isolate()->factory();
@@ -658,8 +618,6 @@ TEST(ReduceJSStoreContext3) {
context2, context2, start, start);
t.CheckContextInputAndDepthChanges(store, context_object0, 0);
}
-
- FLAG_concurrent_compiler_frontend = concurrent_compiler_frontend;
}
TEST(SpecializeJSFunction_ToConstant1) {