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

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

Issue 1447443002: [turbofan] Ensure inlined constructor calls still throw. (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 unified diff | Download patch
« no previous file with comments | « test/unittests/compiler/js-operator-unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/code-factory.h" 5 #include "src/code-factory.h"
6 #include "src/compiler/access-builder.h" 6 #include "src/compiler/access-builder.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-operator.h" 8 #include "src/compiler/js-operator.h"
9 #include "src/compiler/js-typed-lowering.h" 9 #include "src/compiler/js-typed-lowering.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 // ----------------------------------------------------------------------------- 981 // -----------------------------------------------------------------------------
982 // JSCreate 982 // JSCreate
983 983
984 984
985 TEST_F(JSTypedLoweringTest, JSCreate) { 985 TEST_F(JSTypedLoweringTest, JSCreate) {
986 Handle<JSFunction> function = isolate()->object_function(); 986 Handle<JSFunction> function = isolate()->object_function();
987 Node* const target = Parameter(Type::Constant(function, graph()->zone())); 987 Node* const target = Parameter(Type::Constant(function, graph()->zone()));
988 Node* const context = Parameter(Type::Any()); 988 Node* const context = Parameter(Type::Any());
989 Node* const effect = graph()->start(); 989 Node* const effect = graph()->start();
990 Reduction r = Reduce(graph()->NewNode(javascript()->Create(), target, target, 990 Reduction r = Reduce(graph()->NewNode(javascript()->Create(), target, target,
991 context, effect)); 991 context, EmptyFrameState(), effect));
992 ASSERT_TRUE(r.Changed()); 992 ASSERT_TRUE(r.Changed());
993 EXPECT_THAT( 993 EXPECT_THAT(
994 r.replacement(), 994 r.replacement(),
995 IsFinishRegion( 995 IsFinishRegion(
996 IsAllocate(IsNumberConstant(function->initial_map()->instance_size()), 996 IsAllocate(IsNumberConstant(function->initial_map()->instance_size()),
997 IsBeginRegion(effect), _), 997 IsBeginRegion(effect), _),
998 _)); 998 _));
999 } 999 }
1000 1000
1001 1001
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1253 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context, 1253 Node* dummy = graph()->NewNode(javascript()->ToObject(), instanceOf, context,
1254 frame_state, effect, control); 1254 frame_state, effect, control);
1255 Reduction r = Reduce(instanceOf); 1255 Reduction r = Reduce(instanceOf);
1256 ASSERT_FALSE(r.Changed()); 1256 ASSERT_FALSE(r.Changed());
1257 ASSERT_EQ(instanceOf, dummy->InputAt(0)); 1257 ASSERT_EQ(instanceOf, dummy->InputAt(0));
1258 } 1258 }
1259 1259
1260 } // namespace compiler 1260 } // namespace compiler
1261 } // namespace internal 1261 } // namespace internal
1262 } // namespace v8 1262 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-operator-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698