| 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/interpreter/interpreter.h" | 5 #include "src/interpreter/interpreter.h" |
| 6 | 6 |
| 7 #include <fstream> | 7 #include <fstream> |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 | 1040 |
| 1041 __ GotoUnless(__ TaggedIsSmi(lhs), &lhs_is_not_smi); | 1041 __ GotoUnless(__ TaggedIsSmi(lhs), &lhs_is_not_smi); |
| 1042 | 1042 |
| 1043 var_type_feedback.Bind( | 1043 var_type_feedback.Bind( |
| 1044 __ Int32Constant(CompareOperationFeedback::kSignedSmall)); | 1044 __ Int32Constant(CompareOperationFeedback::kSignedSmall)); |
| 1045 __ Goto(&gather_rhs_type); | 1045 __ Goto(&gather_rhs_type); |
| 1046 | 1046 |
| 1047 __ Bind(&lhs_is_not_smi); | 1047 __ Bind(&lhs_is_not_smi); |
| 1048 { | 1048 { |
| 1049 Node* lhs_map = __ LoadMap(lhs); | 1049 Node* lhs_map = __ LoadMap(lhs); |
| 1050 __ GotoUnless(__ WordEqual(lhs_map, __ HeapNumberMapConstant()), | 1050 __ GotoUnless(__ IsHeapNumberMap(lhs_map), &lhs_is_not_number); |
| 1051 &lhs_is_not_number); | |
| 1052 | 1051 |
| 1053 var_type_feedback.Bind( | 1052 var_type_feedback.Bind( |
| 1054 __ Int32Constant(CompareOperationFeedback::kNumber)); | 1053 __ Int32Constant(CompareOperationFeedback::kNumber)); |
| 1055 __ Goto(&gather_rhs_type); | 1054 __ Goto(&gather_rhs_type); |
| 1056 | 1055 |
| 1057 __ Bind(&lhs_is_not_number); | 1056 __ Bind(&lhs_is_not_number); |
| 1058 { | 1057 { |
| 1059 Node* lhs_instance_type = __ LoadInstanceType(lhs); | 1058 Node* lhs_instance_type = __ LoadInstanceType(lhs); |
| 1060 if (Token::IsOrderedRelationalCompareOp(compare_op)) { | 1059 if (Token::IsOrderedRelationalCompareOp(compare_op)) { |
| 1061 Label lhs_is_not_oddball(assembler); | 1060 Label lhs_is_not_oddball(assembler); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1085 __ GotoUnless(__ TaggedIsSmi(rhs), &rhs_is_not_smi); | 1084 __ GotoUnless(__ TaggedIsSmi(rhs), &rhs_is_not_smi); |
| 1086 | 1085 |
| 1087 var_type_feedback.Bind(__ Word32Or( | 1086 var_type_feedback.Bind(__ Word32Or( |
| 1088 var_type_feedback.value(), | 1087 var_type_feedback.value(), |
| 1089 __ Int32Constant(CompareOperationFeedback::kSignedSmall))); | 1088 __ Int32Constant(CompareOperationFeedback::kSignedSmall))); |
| 1090 __ Goto(&update_feedback); | 1089 __ Goto(&update_feedback); |
| 1091 | 1090 |
| 1092 __ Bind(&rhs_is_not_smi); | 1091 __ Bind(&rhs_is_not_smi); |
| 1093 { | 1092 { |
| 1094 Node* rhs_map = __ LoadMap(rhs); | 1093 Node* rhs_map = __ LoadMap(rhs); |
| 1095 __ GotoUnless(__ WordEqual(rhs_map, __ HeapNumberMapConstant()), | 1094 __ GotoUnless(__ IsHeapNumberMap(rhs_map), &rhs_is_not_number); |
| 1096 &rhs_is_not_number); | |
| 1097 | 1095 |
| 1098 var_type_feedback.Bind( | 1096 var_type_feedback.Bind( |
| 1099 __ Word32Or(var_type_feedback.value(), | 1097 __ Word32Or(var_type_feedback.value(), |
| 1100 __ Int32Constant(CompareOperationFeedback::kNumber))); | 1098 __ Int32Constant(CompareOperationFeedback::kNumber))); |
| 1101 __ Goto(&update_feedback); | 1099 __ Goto(&update_feedback); |
| 1102 | 1100 |
| 1103 __ Bind(&rhs_is_not_number); | 1101 __ Bind(&rhs_is_not_number); |
| 1104 { | 1102 { |
| 1105 Node* rhs_instance_type = __ LoadInstanceType(rhs); | 1103 Node* rhs_instance_type = __ LoadInstanceType(rhs); |
| 1106 if (Token::IsOrderedRelationalCompareOp(compare_op)) { | 1104 if (Token::IsOrderedRelationalCompareOp(compare_op)) { |
| (...skipping 1683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2790 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2788 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
| 2791 __ SmiTag(new_state)); | 2789 __ SmiTag(new_state)); |
| 2792 __ SetAccumulator(old_state); | 2790 __ SetAccumulator(old_state); |
| 2793 | 2791 |
| 2794 __ Dispatch(); | 2792 __ Dispatch(); |
| 2795 } | 2793 } |
| 2796 | 2794 |
| 2797 } // namespace interpreter | 2795 } // namespace interpreter |
| 2798 } // namespace internal | 2796 } // namespace internal |
| 2799 } // namespace v8 | 2797 } // namespace v8 |
| OLD | NEW |