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

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

Issue 1227893005: TypeofMode replaces TypeofState and ContextualMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: minor fix Created 5 years, 5 months 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
« src/ic/ic.cc ('K') | « test/cctest/test-disasm-x87.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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 Node* const context = Parameter(Type::Any()); 914 Node* const context = Parameter(Type::Any());
915 Node* const vector = UndefinedConstant(); 915 Node* const vector = UndefinedConstant();
916 Node* const frame_state = EmptyFrameState(); 916 Node* const frame_state = EmptyFrameState();
917 Node* const effect = graph()->start(); 917 Node* const effect = graph()->start();
918 Node* const control = graph()->start(); 918 Node* const control = graph()->start();
919 Handle<String> name = factory()->object_string(); 919 Handle<String> name = factory()->object_string();
920 VectorSlotPair feedback; 920 VectorSlotPair feedback;
921 for (int i = 0; i < DynamicGlobalAccess::kMaxCheckDepth; ++i) { 921 for (int i = 0; i < DynamicGlobalAccess::kMaxCheckDepth; ++i) {
922 uint32_t bitset = 1 << i; // Only single check. 922 uint32_t bitset = 1 << i; // Only single check.
923 Reduction r = Reduce(graph()->NewNode( 923 Reduction r = Reduce(graph()->NewNode(
924 javascript()->LoadDynamicGlobal(name, bitset, feedback, NOT_CONTEXTUAL), 924 javascript()->LoadDynamicGlobal(name, bitset, feedback, INSIDE_TYPEOF),
925 vector, context, context, frame_state, frame_state, effect, control)); 925 vector, context, context, frame_state, frame_state, effect, control));
926 ASSERT_TRUE(r.Changed()); 926 ASSERT_TRUE(r.Changed());
927 EXPECT_THAT( 927 EXPECT_THAT(
928 r.replacement(), 928 r.replacement(),
929 IsPhi(kMachAnyTagged, _, _, 929 IsPhi(kMachAnyTagged, _, _,
930 IsMerge( 930 IsMerge(
931 IsIfTrue(IsBranch( 931 IsIfTrue(IsBranch(
932 IsReferenceEqual( 932 IsReferenceEqual(
933 Type::Tagged(), 933 Type::Tagged(),
934 IsLoadContext( 934 IsLoadContext(
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 EXPECT_THAT(r.replacement(), 1096 EXPECT_THAT(r.replacement(),
1097 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( 1097 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
1098 Context::MIN_CONTEXT_SLOTS)), 1098 Context::MIN_CONTEXT_SLOTS)),
1099 effect, control), 1099 effect, control),
1100 _)); 1100 _));
1101 } 1101 }
1102 1102
1103 } // namespace compiler 1103 } // namespace compiler
1104 } // namespace internal 1104 } // namespace internal
1105 } // namespace v8 1105 } // namespace v8
OLDNEW
« src/ic/ic.cc ('K') | « test/cctest/test-disasm-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698