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 | 5 // modification, are permitted provided that the following conditions |
6 // are met: | 6 // are 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 1972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 void Assembler::WriteRecordedPositions() { | 1983 void Assembler::WriteRecordedPositions() { |
1984 // Write the statement position if it is different from what was written last | 1984 // Write the statement position if it is different from what was written last |
1985 // time. | 1985 // time. |
1986 if (current_statement_position_ != written_statement_position_) { | 1986 if (current_statement_position_ != written_statement_position_) { |
1987 EnsureSpace ensure_space(this); | 1987 EnsureSpace ensure_space(this); |
1988 RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_); | 1988 RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_); |
1989 written_statement_position_ = current_statement_position_; | 1989 written_statement_position_ = current_statement_position_; |
1990 } | 1990 } |
1991 | 1991 |
1992 // Write the position if it is different from what was written last time and | 1992 // Write the position if it is different from what was written last time and |
1993 // also diferent from the written statement position. | 1993 // also different from the written statement position. |
1994 if (current_position_ != written_position_ && | 1994 if (current_position_ != written_position_ && |
1995 current_position_ != written_statement_position_) { | 1995 current_position_ != written_statement_position_) { |
1996 EnsureSpace ensure_space(this); | 1996 EnsureSpace ensure_space(this); |
1997 RecordRelocInfo(RelocInfo::POSITION, current_position_); | 1997 RecordRelocInfo(RelocInfo::POSITION, current_position_); |
1998 written_position_ = current_position_; | 1998 written_position_ = current_position_; |
1999 } | 1999 } |
2000 } | 2000 } |
2001 | 2001 |
2002 | 2002 |
2003 void Assembler::GrowBuffer() { | 2003 void Assembler::GrowBuffer() { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2140 ASSERT(bound_label.is_bound()); | 2140 ASSERT(bound_label.is_bound()); |
2141 ASSERT(0 <= position); | 2141 ASSERT(0 <= position); |
2142 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); | 2142 ASSERT(position + static_cast<int>(sizeof(uint32_t)) <= pc_offset()); |
2143 ASSERT(long_at(position) == 0); // only initialize once! | 2143 ASSERT(long_at(position) == 0); // only initialize once! |
2144 | 2144 |
2145 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); | 2145 uint32_t label_loc = reinterpret_cast<uint32_t>(addr_at(bound_label.pos())); |
2146 long_at_put(position, label_loc); | 2146 long_at_put(position, label_loc); |
2147 } | 2147 } |
2148 | 2148 |
2149 } } // namespace v8::internal | 2149 } } // namespace v8::internal |
OLD | NEW |