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 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 Int32Constant(BinaryOperationFeedback::kSignedSmall))); | 1105 Int32Constant(BinaryOperationFeedback::kSignedSmall))); |
1106 Goto(&done_loop); | 1106 Goto(&done_loop); |
1107 } | 1107 } |
1108 | 1108 |
1109 Bind(&if_valueisnotsmi); | 1109 Bind(&if_valueisnotsmi); |
1110 { | 1110 { |
1111 // Check if {value} is a HeapNumber. | 1111 // Check if {value} is a HeapNumber. |
1112 Label if_valueisheapnumber(this), | 1112 Label if_valueisheapnumber(this), |
1113 if_valueisnotheapnumber(this, Label::kDeferred); | 1113 if_valueisnotheapnumber(this, Label::kDeferred); |
1114 Node* value_map = LoadMap(value); | 1114 Node* value_map = LoadMap(value); |
1115 Branch(WordEqual(value_map, HeapNumberMapConstant()), | 1115 Branch(IsHeapNumberMap(value_map), &if_valueisheapnumber, |
1116 &if_valueisheapnumber, &if_valueisnotheapnumber); | 1116 &if_valueisnotheapnumber); |
1117 | 1117 |
1118 Bind(&if_valueisheapnumber); | 1118 Bind(&if_valueisheapnumber); |
1119 { | 1119 { |
1120 // Truncate the floating point value. | 1120 // Truncate the floating point value. |
1121 var_result.Bind(TruncateHeapNumberValueToWord32(value)); | 1121 var_result.Bind(TruncateHeapNumberValueToWord32(value)); |
1122 var_type_feedback->Bind( | 1122 var_type_feedback->Bind( |
1123 Word32Or(var_type_feedback->value(), | 1123 Word32Or(var_type_feedback->value(), |
1124 Int32Constant(BinaryOperationFeedback::kNumber))); | 1124 Int32Constant(BinaryOperationFeedback::kNumber))); |
1125 Goto(&done_loop); | 1125 Goto(&done_loop); |
1126 } | 1126 } |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 Goto(&loop); | 1330 Goto(&loop); |
1331 } | 1331 } |
1332 Bind(&done_loop); | 1332 Bind(&done_loop); |
1333 | 1333 |
1334 return array; | 1334 return array; |
1335 } | 1335 } |
1336 | 1336 |
1337 } // namespace interpreter | 1337 } // namespace interpreter |
1338 } // namespace internal | 1338 } // namespace internal |
1339 } // namespace v8 | 1339 } // namespace v8 |
OLD | NEW |