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/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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 NewArrayBuffer(backing_store, arraysize(backing_store)); | 80 NewArrayBuffer(backing_store, arraysize(backing_store)); |
81 TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { | 81 TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { |
82 Handle<JSTypedArray> array = | 82 Handle<JSTypedArray> array = |
83 factory()->NewJSTypedArray(type, buffer, kLength); | 83 factory()->NewJSTypedArray(type, buffer, kLength); |
84 | 84 |
85 Node* key = Parameter(Type::Integral32()); | 85 Node* key = Parameter(Type::Integral32()); |
86 Node* base = HeapConstant(array); | 86 Node* base = HeapConstant(array); |
87 Node* context = UndefinedConstant(); | 87 Node* context = UndefinedConstant(); |
88 Node* effect = graph()->start(); | 88 Node* effect = graph()->start(); |
89 Node* control = graph()->start(); | 89 Node* control = graph()->start(); |
90 Node* node = | 90 KeyedLoadICFeedbackNode feedback(Handle<TypeFeedbackVector>::null(), 0); |
Michael Starzinger
2014/10/08 15:23:09
nit: Please move this out of the for-each loop (to
mvstanton
2014/10/10 08:26:16
Done.
| |
91 graph()->NewNode(javascript()->LoadProperty(), base, key, context); | 91 Node* node = graph()->NewNode(javascript()->LoadProperty(feedback), base, |
92 key, context); | |
92 if (FLAG_turbo_deoptimization) { | 93 if (FLAG_turbo_deoptimization) { |
93 node->AppendInput(zone(), UndefinedConstant()); | 94 node->AppendInput(zone(), UndefinedConstant()); |
94 } | 95 } |
95 node->AppendInput(zone(), effect); | 96 node->AppendInput(zone(), effect); |
96 node->AppendInput(zone(), control); | 97 node->AppendInput(zone(), control); |
97 Reduction r = Reduce(node); | 98 Reduction r = Reduce(node); |
98 | 99 |
99 Capture<Node*> elements; | 100 Capture<Node*> elements; |
100 ASSERT_TRUE(r.Changed()); | 101 ASSERT_TRUE(r.Changed()); |
101 EXPECT_THAT( | 102 EXPECT_THAT( |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 CaptureEq(&elements)), | 156 CaptureEq(&elements)), |
156 key, IsInt32Constant(static_cast<int>(kLength)), value, effect, | 157 key, IsInt32Constant(static_cast<int>(kLength)), value, effect, |
157 control)); | 158 control)); |
158 } | 159 } |
159 } | 160 } |
160 } | 161 } |
161 | 162 |
162 } // namespace compiler | 163 } // namespace compiler |
163 } // namespace internal | 164 } // namespace internal |
164 } // namespace v8 | 165 } // namespace v8 |
OLD | NEW |