Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: test/unittests/compiler/js-typed-lowering-unittest.cc

Issue 1481753003: [compiler] Decouple ToObject from CreateWithContext. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 98b3f097414fd3ff2803d519d79f9742ed87708e..e2a0a0753900f81ed078b8e3d52ae47410a27a11 100644
--- a/test/unittests/compiler/js-typed-lowering-unittest.cc
+++ b/test/unittests/compiler/js-typed-lowering-unittest.cc
@@ -1186,7 +1186,7 @@ TEST_F(JSTypedLoweringTest, JSCreateFunctionContextViaStub) {
TEST_F(JSTypedLoweringTest, JSCreateWithContext) {
Node* const object = Parameter(Type::Receiver());
- Node* const closure = Parameter(Type::Any());
+ Node* const closure = Parameter(Type::Function());
Node* const context = Parameter(Type::Any());
Node* const frame_state = EmptyFrameState();
Node* const effect = graph()->start();
@@ -1195,11 +1195,16 @@ TEST_F(JSTypedLoweringTest, JSCreateWithContext) {
Reduce(graph()->NewNode(javascript()->CreateWithContext(), object,
closure, context, frame_state, effect, control));
ASSERT_TRUE(r.Changed());
- EXPECT_THAT(r.replacement(),
- IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
- Context::MIN_CONTEXT_SLOTS)),
- IsBeginRegion(effect), control),
- _));
+ EXPECT_THAT(
+ r.replacement(),
+ IsFinishRegion(
+ IsAllocate(
+ IsNumberConstant(Context::SizeFor(Context::MIN_CONTEXT_SLOTS)),
+ IsBeginRegion(IsLoadField(
+ AccessBuilder::ForContextSlot(Context::GLOBAL_OBJECT_INDEX),
+ context, effect, control)),
+ control),
+ _));
}
« no previous file with comments | « src/runtime/runtime-scopes.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698