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

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

Issue 680063004: [turbofan] Minor cleanups to lowering of typed array loads/stores. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix win64 Created 6 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 | Annotate | Revision Log
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/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/js-operator.h" 7 #include "src/compiler/js-operator.h"
8 #include "src/compiler/js-typed-lowering.h" 8 #include "src/compiler/js-typed-lowering.h"
9 #include "src/compiler/machine-operator.h" 9 #include "src/compiler/machine-operator.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 95 }
96 node->AppendInput(zone(), effect); 96 node->AppendInput(zone(), effect);
97 node->AppendInput(zone(), control); 97 node->AppendInput(zone(), control);
98 Reduction r = Reduce(node); 98 Reduction r = Reduce(node);
99 99
100 ASSERT_TRUE(r.Changed()); 100 ASSERT_TRUE(r.Changed());
101 EXPECT_THAT( 101 EXPECT_THAT(
102 r.replacement(), 102 r.replacement(),
103 IsLoadElement(AccessBuilder::ForTypedArrayElement(type, true), 103 IsLoadElement(AccessBuilder::ForTypedArrayElement(type, true),
104 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), 104 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
105 key, IsInt32Constant(static_cast<int>(kLength)), effect, 105 key, IsNumberConstant(static_cast<double>(kLength)),
106 control)); 106 effect, control));
107 } 107 }
108 } 108 }
109 109
110 110
111 // ----------------------------------------------------------------------------- 111 // -----------------------------------------------------------------------------
112 // JSStoreProperty 112 // JSStoreProperty
113 113
114 114
115 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArray) { 115 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArray) {
116 const size_t kLength = 17; 116 const size_t kLength = 17;
(...skipping 18 matching lines...) Expand all
135 } 135 }
136 node->AppendInput(zone(), effect); 136 node->AppendInput(zone(), effect);
137 node->AppendInput(zone(), control); 137 node->AppendInput(zone(), control);
138 Reduction r = Reduce(node); 138 Reduction r = Reduce(node);
139 139
140 ASSERT_TRUE(r.Changed()); 140 ASSERT_TRUE(r.Changed());
141 EXPECT_THAT(r.replacement(), 141 EXPECT_THAT(r.replacement(),
142 IsStoreElement( 142 IsStoreElement(
143 AccessBuilder::ForTypedArrayElement(type, true), 143 AccessBuilder::ForTypedArrayElement(type, true),
144 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), 144 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])),
145 key, IsInt32Constant(static_cast<int>(kLength)), value, 145 key, IsNumberConstant(static_cast<double>(kLength)),
146 effect, control)); 146 value, effect, control));
147 } 147 }
148 } 148 }
149 } 149 }
150 150
151 } // namespace compiler 151 } // namespace compiler
152 } // namespace internal 152 } // namespace internal
153 } // namespace v8 153 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator-reducer.cc ('k') | test/unittests/compiler/simplified-operator-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698