Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: src/assembler.cc

Issue 1484893003: [debugger] simplify reloc info for debug break slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/assembler.h ('k') | src/debug/arm/debug-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 next_position_candidate_pos_delta_ += pos_delta; 501 next_position_candidate_pos_delta_ += pos_delta;
502 } 502 }
503 next_position_candidate_flushed_ = false; 503 next_position_candidate_flushed_ = false;
504 } 504 }
505 last_position_ = static_cast<int>(rinfo->data()); 505 last_position_ = static_cast<int>(rinfo->data());
506 } else { 506 } else {
507 WriteModeAndPC(pc_delta, rmode); 507 WriteModeAndPC(pc_delta, rmode);
508 if (RelocInfo::IsComment(rmode)) { 508 if (RelocInfo::IsComment(rmode)) {
509 WriteData(rinfo->data()); 509 WriteData(rinfo->data());
510 } else if (RelocInfo::IsConstPool(rmode) || 510 } else if (RelocInfo::IsConstPool(rmode) ||
511 RelocInfo::IsVeneerPool(rmode) || 511 RelocInfo::IsVeneerPool(rmode)) {
512 RelocInfo::IsDebugBreakSlotAtCall(rmode) ||
513 RelocInfo::IsDebugBreakSlotAtConstructCall(rmode)) {
514 WriteIntData(static_cast<int>(rinfo->data())); 512 WriteIntData(static_cast<int>(rinfo->data()));
515 } 513 }
516 } 514 }
517 last_pc_ = rinfo->pc(); 515 last_pc_ = rinfo->pc();
518 last_mode_ = rmode; 516 last_mode_ = rmode;
519 #ifdef DEBUG 517 #ifdef DEBUG
520 DCHECK(begin_pos - pos_ <= kMaxSize); 518 DCHECK(begin_pos - pos_ <= kMaxSize);
521 #endif 519 #endif
522 } 520 }
523 521
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 } else if (RelocInfo::IsPosition(rmode)) { 692 } else if (RelocInfo::IsPosition(rmode)) {
695 if (mode_mask_ & RelocInfo::kPositionMask) { 693 if (mode_mask_ & RelocInfo::kPositionMask) {
696 // Always update the position if we are interested in either 694 // Always update the position if we are interested in either
697 // statement positions or non-statement positions. 695 // statement positions or non-statement positions.
698 AdvanceReadPosition(); 696 AdvanceReadPosition();
699 if (SetMode(rmode)) return; 697 if (SetMode(rmode)) return;
700 } else { 698 } else {
701 Advance(kIntSize); 699 Advance(kIntSize);
702 } 700 }
703 } else if (RelocInfo::IsConstPool(rmode) || 701 } else if (RelocInfo::IsConstPool(rmode) ||
704 RelocInfo::IsVeneerPool(rmode) || 702 RelocInfo::IsVeneerPool(rmode)) {
705 RelocInfo::IsDebugBreakSlotAtCall(rmode) ||
706 RelocInfo::IsDebugBreakSlotAtConstructCall(rmode)) {
707 if (SetMode(rmode)) { 703 if (SetMode(rmode)) {
708 AdvanceReadInt(); 704 AdvanceReadInt();
709 return; 705 return;
710 } 706 }
711 Advance(kIntSize); 707 Advance(kIntSize);
712 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) { 708 } else if (SetMode(static_cast<RelocInfo::Mode>(rmode))) {
713 return; 709 return;
714 } 710 }
715 } 711 }
716 } 712 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 case CONST_POOL: 822 case CONST_POOL:
827 return "constant pool"; 823 return "constant pool";
828 case VENEER_POOL: 824 case VENEER_POOL:
829 return "veneer pool"; 825 return "veneer pool";
830 case DEBUG_BREAK_SLOT_AT_POSITION: 826 case DEBUG_BREAK_SLOT_AT_POSITION:
831 return "debug break slot at position"; 827 return "debug break slot at position";
832 case DEBUG_BREAK_SLOT_AT_RETURN: 828 case DEBUG_BREAK_SLOT_AT_RETURN:
833 return "debug break slot at return"; 829 return "debug break slot at return";
834 case DEBUG_BREAK_SLOT_AT_CALL: 830 case DEBUG_BREAK_SLOT_AT_CALL:
835 return "debug break slot at call"; 831 return "debug break slot at call";
836 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL:
837 return "debug break slot at construct call";
838 case CODE_AGE_SEQUENCE: 832 case CODE_AGE_SEQUENCE:
839 return "code age sequence"; 833 return "code age sequence";
840 case GENERATOR_CONTINUATION: 834 case GENERATOR_CONTINUATION:
841 return "generator continuation"; 835 return "generator continuation";
842 case NUMBER_OF_MODES: 836 case NUMBER_OF_MODES:
843 case PC_JUMP: 837 case PC_JUMP:
844 UNREACHABLE(); 838 UNREACHABLE();
845 return "number_of_modes"; 839 return "number_of_modes";
846 } 840 }
847 return "unknown relocation type"; 841 return "unknown relocation type";
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 case COMMENT: 918 case COMMENT:
925 case POSITION: 919 case POSITION:
926 case STATEMENT_POSITION: 920 case STATEMENT_POSITION:
927 case EXTERNAL_REFERENCE: 921 case EXTERNAL_REFERENCE:
928 case DEOPT_REASON: 922 case DEOPT_REASON:
929 case CONST_POOL: 923 case CONST_POOL:
930 case VENEER_POOL: 924 case VENEER_POOL:
931 case DEBUG_BREAK_SLOT_AT_POSITION: 925 case DEBUG_BREAK_SLOT_AT_POSITION:
932 case DEBUG_BREAK_SLOT_AT_RETURN: 926 case DEBUG_BREAK_SLOT_AT_RETURN:
933 case DEBUG_BREAK_SLOT_AT_CALL: 927 case DEBUG_BREAK_SLOT_AT_CALL:
934 case DEBUG_BREAK_SLOT_AT_CONSTRUCT_CALL:
935 case GENERATOR_CONTINUATION: 928 case GENERATOR_CONTINUATION:
936 case NONE32: 929 case NONE32:
937 case NONE64: 930 case NONE64:
938 break; 931 break;
939 case NUMBER_OF_MODES: 932 case NUMBER_OF_MODES:
940 case PC_JUMP: 933 case PC_JUMP:
941 UNREACHABLE(); 934 UNREACHABLE();
942 break; 935 break;
943 case CODE_AGE_SEQUENCE: 936 case CODE_AGE_SEQUENCE:
944 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode()); 937 DCHECK(Code::IsYoungSequence(isolate, pc_) || code_age_stub()->IsCode());
945 break; 938 break;
946 } 939 }
947 } 940 }
948 #endif // VERIFY_HEAP 941 #endif // VERIFY_HEAP
949 942
950 943
951 int RelocInfo::DebugBreakCallArgumentsCount(intptr_t data) {
952 return static_cast<int>(data);
953 }
954
955
956 // -----------------------------------------------------------------------------
957 // Implementation of ExternalReference 944 // Implementation of ExternalReference
958 945
959 void ExternalReference::SetUp() { 946 void ExternalReference::SetUp() {
960 double_constants.min_int = kMinInt; 947 double_constants.min_int = kMinInt;
961 double_constants.one_half = 0.5; 948 double_constants.one_half = 0.5;
962 double_constants.minus_one_half = -0.5; 949 double_constants.minus_one_half = -0.5;
963 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64); 950 double_constants.the_hole_nan = bit_cast<double>(kHoleNanInt64);
964 double_constants.negative_infinity = -V8_INFINITY; 951 double_constants.negative_infinity = -V8_INFINITY;
965 double_constants.uint32_bias = 952 double_constants.uint32_bias =
966 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1; 953 static_cast<double>(static_cast<uint32_t>(0xFFFFFFFF)) + 1;
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1876 } 1863 }
1877 } 1864 }
1878 1865
1879 1866
1880 void Assembler::RecordGeneratorContinuation() { 1867 void Assembler::RecordGeneratorContinuation() {
1881 EnsureSpace ensure_space(this); 1868 EnsureSpace ensure_space(this);
1882 RecordRelocInfo(RelocInfo::GENERATOR_CONTINUATION); 1869 RecordRelocInfo(RelocInfo::GENERATOR_CONTINUATION);
1883 } 1870 }
1884 1871
1885 1872
1886 void Assembler::RecordDebugBreakSlot(RelocInfo::Mode mode, int call_argc) { 1873 void Assembler::RecordDebugBreakSlot(RelocInfo::Mode mode) {
1887 EnsureSpace ensure_space(this); 1874 EnsureSpace ensure_space(this);
1888 DCHECK(RelocInfo::IsDebugBreakSlot(mode)); 1875 DCHECK(RelocInfo::IsDebugBreakSlot(mode));
1889 intptr_t data = static_cast<intptr_t>(call_argc); 1876 RecordRelocInfo(mode);
1890 RecordRelocInfo(mode, data);
1891 } 1877 }
1892 1878
1893 1879
1894 void Assembler::DataAlign(int m) { 1880 void Assembler::DataAlign(int m) {
1895 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); 1881 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m));
1896 while ((pc_offset() & (m - 1)) != 0) { 1882 while ((pc_offset() & (m - 1)) != 0) {
1897 db(0); 1883 db(0);
1898 } 1884 }
1899 } 1885 }
1900 } // namespace internal 1886 } // namespace internal
1901 } // namespace v8 1887 } // namespace v8
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/debug/arm/debug-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698