| 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/code-stubs.h" | 6 #include "src/code-stubs.h" |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
| 9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 727 Node* cache_length_false0; | 727 Node* cache_length_false0; |
| 728 Node* cache_type_false0; | 728 Node* cache_type_false0; |
| 729 Node* efalse0; | 729 Node* efalse0; |
| 730 { | 730 { |
| 731 // FixedArray case. | 731 // FixedArray case. |
| 732 Node* object_instance_type = efalse0 = graph()->NewNode( | 732 Node* object_instance_type = efalse0 = graph()->NewNode( |
| 733 machine()->Load(kMachUint8), object_map, | 733 machine()->Load(kMachUint8), object_map, |
| 734 jsgraph()->IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag), | 734 jsgraph()->IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag), |
| 735 effect, if_false0); | 735 effect, if_false0); |
| 736 | 736 |
| 737 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | 737 Node* check1 = |
| 738 Node* check1 = graph()->NewNode( | 738 graph()->NewNode(machine()->Word32Equal(), object_instance_type, |
| 739 machine()->Uint32LessThanOrEqual(), object_instance_type, | 739 jsgraph()->Uint32Constant(JS_PROXY_TYPE)); |
| 740 jsgraph()->Uint32Constant(LAST_JS_PROXY_TYPE)); | |
| 741 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse), | 740 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse), |
| 742 check1, if_false0); | 741 check1, if_false0); |
| 743 | 742 |
| 744 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); | 743 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); |
| 745 Node* cache_type_true1 = jsgraph()->ZeroConstant(); // Zero indicates proxy | 744 Node* cache_type_true1 = jsgraph()->ZeroConstant(); // Zero indicates proxy |
| 746 | 745 |
| 747 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1); | 746 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1); |
| 748 Node* cache_type_false1 = jsgraph()->OneConstant(); // One means slow check | 747 Node* cache_type_false1 = jsgraph()->OneConstant(); // One means slow check |
| 749 | 748 |
| 750 if_false0 = graph()->NewNode(common()->Merge(2), if_true1, if_false1); | 749 if_false0 = graph()->NewNode(common()->Merge(2), if_true1, if_false1); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 } | 892 } |
| 894 | 893 |
| 895 | 894 |
| 896 MachineOperatorBuilder* JSGenericLowering::machine() const { | 895 MachineOperatorBuilder* JSGenericLowering::machine() const { |
| 897 return jsgraph()->machine(); | 896 return jsgraph()->machine(); |
| 898 } | 897 } |
| 899 | 898 |
| 900 } // namespace compiler | 899 } // namespace compiler |
| 901 } // namespace internal | 900 } // namespace internal |
| 902 } // namespace v8 | 901 } // namespace v8 |
| OLD | NEW |