| 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 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 FeedbackVectorICSlot::Invalid()); | 911 FeedbackVectorICSlot::Invalid()); |
| 912 for (int i = 0; i < DynamicGlobalAccess::kMaxCheckDepth; ++i) { | 912 for (int i = 0; i < DynamicGlobalAccess::kMaxCheckDepth; ++i) { |
| 913 uint32_t bitset = 1 << i; // Only single check. | 913 uint32_t bitset = 1 << i; // Only single check. |
| 914 Reduction r = Reduce(graph()->NewNode( | 914 Reduction r = Reduce(graph()->NewNode( |
| 915 javascript()->LoadDynamicGlobal(name, bitset, feedback, NOT_CONTEXTUAL), | 915 javascript()->LoadDynamicGlobal(name, bitset, feedback, NOT_CONTEXTUAL), |
| 916 context, context, frame_state, frame_state, effect, control)); | 916 context, context, frame_state, frame_state, effect, control)); |
| 917 ASSERT_TRUE(r.Changed()); | 917 ASSERT_TRUE(r.Changed()); |
| 918 EXPECT_THAT( | 918 EXPECT_THAT( |
| 919 r.replacement(), | 919 r.replacement(), |
| 920 IsPhi(kMachAnyTagged, _, _, | 920 IsPhi(kMachAnyTagged, _, _, |
| 921 IsMerge(IsIfTrue(IsBranch( | 921 IsMerge( |
| 922 IsObjectIsSmi(IsLoadContext( | 922 IsIfTrue(IsBranch( |
| 923 IsReferenceEqual( |
| 924 Type::Tagged(), |
| 925 IsLoadContext( |
| 923 ContextAccess(i, Context::EXTENSION_INDEX, false), | 926 ContextAccess(i, Context::EXTENSION_INDEX, false), |
| 924 context)), | 927 context), |
| 925 control)), | 928 IsNumberConstant(BitEq(0.0))), |
| 926 _))); | 929 control)), |
| 930 _))); |
| 927 } | 931 } |
| 928 } | 932 } |
| 929 | 933 |
| 930 #if V8_TURBOFAN_TARGET | 934 #if V8_TURBOFAN_TARGET |
| 931 | 935 |
| 932 // ----------------------------------------------------------------------------- | 936 // ----------------------------------------------------------------------------- |
| 933 // JSAdd | 937 // JSAdd |
| 934 | 938 |
| 935 | 939 |
| 936 TEST_F(JSTypedLoweringTest, JSAddWithString) { | 940 TEST_F(JSTypedLoweringTest, JSAddWithString) { |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 EXPECT_THAT(r.replacement(), | 1053 EXPECT_THAT(r.replacement(), |
| 1050 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( | 1054 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( |
| 1051 Context::MIN_CONTEXT_SLOTS)), | 1055 Context::MIN_CONTEXT_SLOTS)), |
| 1052 effect, control), | 1056 effect, control), |
| 1053 _)); | 1057 _)); |
| 1054 } | 1058 } |
| 1055 | 1059 |
| 1056 } // namespace compiler | 1060 } // namespace compiler |
| 1057 } // namespace internal | 1061 } // namespace internal |
| 1058 } // namespace v8 | 1062 } // namespace v8 |
| OLD | NEW |