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 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1074 __ Int32Constant(CompareOperationFeedback::kNumber))); | 1074 __ Int32Constant(CompareOperationFeedback::kNumber))); |
1075 __ Goto(&update_feedback); | 1075 __ Goto(&update_feedback); |
1076 | 1076 |
1077 __ Bind(&rhs_is_not_number); | 1077 __ Bind(&rhs_is_not_number); |
1078 { | 1078 { |
1079 Node* rhs_instance_type = __ LoadInstanceType(rhs); | 1079 Node* rhs_instance_type = __ LoadInstanceType(rhs); |
1080 Node* rhs_is_oddball = | 1080 Node* rhs_is_oddball = |
1081 __ Word32Equal(rhs_instance_type, __ Int32Constant(ODDBALL_TYPE)); | 1081 __ Word32Equal(rhs_instance_type, __ Int32Constant(ODDBALL_TYPE)); |
1082 __ GotoUnless(rhs_is_oddball, &rhs_is_not_oddball); | 1082 __ GotoUnless(rhs_is_oddball, &rhs_is_not_oddball); |
1083 | 1083 |
1084 var_type_feedback.Bind( | 1084 var_type_feedback.Bind(__ Word32Or( |
1085 __ Int32Constant(CompareOperationFeedback::kNumberOrOddball)); | 1085 var_type_feedback.value(), |
1086 __ Goto(&do_compare); | 1086 __ Int32Constant(CompareOperationFeedback::kNumberOrOddball))); |
| 1087 __ Goto(&update_feedback); |
1087 | 1088 |
1088 __ Bind(&rhs_is_not_oddball); | 1089 __ Bind(&rhs_is_not_oddball); |
1089 { | 1090 { |
1090 Node* rhs_type = | 1091 Node* rhs_type = |
1091 __ Select(__ IsStringInstanceType(rhs_instance_type), | 1092 __ Select(__ IsStringInstanceType(rhs_instance_type), |
1092 __ Int32Constant(CompareOperationFeedback::kString), | 1093 __ Int32Constant(CompareOperationFeedback::kString), |
1093 __ Int32Constant(CompareOperationFeedback::kAny)); | 1094 __ Int32Constant(CompareOperationFeedback::kAny)); |
1094 var_type_feedback.Bind( | 1095 var_type_feedback.Bind( |
1095 __ Word32Or(var_type_feedback.value(), rhs_type)); | 1096 __ Word32Or(var_type_feedback.value(), rhs_type)); |
1096 __ Goto(&update_feedback); | 1097 __ Goto(&update_feedback); |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2763 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2763 __ SmiTag(new_state)); | 2764 __ SmiTag(new_state)); |
2764 __ SetAccumulator(old_state); | 2765 __ SetAccumulator(old_state); |
2765 | 2766 |
2766 __ Dispatch(); | 2767 __ Dispatch(); |
2767 } | 2768 } |
2768 | 2769 |
2769 } // namespace interpreter | 2770 } // namespace interpreter |
2770 } // namespace internal | 2771 } // namespace internal |
2771 } // namespace v8 | 2772 } // namespace v8 |
OLD | NEW |