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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 // sometimes emit comparisons that shouldn't collect feedback (e.g. | 953 // sometimes emit comparisons that shouldn't collect feedback (e.g. |
954 // try-finally blocks and generators), and we could get rid of this by | 954 // try-finally blocks and generators), and we could get rid of this by |
955 // introducing Smi equality tests. | 955 // introducing Smi equality tests. |
956 Label skip_feedback_update(assembler); | 956 Label skip_feedback_update(assembler); |
957 __ GotoIf(__ WordEqual(slot_index, __ IntPtrConstant(0)), | 957 __ GotoIf(__ WordEqual(slot_index, __ IntPtrConstant(0)), |
958 &skip_feedback_update); | 958 &skip_feedback_update); |
959 | 959 |
960 Variable var_type_feedback(assembler, MachineRepresentation::kWord32); | 960 Variable var_type_feedback(assembler, MachineRepresentation::kWord32); |
961 Label lhs_is_smi(assembler), lhs_is_not_smi(assembler), | 961 Label lhs_is_smi(assembler), lhs_is_not_smi(assembler), |
962 gather_rhs_type(assembler), do_compare(assembler); | 962 gather_rhs_type(assembler), do_compare(assembler); |
963 __ Branch(__ WordIsSmi(lhs), &lhs_is_smi, &lhs_is_not_smi); | 963 __ Branch(__ TaggedIsSmi(lhs), &lhs_is_smi, &lhs_is_not_smi); |
964 | 964 |
965 __ Bind(&lhs_is_smi); | 965 __ Bind(&lhs_is_smi); |
966 var_type_feedback.Bind( | 966 var_type_feedback.Bind( |
967 __ Int32Constant(CompareOperationFeedback::kSignedSmall)); | 967 __ Int32Constant(CompareOperationFeedback::kSignedSmall)); |
968 __ Goto(&gather_rhs_type); | 968 __ Goto(&gather_rhs_type); |
969 | 969 |
970 __ Bind(&lhs_is_not_smi); | 970 __ Bind(&lhs_is_not_smi); |
971 { | 971 { |
972 Label lhs_is_number(assembler), lhs_is_not_number(assembler); | 972 Label lhs_is_number(assembler), lhs_is_not_number(assembler); |
973 Node* lhs_map = __ LoadMap(lhs); | 973 Node* lhs_map = __ LoadMap(lhs); |
974 __ Branch(__ WordEqual(lhs_map, __ HeapNumberMapConstant()), &lhs_is_number, | 974 __ Branch(__ WordEqual(lhs_map, __ HeapNumberMapConstant()), &lhs_is_number, |
975 &lhs_is_not_number); | 975 &lhs_is_not_number); |
976 | 976 |
977 __ Bind(&lhs_is_number); | 977 __ Bind(&lhs_is_number); |
978 var_type_feedback.Bind(__ Int32Constant(CompareOperationFeedback::kNumber)); | 978 var_type_feedback.Bind(__ Int32Constant(CompareOperationFeedback::kNumber)); |
979 __ Goto(&gather_rhs_type); | 979 __ Goto(&gather_rhs_type); |
980 | 980 |
981 __ Bind(&lhs_is_not_number); | 981 __ Bind(&lhs_is_not_number); |
982 var_type_feedback.Bind(__ Int32Constant(CompareOperationFeedback::kAny)); | 982 var_type_feedback.Bind(__ Int32Constant(CompareOperationFeedback::kAny)); |
983 __ Goto(&do_compare); | 983 __ Goto(&do_compare); |
984 } | 984 } |
985 | 985 |
986 __ Bind(&gather_rhs_type); | 986 __ Bind(&gather_rhs_type); |
987 { | 987 { |
988 Label rhs_is_smi(assembler); | 988 Label rhs_is_smi(assembler); |
989 __ GotoIf(__ WordIsSmi(rhs), &rhs_is_smi); | 989 __ GotoIf(__ TaggedIsSmi(rhs), &rhs_is_smi); |
990 | 990 |
991 Node* rhs_map = __ LoadMap(rhs); | 991 Node* rhs_map = __ LoadMap(rhs); |
992 Node* rhs_type = | 992 Node* rhs_type = |
993 __ Select(__ WordEqual(rhs_map, __ HeapNumberMapConstant()), | 993 __ Select(__ WordEqual(rhs_map, __ HeapNumberMapConstant()), |
994 __ Int32Constant(CompareOperationFeedback::kNumber), | 994 __ Int32Constant(CompareOperationFeedback::kNumber), |
995 __ Int32Constant(CompareOperationFeedback::kAny)); | 995 __ Int32Constant(CompareOperationFeedback::kAny)); |
996 var_type_feedback.Bind(__ Word32Or(var_type_feedback.value(), rhs_type)); | 996 var_type_feedback.Bind(__ Word32Or(var_type_feedback.value(), rhs_type)); |
997 __ Goto(&do_compare); | 997 __ Goto(&do_compare); |
998 | 998 |
999 __ Bind(&rhs_is_smi); | 999 __ Bind(&rhs_is_smi); |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 case Token::SAR: { | 1124 case Token::SAR: { |
1125 Node* value = __ Word32Sar( | 1125 Node* value = __ Word32Sar( |
1126 lhs_value, __ Word32And(rhs_value, __ Int32Constant(0x1f))); | 1126 lhs_value, __ Word32And(rhs_value, __ Int32Constant(0x1f))); |
1127 result = __ ChangeInt32ToTagged(value); | 1127 result = __ ChangeInt32ToTagged(value); |
1128 } break; | 1128 } break; |
1129 default: | 1129 default: |
1130 UNREACHABLE(); | 1130 UNREACHABLE(); |
1131 } | 1131 } |
1132 | 1132 |
1133 Node* result_type = | 1133 Node* result_type = |
1134 __ Select(__ WordIsSmi(result), | 1134 __ Select(__ TaggedIsSmi(result), |
1135 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), | 1135 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), |
1136 __ Int32Constant(BinaryOperationFeedback::kNumber)); | 1136 __ Int32Constant(BinaryOperationFeedback::kNumber)); |
1137 | 1137 |
1138 if (FLAG_debug_code) { | 1138 if (FLAG_debug_code) { |
1139 Label ok(assembler); | 1139 Label ok(assembler); |
1140 __ GotoIf(__ WordIsSmi(result), &ok); | 1140 __ GotoIf(__ TaggedIsSmi(result), &ok); |
1141 Node* result_map = __ LoadMap(result); | 1141 Node* result_map = __ LoadMap(result); |
1142 __ AbortIfWordNotEqual(result_map, __ HeapNumberMapConstant(), | 1142 __ AbortIfWordNotEqual(result_map, __ HeapNumberMapConstant(), |
1143 kExpectedHeapNumber); | 1143 kExpectedHeapNumber); |
1144 __ Goto(&ok); | 1144 __ Goto(&ok); |
1145 __ Bind(&ok); | 1145 __ Bind(&ok); |
1146 } | 1146 } |
1147 | 1147 |
1148 Node* input_feedback = | 1148 Node* input_feedback = |
1149 __ Word32Or(var_lhs_type_feedback.value(), var_rhs_type_feedback.value()); | 1149 __ Word32Or(var_lhs_type_feedback.value(), var_rhs_type_feedback.value()); |
1150 __ UpdateFeedback(__ Word32Or(result_type, input_feedback), | 1150 __ UpdateFeedback(__ Word32Or(result_type, input_feedback), |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1215 | 1215 |
1216 Node* reg_index = __ BytecodeOperandReg(1); | 1216 Node* reg_index = __ BytecodeOperandReg(1); |
1217 Node* left = __ LoadRegister(reg_index); | 1217 Node* left = __ LoadRegister(reg_index); |
1218 Node* raw_int = __ BytecodeOperandImm(0); | 1218 Node* raw_int = __ BytecodeOperandImm(0); |
1219 Node* right = __ SmiTag(raw_int); | 1219 Node* right = __ SmiTag(raw_int); |
1220 Node* slot_index = __ BytecodeOperandIdx(2); | 1220 Node* slot_index = __ BytecodeOperandIdx(2); |
1221 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1221 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1222 | 1222 |
1223 // {right} is known to be a Smi. | 1223 // {right} is known to be a Smi. |
1224 // Check if the {left} is a Smi take the fast path. | 1224 // Check if the {left} is a Smi take the fast path. |
1225 __ BranchIf(__ WordIsSmi(left), &fastpath, &slowpath); | 1225 __ BranchIf(__ TaggedIsSmi(left), &fastpath, &slowpath); |
1226 __ Bind(&fastpath); | 1226 __ Bind(&fastpath); |
1227 { | 1227 { |
1228 // Try fast Smi addition first. | 1228 // Try fast Smi addition first. |
1229 Node* pair = __ SmiAddWithOverflow(left, right); | 1229 Node* pair = __ SmiAddWithOverflow(left, right); |
1230 Node* overflow = __ Projection(1, pair); | 1230 Node* overflow = __ Projection(1, pair); |
1231 | 1231 |
1232 // Check if the Smi additon overflowed. | 1232 // Check if the Smi additon overflowed. |
1233 Label if_notoverflow(assembler); | 1233 Label if_notoverflow(assembler); |
1234 __ BranchIf(overflow, &slowpath, &if_notoverflow); | 1234 __ BranchIf(overflow, &slowpath, &if_notoverflow); |
1235 __ Bind(&if_notoverflow); | 1235 __ Bind(&if_notoverflow); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1268 | 1268 |
1269 Node* reg_index = __ BytecodeOperandReg(1); | 1269 Node* reg_index = __ BytecodeOperandReg(1); |
1270 Node* left = __ LoadRegister(reg_index); | 1270 Node* left = __ LoadRegister(reg_index); |
1271 Node* raw_int = __ BytecodeOperandImm(0); | 1271 Node* raw_int = __ BytecodeOperandImm(0); |
1272 Node* right = __ SmiTag(raw_int); | 1272 Node* right = __ SmiTag(raw_int); |
1273 Node* slot_index = __ BytecodeOperandIdx(2); | 1273 Node* slot_index = __ BytecodeOperandIdx(2); |
1274 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1274 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1275 | 1275 |
1276 // {right} is known to be a Smi. | 1276 // {right} is known to be a Smi. |
1277 // Check if the {left} is a Smi take the fast path. | 1277 // Check if the {left} is a Smi take the fast path. |
1278 __ BranchIf(__ WordIsSmi(left), &fastpath, &slowpath); | 1278 __ BranchIf(__ TaggedIsSmi(left), &fastpath, &slowpath); |
1279 __ Bind(&fastpath); | 1279 __ Bind(&fastpath); |
1280 { | 1280 { |
1281 // Try fast Smi subtraction first. | 1281 // Try fast Smi subtraction first. |
1282 Node* pair = __ SmiSubWithOverflow(left, right); | 1282 Node* pair = __ SmiSubWithOverflow(left, right); |
1283 Node* overflow = __ Projection(1, pair); | 1283 Node* overflow = __ Projection(1, pair); |
1284 | 1284 |
1285 // Check if the Smi subtraction overflowed. | 1285 // Check if the Smi subtraction overflowed. |
1286 Label if_notoverflow(assembler); | 1286 Label if_notoverflow(assembler); |
1287 __ BranchIf(overflow, &slowpath, &if_notoverflow); | 1287 __ BranchIf(overflow, &slowpath, &if_notoverflow); |
1288 __ Bind(&if_notoverflow); | 1288 __ Bind(&if_notoverflow); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1322 Node* context = __ GetContext(); | 1322 Node* context = __ GetContext(); |
1323 Node* slot_index = __ BytecodeOperandIdx(2); | 1323 Node* slot_index = __ BytecodeOperandIdx(2); |
1324 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1324 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1325 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); | 1325 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); |
1326 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( | 1326 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( |
1327 context, left, &var_lhs_type_feedback); | 1327 context, left, &var_lhs_type_feedback); |
1328 Node* rhs_value = __ SmiToWord32(right); | 1328 Node* rhs_value = __ SmiToWord32(right); |
1329 Node* value = __ Word32Or(lhs_value, rhs_value); | 1329 Node* value = __ Word32Or(lhs_value, rhs_value); |
1330 Node* result = __ ChangeInt32ToTagged(value); | 1330 Node* result = __ ChangeInt32ToTagged(value); |
1331 Node* result_type = | 1331 Node* result_type = |
1332 __ Select(__ WordIsSmi(result), | 1332 __ Select(__ TaggedIsSmi(result), |
1333 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), | 1333 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), |
1334 __ Int32Constant(BinaryOperationFeedback::kNumber)); | 1334 __ Int32Constant(BinaryOperationFeedback::kNumber)); |
1335 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), | 1335 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), |
1336 type_feedback_vector, slot_index); | 1336 type_feedback_vector, slot_index); |
1337 __ SetAccumulator(result); | 1337 __ SetAccumulator(result); |
1338 __ Dispatch(); | 1338 __ Dispatch(); |
1339 } | 1339 } |
1340 | 1340 |
1341 // BitwiseAnd <imm> <reg> | 1341 // BitwiseAnd <imm> <reg> |
1342 // | 1342 // |
1343 // BitwiseAnd <reg> with <imm>. For this operation <reg> is the lhs | 1343 // BitwiseAnd <reg> with <imm>. For this operation <reg> is the lhs |
1344 // operand and <imm> is the rhs operand. | 1344 // operand and <imm> is the rhs operand. |
1345 void Interpreter::DoBitwiseAndSmi(InterpreterAssembler* assembler) { | 1345 void Interpreter::DoBitwiseAndSmi(InterpreterAssembler* assembler) { |
1346 Node* reg_index = __ BytecodeOperandReg(1); | 1346 Node* reg_index = __ BytecodeOperandReg(1); |
1347 Node* left = __ LoadRegister(reg_index); | 1347 Node* left = __ LoadRegister(reg_index); |
1348 Node* raw_int = __ BytecodeOperandImm(0); | 1348 Node* raw_int = __ BytecodeOperandImm(0); |
1349 Node* right = __ SmiTag(raw_int); | 1349 Node* right = __ SmiTag(raw_int); |
1350 Node* context = __ GetContext(); | 1350 Node* context = __ GetContext(); |
1351 Node* slot_index = __ BytecodeOperandIdx(2); | 1351 Node* slot_index = __ BytecodeOperandIdx(2); |
1352 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1352 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1353 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); | 1353 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); |
1354 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( | 1354 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( |
1355 context, left, &var_lhs_type_feedback); | 1355 context, left, &var_lhs_type_feedback); |
1356 Node* rhs_value = __ SmiToWord32(right); | 1356 Node* rhs_value = __ SmiToWord32(right); |
1357 Node* value = __ Word32And(lhs_value, rhs_value); | 1357 Node* value = __ Word32And(lhs_value, rhs_value); |
1358 Node* result = __ ChangeInt32ToTagged(value); | 1358 Node* result = __ ChangeInt32ToTagged(value); |
1359 Node* result_type = | 1359 Node* result_type = |
1360 __ Select(__ WordIsSmi(result), | 1360 __ Select(__ TaggedIsSmi(result), |
1361 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), | 1361 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), |
1362 __ Int32Constant(BinaryOperationFeedback::kNumber)); | 1362 __ Int32Constant(BinaryOperationFeedback::kNumber)); |
1363 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), | 1363 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), |
1364 type_feedback_vector, slot_index); | 1364 type_feedback_vector, slot_index); |
1365 __ SetAccumulator(result); | 1365 __ SetAccumulator(result); |
1366 __ Dispatch(); | 1366 __ Dispatch(); |
1367 } | 1367 } |
1368 | 1368 |
1369 // ShiftLeftSmi <imm> <reg> | 1369 // ShiftLeftSmi <imm> <reg> |
1370 // | 1370 // |
1371 // Left shifts register <src> by the count specified in <imm>. | 1371 // Left shifts register <src> by the count specified in <imm>. |
1372 // Register <src> is converted to an int32 before the operation. The 5 | 1372 // Register <src> is converted to an int32 before the operation. The 5 |
1373 // lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). | 1373 // lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). |
1374 void Interpreter::DoShiftLeftSmi(InterpreterAssembler* assembler) { | 1374 void Interpreter::DoShiftLeftSmi(InterpreterAssembler* assembler) { |
1375 Node* reg_index = __ BytecodeOperandReg(1); | 1375 Node* reg_index = __ BytecodeOperandReg(1); |
1376 Node* left = __ LoadRegister(reg_index); | 1376 Node* left = __ LoadRegister(reg_index); |
1377 Node* raw_int = __ BytecodeOperandImm(0); | 1377 Node* raw_int = __ BytecodeOperandImm(0); |
1378 Node* right = __ SmiTag(raw_int); | 1378 Node* right = __ SmiTag(raw_int); |
1379 Node* context = __ GetContext(); | 1379 Node* context = __ GetContext(); |
1380 Node* slot_index = __ BytecodeOperandIdx(2); | 1380 Node* slot_index = __ BytecodeOperandIdx(2); |
1381 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1381 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1382 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); | 1382 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); |
1383 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( | 1383 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( |
1384 context, left, &var_lhs_type_feedback); | 1384 context, left, &var_lhs_type_feedback); |
1385 Node* rhs_value = __ SmiToWord32(right); | 1385 Node* rhs_value = __ SmiToWord32(right); |
1386 Node* shift_count = __ Word32And(rhs_value, __ Int32Constant(0x1f)); | 1386 Node* shift_count = __ Word32And(rhs_value, __ Int32Constant(0x1f)); |
1387 Node* value = __ Word32Shl(lhs_value, shift_count); | 1387 Node* value = __ Word32Shl(lhs_value, shift_count); |
1388 Node* result = __ ChangeInt32ToTagged(value); | 1388 Node* result = __ ChangeInt32ToTagged(value); |
1389 Node* result_type = | 1389 Node* result_type = |
1390 __ Select(__ WordIsSmi(result), | 1390 __ Select(__ TaggedIsSmi(result), |
1391 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), | 1391 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), |
1392 __ Int32Constant(BinaryOperationFeedback::kNumber)); | 1392 __ Int32Constant(BinaryOperationFeedback::kNumber)); |
1393 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), | 1393 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), |
1394 type_feedback_vector, slot_index); | 1394 type_feedback_vector, slot_index); |
1395 __ SetAccumulator(result); | 1395 __ SetAccumulator(result); |
1396 __ Dispatch(); | 1396 __ Dispatch(); |
1397 } | 1397 } |
1398 | 1398 |
1399 // ShiftRightSmi <imm> <reg> | 1399 // ShiftRightSmi <imm> <reg> |
1400 // | 1400 // |
1401 // Right shifts register <src> by the count specified in <imm>. | 1401 // Right shifts register <src> by the count specified in <imm>. |
1402 // Register <src> is converted to an int32 before the operation. The 5 | 1402 // Register <src> is converted to an int32 before the operation. The 5 |
1403 // lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). | 1403 // lsb bits from <imm> are used as count i.e. <src> << (<imm> & 0x1F). |
1404 void Interpreter::DoShiftRightSmi(InterpreterAssembler* assembler) { | 1404 void Interpreter::DoShiftRightSmi(InterpreterAssembler* assembler) { |
1405 Node* reg_index = __ BytecodeOperandReg(1); | 1405 Node* reg_index = __ BytecodeOperandReg(1); |
1406 Node* left = __ LoadRegister(reg_index); | 1406 Node* left = __ LoadRegister(reg_index); |
1407 Node* raw_int = __ BytecodeOperandImm(0); | 1407 Node* raw_int = __ BytecodeOperandImm(0); |
1408 Node* right = __ SmiTag(raw_int); | 1408 Node* right = __ SmiTag(raw_int); |
1409 Node* context = __ GetContext(); | 1409 Node* context = __ GetContext(); |
1410 Node* slot_index = __ BytecodeOperandIdx(2); | 1410 Node* slot_index = __ BytecodeOperandIdx(2); |
1411 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); | 1411 Node* type_feedback_vector = __ LoadTypeFeedbackVector(); |
1412 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); | 1412 Variable var_lhs_type_feedback(assembler, MachineRepresentation::kWord32); |
1413 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( | 1413 Node* lhs_value = __ TruncateTaggedToWord32WithFeedback( |
1414 context, left, &var_lhs_type_feedback); | 1414 context, left, &var_lhs_type_feedback); |
1415 Node* rhs_value = __ SmiToWord32(right); | 1415 Node* rhs_value = __ SmiToWord32(right); |
1416 Node* shift_count = __ Word32And(rhs_value, __ Int32Constant(0x1f)); | 1416 Node* shift_count = __ Word32And(rhs_value, __ Int32Constant(0x1f)); |
1417 Node* value = __ Word32Sar(lhs_value, shift_count); | 1417 Node* value = __ Word32Sar(lhs_value, shift_count); |
1418 Node* result = __ ChangeInt32ToTagged(value); | 1418 Node* result = __ ChangeInt32ToTagged(value); |
1419 Node* result_type = | 1419 Node* result_type = |
1420 __ Select(__ WordIsSmi(result), | 1420 __ Select(__ TaggedIsSmi(result), |
1421 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), | 1421 __ Int32Constant(BinaryOperationFeedback::kSignedSmall), |
1422 __ Int32Constant(BinaryOperationFeedback::kNumber)); | 1422 __ Int32Constant(BinaryOperationFeedback::kNumber)); |
1423 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), | 1423 __ UpdateFeedback(__ Word32Or(result_type, var_lhs_type_feedback.value()), |
1424 type_feedback_vector, slot_index); | 1424 type_feedback_vector, slot_index); |
1425 __ SetAccumulator(result); | 1425 __ SetAccumulator(result); |
1426 __ Dispatch(); | 1426 __ Dispatch(); |
1427 } | 1427 } |
1428 | 1428 |
1429 Node* Interpreter::BuildUnaryOp(Callable callable, | 1429 Node* Interpreter::BuildUnaryOp(Callable callable, |
1430 InterpreterAssembler* assembler) { | 1430 InterpreterAssembler* assembler) { |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2635 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, | 2635 __ StoreObjectField(generator, JSGeneratorObject::kContinuationOffset, |
2636 __ SmiTag(new_state)); | 2636 __ SmiTag(new_state)); |
2637 __ SetAccumulator(old_state); | 2637 __ SetAccumulator(old_state); |
2638 | 2638 |
2639 __ Dispatch(); | 2639 __ Dispatch(); |
2640 } | 2640 } |
2641 | 2641 |
2642 } // namespace interpreter | 2642 } // namespace interpreter |
2643 } // namespace internal | 2643 } // namespace internal |
2644 } // namespace v8 | 2644 } // namespace v8 |
OLD | NEW |