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 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1641 } | 1641 } |
1642 | 1642 |
1643 | 1643 |
1644 std::ostream& operator<<(std::ostream& os, ExternalReference reference) { | 1644 std::ostream& operator<<(std::ostream& os, ExternalReference reference) { |
1645 os << static_cast<const void*>(reference.address()); | 1645 os << static_cast<const void*>(reference.address()); |
1646 const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address()); | 1646 const Runtime::Function* fn = Runtime::FunctionForEntry(reference.address()); |
1647 if (fn) os << "<" << fn->name << ".entry>"; | 1647 if (fn) os << "<" << fn->name << ".entry>"; |
1648 return os; | 1648 return os; |
1649 } | 1649 } |
1650 | 1650 |
1651 | 1651 void AssemblerPositionsRecorder::RecordPosition(int pos) { |
1652 void PositionsRecorder::RecordPosition(int pos) { | |
1653 DCHECK(pos != RelocInfo::kNoPosition); | 1652 DCHECK(pos != RelocInfo::kNoPosition); |
1654 DCHECK(pos >= 0); | 1653 DCHECK(pos >= 0); |
1655 state_.current_position = pos; | 1654 state_.current_position = pos; |
1656 LOG_CODE_EVENT(assembler_->isolate(), | 1655 LOG_CODE_EVENT(assembler_->isolate(), |
1657 CodeLinePosInfoAddPositionEvent(jit_handler_data_, | 1656 CodeLinePosInfoAddPositionEvent(jit_handler_data_, |
1658 assembler_->pc_offset(), | 1657 assembler_->pc_offset(), |
1659 pos)); | 1658 pos)); |
1660 } | 1659 } |
1661 | 1660 |
1662 | 1661 void AssemblerPositionsRecorder::RecordStatementPosition(int pos) { |
1663 void PositionsRecorder::RecordStatementPosition(int pos) { | |
1664 DCHECK(pos != RelocInfo::kNoPosition); | 1662 DCHECK(pos != RelocInfo::kNoPosition); |
1665 DCHECK(pos >= 0); | 1663 DCHECK(pos >= 0); |
1666 state_.current_statement_position = pos; | 1664 state_.current_statement_position = pos; |
1667 LOG_CODE_EVENT(assembler_->isolate(), | 1665 LOG_CODE_EVENT(assembler_->isolate(), |
1668 CodeLinePosInfoAddStatementPositionEvent( | 1666 CodeLinePosInfoAddStatementPositionEvent( |
1669 jit_handler_data_, | 1667 jit_handler_data_, |
1670 assembler_->pc_offset(), | 1668 assembler_->pc_offset(), |
1671 pos)); | 1669 pos)); |
1672 } | 1670 } |
1673 | 1671 |
1674 | 1672 bool AssemblerPositionsRecorder::WriteRecordedPositions() { |
1675 bool PositionsRecorder::WriteRecordedPositions() { | |
1676 bool written = false; | 1673 bool written = false; |
1677 | 1674 |
1678 // Write the statement position if it is different from what was written last | 1675 // Write the statement position if it is different from what was written last |
1679 // time. | 1676 // time. |
1680 if (state_.current_statement_position != state_.written_statement_position) { | 1677 if (state_.current_statement_position != state_.written_statement_position) { |
1681 EnsureSpace ensure_space(assembler_); | 1678 EnsureSpace ensure_space(assembler_); |
1682 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, | 1679 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, |
1683 state_.current_statement_position); | 1680 state_.current_statement_position); |
1684 state_.written_position = state_.current_statement_position; | 1681 state_.written_position = state_.current_statement_position; |
1685 state_.written_statement_position = state_.current_statement_position; | 1682 state_.written_statement_position = state_.current_statement_position; |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 | 1933 |
1937 | 1934 |
1938 void Assembler::DataAlign(int m) { | 1935 void Assembler::DataAlign(int m) { |
1939 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); | 1936 DCHECK(m >= 2 && base::bits::IsPowerOfTwo32(m)); |
1940 while ((pc_offset() & (m - 1)) != 0) { | 1937 while ((pc_offset() & (m - 1)) != 0) { |
1941 db(0); | 1938 db(0); |
1942 } | 1939 } |
1943 } | 1940 } |
1944 } // namespace internal | 1941 } // namespace internal |
1945 } // namespace v8 | 1942 } // namespace v8 |
OLD | NEW |