| 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/compilation-dependencies.h" | 6 #include "src/compilation-dependencies.h" |
| 7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/js-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 2189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2200 cache_type_true0 = cache_type; | 2200 cache_type_true0 = cache_type; |
| 2201 } | 2201 } |
| 2202 | 2202 |
| 2203 Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0); | 2203 Node* if_false0 = graph()->NewNode(common()->IfFalse(), branch0); |
| 2204 Node* cache_array_false0; | 2204 Node* cache_array_false0; |
| 2205 Node* cache_length_false0; | 2205 Node* cache_length_false0; |
| 2206 Node* cache_type_false0; | 2206 Node* cache_type_false0; |
| 2207 Node* efalse0; | 2207 Node* efalse0; |
| 2208 { | 2208 { |
| 2209 // FixedArray case. | 2209 // FixedArray case. |
| 2210 Node* receiver_instance_type = efalse0 = graph()->NewNode( | 2210 cache_type_false0 = jsgraph()->ZeroConstant(); // Smi means slow check |
| 2211 simplified()->LoadField(AccessBuilder::ForMapInstanceType()), | |
| 2212 receiver_map, effect, if_false0); | |
| 2213 | |
| 2214 cache_type_false0 = graph()->NewNode( | |
| 2215 common()->Select(MachineRepresentation::kTagged, BranchHint::kFalse), | |
| 2216 graph()->NewNode(machine()->Word32Equal(), receiver_instance_type, | |
| 2217 jsgraph()->Uint32Constant(JS_PROXY_TYPE)), | |
| 2218 jsgraph()->ZeroConstant(), // Zero indicagtes proxy. | |
| 2219 jsgraph()->OneConstant()); // One means slow check. | |
| 2220 | |
| 2221 cache_array_false0 = cache_type; | 2211 cache_array_false0 = cache_type; |
| 2222 cache_length_false0 = efalse0 = graph()->NewNode( | 2212 cache_length_false0 = efalse0 = graph()->NewNode( |
| 2223 simplified()->LoadField(AccessBuilder::ForFixedArrayLength()), | 2213 simplified()->LoadField(AccessBuilder::ForFixedArrayLength()), |
| 2224 cache_array_false0, efalse0, if_false0); | 2214 cache_array_false0, effect, if_false0); |
| 2225 } | 2215 } |
| 2226 | 2216 |
| 2227 control = graph()->NewNode(common()->Merge(2), if_true0, if_false0); | 2217 control = graph()->NewNode(common()->Merge(2), if_true0, if_false0); |
| 2228 effect = graph()->NewNode(common()->EffectPhi(2), etrue0, efalse0, control); | 2218 effect = graph()->NewNode(common()->EffectPhi(2), etrue0, efalse0, control); |
| 2229 Node* cache_array = | 2219 Node* cache_array = |
| 2230 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), | 2220 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), |
| 2231 cache_array_true0, cache_array_false0, control); | 2221 cache_array_true0, cache_array_false0, control); |
| 2232 Node* cache_length = | 2222 Node* cache_length = |
| 2233 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), | 2223 graph()->NewNode(common()->Phi(MachineRepresentation::kTagged, 2), |
| 2234 cache_length_true0, cache_length_false0, control); | 2224 cache_length_true0, cache_length_false0, control); |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2673 } | 2663 } |
| 2674 | 2664 |
| 2675 | 2665 |
| 2676 CompilationDependencies* JSTypedLowering::dependencies() const { | 2666 CompilationDependencies* JSTypedLowering::dependencies() const { |
| 2677 return dependencies_; | 2667 return dependencies_; |
| 2678 } | 2668 } |
| 2679 | 2669 |
| 2680 } // namespace compiler | 2670 } // namespace compiler |
| 2681 } // namespace internal | 2671 } // namespace internal |
| 2682 } // namespace v8 | 2672 } // namespace v8 |
| OLD | NEW |