OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/js-native-context-specialization.h" | 5 #include "src/compiler/js-native-context-specialization.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 this_length); | 698 this_length); |
699 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue), check, | 699 Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue), check, |
700 this_control); | 700 this_control); |
701 exit_controls.push_back(graph()->NewNode(common()->IfFalse(), branch)); | 701 exit_controls.push_back(graph()->NewNode(common()->IfFalse(), branch)); |
702 this_control = graph()->NewNode(common()->IfTrue(), branch); | 702 this_control = graph()->NewNode(common()->IfTrue(), branch); |
703 | 703 |
704 // Compute the element access. | 704 // Compute the element access. |
705 Type* element_type = Type::Any(); | 705 Type* element_type = Type::Any(); |
706 MachineType element_machine_type = MachineType::AnyTagged(); | 706 MachineType element_machine_type = MachineType::AnyTagged(); |
707 if (IsFastDoubleElementsKind(elements_kind)) { | 707 if (IsFastDoubleElementsKind(elements_kind)) { |
708 element_type = type_cache_.kFloat64; | 708 element_type = Type::Number(); |
709 element_machine_type = MachineType::Float64(); | 709 element_machine_type = MachineType::Float64(); |
710 } else if (IsFastSmiElementsKind(elements_kind)) { | 710 } else if (IsFastSmiElementsKind(elements_kind)) { |
711 element_type = type_cache_.kSmi; | 711 element_type = type_cache_.kSmi; |
712 } | 712 } |
713 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize, | 713 ElementAccess element_access = {kTaggedBase, FixedArray::kHeaderSize, |
714 element_type, element_machine_type}; | 714 element_type, element_machine_type}; |
715 | 715 |
716 // Access the actual element. | 716 // Access the actual element. |
717 // TODO(bmeurer): Refactor this into separate methods or even a separate | 717 // TODO(bmeurer): Refactor this into separate methods or even a separate |
718 // class that deals with the elements access. | 718 // class that deals with the elements access. |
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1024 } | 1024 } |
1025 | 1025 |
1026 | 1026 |
1027 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { | 1027 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { |
1028 return jsgraph()->simplified(); | 1028 return jsgraph()->simplified(); |
1029 } | 1029 } |
1030 | 1030 |
1031 } // namespace compiler | 1031 } // namespace compiler |
1032 } // namespace internal | 1032 } // namespace internal |
1033 } // namespace v8 | 1033 } // namespace v8 |
OLD | NEW |