OLD | NEW |
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 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 879 |
880 ASSERT_TRUE(r.Changed()); | 880 ASSERT_TRUE(r.Changed()); |
881 EXPECT_THAT(r.replacement(), matches[i]); | 881 EXPECT_THAT(r.replacement(), matches[i]); |
882 } | 882 } |
883 } | 883 } |
884 | 884 |
885 | 885 |
886 // ----------------------------------------------------------------------------- | 886 // ----------------------------------------------------------------------------- |
887 // JSCreateClosure | 887 // JSCreateClosure |
888 | 888 |
889 | 889 #if V8_TURBOFAN_TARGET |
890 TEST_F(JSTypedLoweringTest, JSCreateClosure) { | 890 TEST_F(JSTypedLoweringTest, JSCreateClosure) { |
891 Node* const context = UndefinedConstant(); | 891 Node* const context = UndefinedConstant(); |
892 Node* const effect = graph()->start(); | 892 Node* const effect = graph()->start(); |
893 Node* const control = graph()->start(); | 893 Node* const control = graph()->start(); |
894 Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared()); | 894 Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared()); |
895 Reduction r = | 895 Reduction r = |
896 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED), | 896 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED), |
897 context, context, effect, control)); | 897 context, context, effect, control)); |
898 ASSERT_TRUE(r.Changed()); | 898 ASSERT_TRUE(r.Changed()); |
899 EXPECT_THAT( | 899 EXPECT_THAT( |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
946 Reduction const r = Reduce(graph()->NewNode( | 946 Reduction const r = Reduce(graph()->NewNode( |
947 javascript()->CreateLiteralObject(ObjectLiteral::kShallowProperties), | 947 javascript()->CreateLiteralObject(ObjectLiteral::kShallowProperties), |
948 input0, input1, input2, context, frame_state, effect, control)); | 948 input0, input1, input2, context, frame_state, effect, control)); |
949 ASSERT_TRUE(r.Changed()); | 949 ASSERT_TRUE(r.Changed()); |
950 EXPECT_THAT( | 950 EXPECT_THAT( |
951 r.replacement(), | 951 r.replacement(), |
952 IsCall(_, IsHeapConstant(Unique<HeapObject>::CreateImmovable( | 952 IsCall(_, IsHeapConstant(Unique<HeapObject>::CreateImmovable( |
953 CodeFactory::FastCloneShallowObject(isolate(), 6).code())), | 953 CodeFactory::FastCloneShallowObject(isolate(), 6).code())), |
954 input0, input1, input2, _, context, frame_state, effect, control)); | 954 input0, input1, input2, _, context, frame_state, effect, control)); |
955 } | 955 } |
| 956 #endif |
956 | 957 |
957 } // namespace compiler | 958 } // namespace compiler |
958 } // namespace internal | 959 } // namespace internal |
959 } // namespace v8 | 960 } // namespace v8 |
OLD | NEW |