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

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

Issue 1205473004: [turbofan] Make global variable loads and stores explicit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « test/unittests/compiler/js-type-feedback-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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 Handle<String>(isolate()->heap()->nan_string(), isolate()) // -- 878 Handle<String>(isolate()->heap()->nan_string(), isolate()) // --
879 }; 879 };
880 Matcher<Node*> matches[] = { 880 Matcher<Node*> matches[] = {
881 IsHeapConstant(Unique<HeapObject>::CreateImmovable( 881 IsHeapConstant(Unique<HeapObject>::CreateImmovable(
882 Handle<HeapObject>(isolate()->heap()->undefined_value(), isolate()))), 882 Handle<HeapObject>(isolate()->heap()->undefined_value(), isolate()))),
883 IsNumberConstant(std::numeric_limits<double>::infinity()), 883 IsNumberConstant(std::numeric_limits<double>::infinity()),
884 IsNumberConstant(IsNaN()) // -- 884 IsNumberConstant(IsNaN()) // --
885 }; 885 };
886 886
887 VectorSlotPair feedback; 887 VectorSlotPair feedback;
888 Node* global = Parameter(Type::GlobalObject()); 888 Node* global = UndefinedConstant();
889 Node* vector = UndefinedConstant(); 889 Node* vector = UndefinedConstant();
890 Node* context = UndefinedConstant(); 890 Node* context = UndefinedConstant();
891 Node* effect = graph()->start(); 891 Node* effect = graph()->start();
892 Node* control = graph()->start(); 892 Node* control = graph()->start();
893 893
894 for (size_t i = 0; i < arraysize(names); i++) { 894 for (size_t i = 0; i < arraysize(names); i++) {
895 Unique<Name> name = Unique<Name>::CreateImmovable(names[i]); 895 Unique<Name> name = Unique<Name>::CreateImmovable(names[i]);
896 Reduction r = Reduce(graph()->NewNode( 896 Reduction r = Reduce(graph()->NewNode(
897 javascript()->LoadNamed(name, feedback), global, vector, context, 897 javascript()->LoadGlobal(name, feedback), global, vector, context,
898 EmptyFrameState(), EmptyFrameState(), effect, control)); 898 EmptyFrameState(), EmptyFrameState(), effect, control));
899 899
900 ASSERT_TRUE(r.Changed()); 900 ASSERT_TRUE(r.Changed());
901 EXPECT_THAT(r.replacement(), matches[i]); 901 EXPECT_THAT(r.replacement(), matches[i]);
902 } 902 }
903 } 903 }
904 904
905 905
906 // ----------------------------------------------------------------------------- 906 // -----------------------------------------------------------------------------
907 // JSLoadDynamicGlobal 907 // JSLoadDynamicGlobal
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 EXPECT_THAT(r.replacement(), 1093 EXPECT_THAT(r.replacement(),
1094 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor( 1094 IsFinish(IsAllocate(IsNumberConstant(Context::SizeFor(
1095 Context::MIN_CONTEXT_SLOTS)), 1095 Context::MIN_CONTEXT_SLOTS)),
1096 effect, control), 1096 effect, control),
1097 _)); 1097 _));
1098 } 1098 }
1099 1099
1100 } // namespace compiler 1100 } // namespace compiler
1101 } // namespace internal 1101 } // namespace internal
1102 } // namespace v8 1102 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-type-feedback-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698