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-assembler.h" | 5 #include "src/interpreter/interpreter-assembler.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 #include <ostream> | 8 #include <ostream> |
9 | 9 |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 | 862 |
863 // Check if the {value} is a Smi or a HeapObject. | 863 // Check if the {value} is a Smi or a HeapObject. |
864 Label if_valueissmi(this), if_valueisnotsmi(this); | 864 Label if_valueissmi(this), if_valueisnotsmi(this); |
865 Branch(WordIsSmi(value), &if_valueissmi, &if_valueisnotsmi); | 865 Branch(WordIsSmi(value), &if_valueissmi, &if_valueisnotsmi); |
866 | 866 |
867 Bind(&if_valueissmi); | 867 Bind(&if_valueissmi); |
868 { | 868 { |
869 // Convert the Smi {value}. | 869 // Convert the Smi {value}. |
870 var_result.Bind(SmiToWord32(value)); | 870 var_result.Bind(SmiToWord32(value)); |
871 var_type_feedback->Bind( | 871 var_type_feedback->Bind( |
872 Word32And(var_type_feedback->value(), | 872 Word32Or(var_type_feedback->value(), |
873 Int32Constant(BinaryOperationFeedback::kSignedSmall))); | 873 Int32Constant(BinaryOperationFeedback::kSignedSmall))); |
874 Goto(&done_loop); | 874 Goto(&done_loop); |
875 } | 875 } |
876 | 876 |
877 Bind(&if_valueisnotsmi); | 877 Bind(&if_valueisnotsmi); |
878 { | 878 { |
879 // Check if {value} is a HeapNumber. | 879 // Check if {value} is a HeapNumber. |
880 Label if_valueisheapnumber(this), | 880 Label if_valueisheapnumber(this), |
881 if_valueisnotheapnumber(this, Label::kDeferred); | 881 if_valueisnotheapnumber(this, Label::kDeferred); |
882 Branch(WordEqual(LoadMap(value), HeapNumberMapConstant()), | 882 Branch(WordEqual(LoadMap(value), HeapNumberMapConstant()), |
883 &if_valueisheapnumber, &if_valueisnotheapnumber); | 883 &if_valueisheapnumber, &if_valueisnotheapnumber); |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 Goto(&loop); | 1073 Goto(&loop); |
1074 } | 1074 } |
1075 Bind(&done_loop); | 1075 Bind(&done_loop); |
1076 | 1076 |
1077 return array; | 1077 return array; |
1078 } | 1078 } |
1079 | 1079 |
1080 } // namespace interpreter | 1080 } // namespace interpreter |
1081 } // namespace internal | 1081 } // namespace internal |
1082 } // namespace v8 | 1082 } // namespace v8 |
OLD | NEW |