OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 } else { | 749 } else { |
750 // We save the untagged value on the side and store a GC-safe | 750 // We save the untagged value on the side and store a GC-safe |
751 // temporary placeholder in the frame. | 751 // temporary placeholder in the frame. |
752 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 752 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
753 static_cast<double>(static_cast<int32_t>(value))); | 753 static_cast<double>(static_cast<int32_t>(value))); |
754 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 754 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
755 } | 755 } |
756 return; | 756 return; |
757 } | 757 } |
758 | 758 |
| 759 case Translation::UINT32_REGISTER: { |
| 760 int input_reg = iterator->Next(); |
| 761 uintptr_t value = static_cast<uintptr_t>(input_->GetRegister(input_reg)); |
| 762 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); |
| 763 if (FLAG_trace_deopt) { |
| 764 PrintF( |
| 765 " 0x%08" V8PRIxPTR ": [top + %d] <- %" V8PRIuPTR |
| 766 " ; uint %s (%s)\n", |
| 767 output_[frame_index]->GetTop() + output_offset, |
| 768 output_offset, |
| 769 value, |
| 770 converter.NameOfCPURegister(input_reg), |
| 771 is_smi ? "smi" : "heap number"); |
| 772 } |
| 773 if (is_smi) { |
| 774 intptr_t tagged_value = |
| 775 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 776 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 777 } else { |
| 778 // We save the untagged value on the side and store a GC-safe |
| 779 // temporary placeholder in the frame. |
| 780 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 781 static_cast<double>(static_cast<uint32_t>(value))); |
| 782 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 783 } |
| 784 return; |
| 785 } |
| 786 |
759 case Translation::DOUBLE_REGISTER: { | 787 case Translation::DOUBLE_REGISTER: { |
760 int input_reg = iterator->Next(); | 788 int input_reg = iterator->Next(); |
761 double value = input_->GetDoubleRegister(input_reg); | 789 double value = input_->GetDoubleRegister(input_reg); |
762 if (FLAG_trace_deopt) { | 790 if (FLAG_trace_deopt) { |
763 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; %s\n", | 791 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; %s\n", |
764 output_[frame_index]->GetTop() + output_offset, | 792 output_[frame_index]->GetTop() + output_offset, |
765 output_offset, | 793 output_offset, |
766 value, | 794 value, |
767 DoubleRegister::AllocationIndexToString(input_reg)); | 795 DoubleRegister::AllocationIndexToString(input_reg)); |
768 } | 796 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 } else { | 842 } else { |
815 // We save the untagged value on the side and store a GC-safe | 843 // We save the untagged value on the side and store a GC-safe |
816 // temporary placeholder in the frame. | 844 // temporary placeholder in the frame. |
817 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, | 845 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
818 static_cast<double>(static_cast<int32_t>(value))); | 846 static_cast<double>(static_cast<int32_t>(value))); |
819 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); | 847 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
820 } | 848 } |
821 return; | 849 return; |
822 } | 850 } |
823 | 851 |
| 852 case Translation::UINT32_STACK_SLOT: { |
| 853 int input_slot_index = iterator->Next(); |
| 854 unsigned input_offset = |
| 855 input_->GetOffsetFromSlotIndex(input_slot_index); |
| 856 uintptr_t value = |
| 857 static_cast<uintptr_t>(input_->GetFrameSlot(input_offset)); |
| 858 bool is_smi = (value <= static_cast<uintptr_t>(Smi::kMaxValue)); |
| 859 if (FLAG_trace_deopt) { |
| 860 PrintF(" 0x%08" V8PRIxPTR ": ", |
| 861 output_[frame_index]->GetTop() + output_offset); |
| 862 PrintF("[top + %d] <- %" V8PRIuPTR " ; [sp + %d] (uint32 %s)\n", |
| 863 output_offset, |
| 864 value, |
| 865 input_offset, |
| 866 is_smi ? "smi" : "heap number"); |
| 867 } |
| 868 if (is_smi) { |
| 869 intptr_t tagged_value = |
| 870 reinterpret_cast<intptr_t>(Smi::FromInt(static_cast<int>(value))); |
| 871 output_[frame_index]->SetFrameSlot(output_offset, tagged_value); |
| 872 } else { |
| 873 // We save the untagged value on the side and store a GC-safe |
| 874 // temporary placeholder in the frame. |
| 875 AddDoubleValue(output_[frame_index]->GetTop() + output_offset, |
| 876 static_cast<double>(static_cast<uint32_t>(value))); |
| 877 output_[frame_index]->SetFrameSlot(output_offset, kPlaceholder); |
| 878 } |
| 879 return; |
| 880 } |
| 881 |
824 case Translation::DOUBLE_STACK_SLOT: { | 882 case Translation::DOUBLE_STACK_SLOT: { |
825 int input_slot_index = iterator->Next(); | 883 int input_slot_index = iterator->Next(); |
826 unsigned input_offset = | 884 unsigned input_offset = |
827 input_->GetOffsetFromSlotIndex(input_slot_index); | 885 input_->GetOffsetFromSlotIndex(input_slot_index); |
828 double value = input_->GetDoubleFrameSlot(input_offset); | 886 double value = input_->GetDoubleFrameSlot(input_offset); |
829 if (FLAG_trace_deopt) { | 887 if (FLAG_trace_deopt) { |
830 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; [sp + %d]\n", | 888 PrintF(" 0x%08" V8PRIxPTR ": [top + %d] <- %e ; [sp + %d]\n", |
831 output_[frame_index]->GetTop() + output_offset, | 889 output_[frame_index]->GetTop() + output_offset, |
832 output_offset, | 890 output_offset, |
833 value, | 891 value, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 } | 924 } |
867 intptr_t value = reinterpret_cast<intptr_t>( | 925 intptr_t value = reinterpret_cast<intptr_t>( |
868 isolate_->heap()->arguments_marker()); | 926 isolate_->heap()->arguments_marker()); |
869 output_[frame_index]->SetFrameSlot(output_offset, value); | 927 output_[frame_index]->SetFrameSlot(output_offset, value); |
870 return; | 928 return; |
871 } | 929 } |
872 } | 930 } |
873 } | 931 } |
874 | 932 |
875 | 933 |
| 934 static bool ObjectToInt32(Object* obj, int32_t* value) { |
| 935 if (obj->IsSmi()) { |
| 936 *value = Smi::cast(obj)->value(); |
| 937 return true; |
| 938 } |
| 939 |
| 940 if (obj->IsHeapNumber()) { |
| 941 double num = HeapNumber::cast(obj)->value(); |
| 942 if (FastD2I(FastI2D(num)) != num) { |
| 943 if (FLAG_trace_osr) { |
| 944 PrintF("**** %g could not be converted to int32 ****\n", |
| 945 HeapNumber::cast(obj)->value()); |
| 946 } |
| 947 return false; |
| 948 } |
| 949 |
| 950 *value = FastD2I(num); |
| 951 return true; |
| 952 } |
| 953 |
| 954 return false; |
| 955 } |
| 956 |
| 957 |
| 958 static bool ObjectToUint32(Object* obj, uint32_t* value) { |
| 959 if (obj->IsSmi()) { |
| 960 if (Smi::cast(obj)->value() < 0) return false; |
| 961 |
| 962 *value = static_cast<uint32_t>(Smi::cast(obj)->value()); |
| 963 return true; |
| 964 } |
| 965 |
| 966 if (obj->IsHeapNumber()) { |
| 967 double num = HeapNumber::cast(obj)->value(); |
| 968 if ((num < 0) || (FastD2UI(FastUI2D(num)) != num)) { |
| 969 if (FLAG_trace_osr) { |
| 970 PrintF("**** %g could not be converted to uint32 ****\n", |
| 971 HeapNumber::cast(obj)->value()); |
| 972 } |
| 973 return false; |
| 974 } |
| 975 |
| 976 *value = FastD2UI(num); |
| 977 return true; |
| 978 } |
| 979 |
| 980 return false; |
| 981 } |
| 982 |
| 983 |
876 bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator, | 984 bool Deoptimizer::DoOsrTranslateCommand(TranslationIterator* iterator, |
877 int* input_offset) { | 985 int* input_offset) { |
878 disasm::NameConverter converter; | 986 disasm::NameConverter converter; |
879 FrameDescription* output = output_[0]; | 987 FrameDescription* output = output_[0]; |
880 | 988 |
881 // The input values are all part of the unoptimized frame so they | 989 // The input values are all part of the unoptimized frame so they |
882 // are all tagged pointers. | 990 // are all tagged pointers. |
883 uintptr_t input_value = input_->GetFrameSlot(*input_offset); | 991 uintptr_t input_value = input_->GetFrameSlot(*input_offset); |
884 Object* input_object = reinterpret_cast<Object*>(input_value); | 992 Object* input_object = reinterpret_cast<Object*>(input_value); |
885 | 993 |
(...skipping 19 matching lines...) Expand all Loading... |
905 PrintF(" %s <- 0x%08" V8PRIxPTR " ; [sp + %d]\n", | 1013 PrintF(" %s <- 0x%08" V8PRIxPTR " ; [sp + %d]\n", |
906 converter.NameOfCPURegister(output_reg), | 1014 converter.NameOfCPURegister(output_reg), |
907 input_value, | 1015 input_value, |
908 *input_offset); | 1016 *input_offset); |
909 } | 1017 } |
910 output->SetRegister(output_reg, input_value); | 1018 output->SetRegister(output_reg, input_value); |
911 break; | 1019 break; |
912 } | 1020 } |
913 | 1021 |
914 case Translation::INT32_REGISTER: { | 1022 case Translation::INT32_REGISTER: { |
915 // Abort OSR if we don't have a number. | 1023 int32_t int32_value = 0; |
916 if (!input_object->IsNumber()) return false; | 1024 if (!ObjectToInt32(input_object, &int32_value)) return false; |
917 | 1025 |
918 int output_reg = iterator->Next(); | 1026 int output_reg = iterator->Next(); |
919 int int32_value = input_object->IsSmi() | |
920 ? Smi::cast(input_object)->value() | |
921 : FastD2I(input_object->Number()); | |
922 // Abort the translation if the conversion lost information. | |
923 if (!input_object->IsSmi() && | |
924 FastI2D(int32_value) != input_object->Number()) { | |
925 if (FLAG_trace_osr) { | |
926 PrintF("**** %g could not be converted to int32 ****\n", | |
927 input_object->Number()); | |
928 } | |
929 return false; | |
930 } | |
931 if (FLAG_trace_osr) { | 1027 if (FLAG_trace_osr) { |
932 PrintF(" %s <- %d (int32) ; [sp + %d]\n", | 1028 PrintF(" %s <- %d (int32) ; [sp + %d]\n", |
933 converter.NameOfCPURegister(output_reg), | 1029 converter.NameOfCPURegister(output_reg), |
934 int32_value, | 1030 int32_value, |
935 *input_offset); | 1031 *input_offset); |
936 } | 1032 } |
937 output->SetRegister(output_reg, int32_value); | 1033 output->SetRegister(output_reg, int32_value); |
938 break; | 1034 break; |
939 } | 1035 } |
940 | 1036 |
| 1037 case Translation::UINT32_REGISTER: { |
| 1038 uint32_t uint32_value = 0; |
| 1039 if (!ObjectToUint32(input_object, &uint32_value)) return false; |
| 1040 |
| 1041 int output_reg = iterator->Next(); |
| 1042 if (FLAG_trace_osr) { |
| 1043 PrintF(" %s <- %u (uint32) ; [sp + %d]\n", |
| 1044 converter.NameOfCPURegister(output_reg), |
| 1045 uint32_value, |
| 1046 *input_offset); |
| 1047 } |
| 1048 output->SetRegister(output_reg, static_cast<int32_t>(uint32_value)); |
| 1049 } |
| 1050 |
| 1051 |
941 case Translation::DOUBLE_REGISTER: { | 1052 case Translation::DOUBLE_REGISTER: { |
942 // Abort OSR if we don't have a number. | 1053 // Abort OSR if we don't have a number. |
943 if (!input_object->IsNumber()) return false; | 1054 if (!input_object->IsNumber()) return false; |
944 | 1055 |
945 int output_reg = iterator->Next(); | 1056 int output_reg = iterator->Next(); |
946 double double_value = input_object->Number(); | 1057 double double_value = input_object->Number(); |
947 if (FLAG_trace_osr) { | 1058 if (FLAG_trace_osr) { |
948 PrintF(" %s <- %g (double) ; [sp + %d]\n", | 1059 PrintF(" %s <- %g (double) ; [sp + %d]\n", |
949 DoubleRegister::AllocationIndexToString(output_reg), | 1060 DoubleRegister::AllocationIndexToString(output_reg), |
950 double_value, | 1061 double_value, |
(...skipping 13 matching lines...) Expand all Loading... |
964 input_value, | 1075 input_value, |
965 *input_offset); | 1076 *input_offset); |
966 reinterpret_cast<Object*>(input_value)->ShortPrint(); | 1077 reinterpret_cast<Object*>(input_value)->ShortPrint(); |
967 PrintF("\n"); | 1078 PrintF("\n"); |
968 } | 1079 } |
969 output->SetFrameSlot(output_offset, input_value); | 1080 output->SetFrameSlot(output_offset, input_value); |
970 break; | 1081 break; |
971 } | 1082 } |
972 | 1083 |
973 case Translation::INT32_STACK_SLOT: { | 1084 case Translation::INT32_STACK_SLOT: { |
974 // Abort OSR if we don't have a number. | 1085 int32_t int32_value = 0; |
975 if (!input_object->IsNumber()) return false; | 1086 if (!ObjectToInt32(input_object, &int32_value)) return false; |
976 | 1087 |
977 int output_index = iterator->Next(); | 1088 int output_index = iterator->Next(); |
978 unsigned output_offset = | 1089 unsigned output_offset = |
979 output->GetOffsetFromSlotIndex(output_index); | 1090 output->GetOffsetFromSlotIndex(output_index); |
980 int int32_value = input_object->IsSmi() | |
981 ? Smi::cast(input_object)->value() | |
982 : DoubleToInt32(input_object->Number()); | |
983 // Abort the translation if the conversion lost information. | |
984 if (!input_object->IsSmi() && | |
985 FastI2D(int32_value) != input_object->Number()) { | |
986 if (FLAG_trace_osr) { | |
987 PrintF("**** %g could not be converted to int32 ****\n", | |
988 input_object->Number()); | |
989 } | |
990 return false; | |
991 } | |
992 if (FLAG_trace_osr) { | 1091 if (FLAG_trace_osr) { |
993 PrintF(" [sp + %d] <- %d (int32) ; [sp + %d]\n", | 1092 PrintF(" [sp + %d] <- %d (int32) ; [sp + %d]\n", |
994 output_offset, | 1093 output_offset, |
995 int32_value, | 1094 int32_value, |
996 *input_offset); | 1095 *input_offset); |
997 } | 1096 } |
998 output->SetFrameSlot(output_offset, int32_value); | 1097 output->SetFrameSlot(output_offset, int32_value); |
999 break; | 1098 break; |
1000 } | 1099 } |
1001 | 1100 |
| 1101 case Translation::UINT32_STACK_SLOT: { |
| 1102 uint32_t uint32_value = 0; |
| 1103 if (!ObjectToUint32(input_object, &uint32_value)) return false; |
| 1104 |
| 1105 int output_index = iterator->Next(); |
| 1106 unsigned output_offset = |
| 1107 output->GetOffsetFromSlotIndex(output_index); |
| 1108 if (FLAG_trace_osr) { |
| 1109 PrintF(" [sp + %d] <- %u (uint32) ; [sp + %d]\n", |
| 1110 output_offset, |
| 1111 uint32_value, |
| 1112 *input_offset); |
| 1113 } |
| 1114 output->SetFrameSlot(output_offset, static_cast<int32_t>(uint32_value)); |
| 1115 break; |
| 1116 } |
| 1117 |
1002 case Translation::DOUBLE_STACK_SLOT: { | 1118 case Translation::DOUBLE_STACK_SLOT: { |
1003 static const int kLowerOffset = 0 * kPointerSize; | 1119 static const int kLowerOffset = 0 * kPointerSize; |
1004 static const int kUpperOffset = 1 * kPointerSize; | 1120 static const int kUpperOffset = 1 * kPointerSize; |
1005 | 1121 |
1006 // Abort OSR if we don't have a number. | 1122 // Abort OSR if we don't have a number. |
1007 if (!input_object->IsNumber()) return false; | 1123 if (!input_object->IsNumber()) return false; |
1008 | 1124 |
1009 int output_index = iterator->Next(); | 1125 int output_index = iterator->Next(); |
1010 unsigned output_offset = | 1126 unsigned output_offset = |
1011 output->GetOffsetFromSlotIndex(output_index); | 1127 output->GetOffsetFromSlotIndex(output_index); |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 buffer_->Add(reg.code(), zone()); | 1488 buffer_->Add(reg.code(), zone()); |
1373 } | 1489 } |
1374 | 1490 |
1375 | 1491 |
1376 void Translation::StoreInt32Register(Register reg) { | 1492 void Translation::StoreInt32Register(Register reg) { |
1377 buffer_->Add(INT32_REGISTER, zone()); | 1493 buffer_->Add(INT32_REGISTER, zone()); |
1378 buffer_->Add(reg.code(), zone()); | 1494 buffer_->Add(reg.code(), zone()); |
1379 } | 1495 } |
1380 | 1496 |
1381 | 1497 |
| 1498 void Translation::StoreUint32Register(Register reg) { |
| 1499 buffer_->Add(UINT32_REGISTER, zone()); |
| 1500 buffer_->Add(reg.code(), zone()); |
| 1501 } |
| 1502 |
| 1503 |
1382 void Translation::StoreDoubleRegister(DoubleRegister reg) { | 1504 void Translation::StoreDoubleRegister(DoubleRegister reg) { |
1383 buffer_->Add(DOUBLE_REGISTER, zone()); | 1505 buffer_->Add(DOUBLE_REGISTER, zone()); |
1384 buffer_->Add(DoubleRegister::ToAllocationIndex(reg), zone()); | 1506 buffer_->Add(DoubleRegister::ToAllocationIndex(reg), zone()); |
1385 } | 1507 } |
1386 | 1508 |
1387 | 1509 |
1388 void Translation::StoreStackSlot(int index) { | 1510 void Translation::StoreStackSlot(int index) { |
1389 buffer_->Add(STACK_SLOT, zone()); | 1511 buffer_->Add(STACK_SLOT, zone()); |
1390 buffer_->Add(index, zone()); | 1512 buffer_->Add(index, zone()); |
1391 } | 1513 } |
1392 | 1514 |
1393 | 1515 |
1394 void Translation::StoreInt32StackSlot(int index) { | 1516 void Translation::StoreInt32StackSlot(int index) { |
1395 buffer_->Add(INT32_STACK_SLOT, zone()); | 1517 buffer_->Add(INT32_STACK_SLOT, zone()); |
1396 buffer_->Add(index, zone()); | 1518 buffer_->Add(index, zone()); |
1397 } | 1519 } |
1398 | 1520 |
1399 | 1521 |
| 1522 void Translation::StoreUint32StackSlot(int index) { |
| 1523 buffer_->Add(UINT32_STACK_SLOT, zone()); |
| 1524 buffer_->Add(index, zone()); |
| 1525 } |
| 1526 |
| 1527 |
1400 void Translation::StoreDoubleStackSlot(int index) { | 1528 void Translation::StoreDoubleStackSlot(int index) { |
1401 buffer_->Add(DOUBLE_STACK_SLOT, zone()); | 1529 buffer_->Add(DOUBLE_STACK_SLOT, zone()); |
1402 buffer_->Add(index, zone()); | 1530 buffer_->Add(index, zone()); |
1403 } | 1531 } |
1404 | 1532 |
1405 | 1533 |
1406 void Translation::StoreLiteral(int literal_id) { | 1534 void Translation::StoreLiteral(int literal_id) { |
1407 buffer_->Add(LITERAL, zone()); | 1535 buffer_->Add(LITERAL, zone()); |
1408 buffer_->Add(literal_id, zone()); | 1536 buffer_->Add(literal_id, zone()); |
1409 } | 1537 } |
1410 | 1538 |
1411 | 1539 |
1412 void Translation::StoreArgumentsObject() { | 1540 void Translation::StoreArgumentsObject() { |
1413 buffer_->Add(ARGUMENTS_OBJECT, zone()); | 1541 buffer_->Add(ARGUMENTS_OBJECT, zone()); |
1414 } | 1542 } |
1415 | 1543 |
1416 | 1544 |
1417 void Translation::MarkDuplicate() { | 1545 void Translation::MarkDuplicate() { |
1418 buffer_->Add(DUPLICATE, zone()); | 1546 buffer_->Add(DUPLICATE, zone()); |
1419 } | 1547 } |
1420 | 1548 |
1421 | 1549 |
1422 int Translation::NumberOfOperandsFor(Opcode opcode) { | 1550 int Translation::NumberOfOperandsFor(Opcode opcode) { |
1423 switch (opcode) { | 1551 switch (opcode) { |
1424 case ARGUMENTS_OBJECT: | 1552 case ARGUMENTS_OBJECT: |
1425 case DUPLICATE: | 1553 case DUPLICATE: |
1426 return 0; | 1554 return 0; |
1427 case REGISTER: | 1555 case REGISTER: |
1428 case INT32_REGISTER: | 1556 case INT32_REGISTER: |
| 1557 case UINT32_REGISTER: |
1429 case DOUBLE_REGISTER: | 1558 case DOUBLE_REGISTER: |
1430 case STACK_SLOT: | 1559 case STACK_SLOT: |
1431 case INT32_STACK_SLOT: | 1560 case INT32_STACK_SLOT: |
| 1561 case UINT32_STACK_SLOT: |
1432 case DOUBLE_STACK_SLOT: | 1562 case DOUBLE_STACK_SLOT: |
1433 case LITERAL: | 1563 case LITERAL: |
1434 return 1; | 1564 return 1; |
1435 case BEGIN: | 1565 case BEGIN: |
1436 case ARGUMENTS_ADAPTOR_FRAME: | 1566 case ARGUMENTS_ADAPTOR_FRAME: |
1437 case CONSTRUCT_STUB_FRAME: | 1567 case CONSTRUCT_STUB_FRAME: |
1438 return 2; | 1568 return 2; |
1439 case JS_FRAME: | 1569 case JS_FRAME: |
1440 return 3; | 1570 return 3; |
1441 } | 1571 } |
(...skipping 11 matching lines...) Expand all Loading... |
1453 case JS_FRAME: | 1583 case JS_FRAME: |
1454 return "JS_FRAME"; | 1584 return "JS_FRAME"; |
1455 case ARGUMENTS_ADAPTOR_FRAME: | 1585 case ARGUMENTS_ADAPTOR_FRAME: |
1456 return "ARGUMENTS_ADAPTOR_FRAME"; | 1586 return "ARGUMENTS_ADAPTOR_FRAME"; |
1457 case CONSTRUCT_STUB_FRAME: | 1587 case CONSTRUCT_STUB_FRAME: |
1458 return "CONSTRUCT_STUB_FRAME"; | 1588 return "CONSTRUCT_STUB_FRAME"; |
1459 case REGISTER: | 1589 case REGISTER: |
1460 return "REGISTER"; | 1590 return "REGISTER"; |
1461 case INT32_REGISTER: | 1591 case INT32_REGISTER: |
1462 return "INT32_REGISTER"; | 1592 return "INT32_REGISTER"; |
| 1593 case UINT32_REGISTER: |
| 1594 return "UINT32_REGISTER"; |
1463 case DOUBLE_REGISTER: | 1595 case DOUBLE_REGISTER: |
1464 return "DOUBLE_REGISTER"; | 1596 return "DOUBLE_REGISTER"; |
1465 case STACK_SLOT: | 1597 case STACK_SLOT: |
1466 return "STACK_SLOT"; | 1598 return "STACK_SLOT"; |
1467 case INT32_STACK_SLOT: | 1599 case INT32_STACK_SLOT: |
1468 return "INT32_STACK_SLOT"; | 1600 return "INT32_STACK_SLOT"; |
| 1601 case UINT32_STACK_SLOT: |
| 1602 return "UINT32_STACK_SLOT"; |
1469 case DOUBLE_STACK_SLOT: | 1603 case DOUBLE_STACK_SLOT: |
1470 return "DOUBLE_STACK_SLOT"; | 1604 return "DOUBLE_STACK_SLOT"; |
1471 case LITERAL: | 1605 case LITERAL: |
1472 return "LITERAL"; | 1606 return "LITERAL"; |
1473 case ARGUMENTS_OBJECT: | 1607 case ARGUMENTS_OBJECT: |
1474 return "ARGUMENTS_OBJECT"; | 1608 return "ARGUMENTS_OBJECT"; |
1475 case DUPLICATE: | 1609 case DUPLICATE: |
1476 return "DUPLICATE"; | 1610 return "DUPLICATE"; |
1477 } | 1611 } |
1478 UNREACHABLE(); | 1612 UNREACHABLE(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 case Translation::CONSTRUCT_STUB_FRAME: | 1648 case Translation::CONSTRUCT_STUB_FRAME: |
1515 // Peeled off before getting here. | 1649 // Peeled off before getting here. |
1516 break; | 1650 break; |
1517 | 1651 |
1518 case Translation::ARGUMENTS_OBJECT: | 1652 case Translation::ARGUMENTS_OBJECT: |
1519 // This can be only emitted for local slots not for argument slots. | 1653 // This can be only emitted for local slots not for argument slots. |
1520 break; | 1654 break; |
1521 | 1655 |
1522 case Translation::REGISTER: | 1656 case Translation::REGISTER: |
1523 case Translation::INT32_REGISTER: | 1657 case Translation::INT32_REGISTER: |
| 1658 case Translation::UINT32_REGISTER: |
1524 case Translation::DOUBLE_REGISTER: | 1659 case Translation::DOUBLE_REGISTER: |
1525 case Translation::DUPLICATE: | 1660 case Translation::DUPLICATE: |
1526 // We are at safepoint which corresponds to call. All registers are | 1661 // We are at safepoint which corresponds to call. All registers are |
1527 // saved by caller so there would be no live registers at this | 1662 // saved by caller so there would be no live registers at this |
1528 // point. Thus these translation commands should not be used. | 1663 // point. Thus these translation commands should not be used. |
1529 break; | 1664 break; |
1530 | 1665 |
1531 case Translation::STACK_SLOT: { | 1666 case Translation::STACK_SLOT: { |
1532 int slot_index = iterator->Next(); | 1667 int slot_index = iterator->Next(); |
1533 Address slot_addr = SlotAddress(frame, slot_index); | 1668 Address slot_addr = SlotAddress(frame, slot_index); |
1534 return SlotRef(slot_addr, SlotRef::TAGGED); | 1669 return SlotRef(slot_addr, SlotRef::TAGGED); |
1535 } | 1670 } |
1536 | 1671 |
1537 case Translation::INT32_STACK_SLOT: { | 1672 case Translation::INT32_STACK_SLOT: { |
1538 int slot_index = iterator->Next(); | 1673 int slot_index = iterator->Next(); |
1539 Address slot_addr = SlotAddress(frame, slot_index); | 1674 Address slot_addr = SlotAddress(frame, slot_index); |
1540 return SlotRef(slot_addr, SlotRef::INT32); | 1675 return SlotRef(slot_addr, SlotRef::INT32); |
1541 } | 1676 } |
1542 | 1677 |
| 1678 case Translation::UINT32_STACK_SLOT: { |
| 1679 int slot_index = iterator->Next(); |
| 1680 Address slot_addr = SlotAddress(frame, slot_index); |
| 1681 return SlotRef(slot_addr, SlotRef::UINT32); |
| 1682 } |
| 1683 |
1543 case Translation::DOUBLE_STACK_SLOT: { | 1684 case Translation::DOUBLE_STACK_SLOT: { |
1544 int slot_index = iterator->Next(); | 1685 int slot_index = iterator->Next(); |
1545 Address slot_addr = SlotAddress(frame, slot_index); | 1686 Address slot_addr = SlotAddress(frame, slot_index); |
1546 return SlotRef(slot_addr, SlotRef::DOUBLE); | 1687 return SlotRef(slot_addr, SlotRef::DOUBLE); |
1547 } | 1688 } |
1548 | 1689 |
1549 case Translation::LITERAL: { | 1690 case Translation::LITERAL: { |
1550 int literal_index = iterator->Next(); | 1691 int literal_index = iterator->Next(); |
1551 return SlotRef(data->LiteralArray()->get(literal_index)); | 1692 return SlotRef(data->LiteralArray()->get(literal_index)); |
1552 } | 1693 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 | 1814 |
1674 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 1815 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
1675 v->VisitPointer(BitCast<Object**>(&function_)); | 1816 v->VisitPointer(BitCast<Object**>(&function_)); |
1676 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 1817 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
1677 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 1818 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
1678 } | 1819 } |
1679 | 1820 |
1680 #endif // ENABLE_DEBUGGER_SUPPORT | 1821 #endif // ENABLE_DEBUGGER_SUPPORT |
1681 | 1822 |
1682 } } // namespace v8::internal | 1823 } } // namespace v8::internal |
OLD | NEW |