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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 Node* cache_length_false0; | 717 Node* cache_length_false0; |
718 Node* cache_type_false0; | 718 Node* cache_type_false0; |
719 Node* efalse0; | 719 Node* efalse0; |
720 { | 720 { |
721 // FixedArray case. | 721 // FixedArray case. |
722 Node* object_instance_type = efalse0 = graph()->NewNode( | 722 Node* object_instance_type = efalse0 = graph()->NewNode( |
723 machine()->Load(kMachUint8), object_map, | 723 machine()->Load(kMachUint8), object_map, |
724 jsgraph()->IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag), | 724 jsgraph()->IntPtrConstant(Map::kInstanceTypeOffset - kHeapObjectTag), |
725 effect, if_false0); | 725 effect, if_false0); |
726 | 726 |
727 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_JS_RECEIVER_TYPE); | 727 Node* check1 = |
728 Node* check1 = graph()->NewNode( | 728 graph()->NewNode(machine()->Word32Equal(), object_instance_type, |
729 machine()->Uint32LessThanOrEqual(), object_instance_type, | 729 jsgraph()->Uint32Constant(JS_PROXY_TYPE)); |
730 jsgraph()->Uint32Constant(LAST_JS_PROXY_TYPE)); | |
731 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse), | 730 Node* branch1 = graph()->NewNode(common()->Branch(BranchHint::kFalse), |
732 check1, if_false0); | 731 check1, if_false0); |
733 | 732 |
734 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); | 733 Node* if_true1 = graph()->NewNode(common()->IfTrue(), branch1); |
735 Node* cache_type_true1 = jsgraph()->ZeroConstant(); // Zero indicates proxy | 734 Node* cache_type_true1 = jsgraph()->ZeroConstant(); // Zero indicates proxy |
736 | 735 |
737 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1); | 736 Node* if_false1 = graph()->NewNode(common()->IfFalse(), branch1); |
738 Node* cache_type_false1 = jsgraph()->OneConstant(); // One means slow check | 737 Node* cache_type_false1 = jsgraph()->OneConstant(); // One means slow check |
739 | 738 |
740 if_false0 = graph()->NewNode(common()->Merge(2), if_true1, if_false1); | 739 if_false0 = graph()->NewNode(common()->Merge(2), if_true1, if_false1); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 } | 882 } |
884 | 883 |
885 | 884 |
886 MachineOperatorBuilder* JSGenericLowering::machine() const { | 885 MachineOperatorBuilder* JSGenericLowering::machine() const { |
887 return jsgraph()->machine(); | 886 return jsgraph()->machine(); |
888 } | 887 } |
889 | 888 |
890 } // namespace compiler | 889 } // namespace compiler |
891 } // namespace internal | 890 } // namespace internal |
892 } // namespace v8 | 891 } // namespace v8 |
OLD | NEW |