| OLD | NEW |
| 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 911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 922 ExternalReference ExternalReference::debug_step_in_fp_address() { | 922 ExternalReference ExternalReference::debug_step_in_fp_address() { |
| 923 return ExternalReference(Isolate::Current()->debug()->step_in_fp_addr()); | 923 return ExternalReference(Isolate::Current()->debug()->step_in_fp_addr()); |
| 924 } | 924 } |
| 925 #endif | 925 #endif |
| 926 | 926 |
| 927 | 927 |
| 928 void PositionsRecorder::RecordPosition(int pos) { | 928 void PositionsRecorder::RecordPosition(int pos) { |
| 929 ASSERT(pos != RelocInfo::kNoPosition); | 929 ASSERT(pos != RelocInfo::kNoPosition); |
| 930 ASSERT(pos >= 0); | 930 ASSERT(pos >= 0); |
| 931 state_.current_position = pos; | 931 state_.current_position = pos; |
| 932 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 933 if (gdbjit_lineinfo_ != NULL) { |
| 934 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); |
| 935 } |
| 936 #endif |
| 932 } | 937 } |
| 933 | 938 |
| 934 | 939 |
| 935 void PositionsRecorder::RecordStatementPosition(int pos) { | 940 void PositionsRecorder::RecordStatementPosition(int pos) { |
| 936 ASSERT(pos != RelocInfo::kNoPosition); | 941 ASSERT(pos != RelocInfo::kNoPosition); |
| 937 ASSERT(pos >= 0); | 942 ASSERT(pos >= 0); |
| 938 state_.current_statement_position = pos; | 943 state_.current_statement_position = pos; |
| 944 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 945 if (gdbjit_lineinfo_ != NULL) { |
| 946 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); |
| 947 } |
| 948 #endif |
| 939 } | 949 } |
| 940 | 950 |
| 941 | 951 |
| 942 bool PositionsRecorder::WriteRecordedPositions() { | 952 bool PositionsRecorder::WriteRecordedPositions() { |
| 943 bool written = false; | 953 bool written = false; |
| 944 | 954 |
| 945 // Write the statement position if it is different from what was written last | 955 // Write the statement position if it is different from what was written last |
| 946 // time. | 956 // time. |
| 947 if (state_.current_statement_position != state_.written_statement_position) { | 957 if (state_.current_statement_position != state_.written_statement_position) { |
| 948 EnsureSpace ensure_space(assembler_); | 958 EnsureSpace ensure_space(assembler_); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 960 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 970 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 961 state_.written_position = state_.current_position; | 971 state_.written_position = state_.current_position; |
| 962 written = true; | 972 written = true; |
| 963 } | 973 } |
| 964 | 974 |
| 965 // Return whether something was written. | 975 // Return whether something was written. |
| 966 return written; | 976 return written; |
| 967 } | 977 } |
| 968 | 978 |
| 969 } } // namespace v8::internal | 979 } } // namespace v8::internal |
| OLD | NEW |