Chromium Code Reviews| 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 1504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1515 | 1515 |
| 1516 void PositionsRecorder::RecordPosition(int pos) { | 1516 void PositionsRecorder::RecordPosition(int pos) { |
| 1517 ASSERT(pos != RelocInfo::kNoPosition); | 1517 ASSERT(pos != RelocInfo::kNoPosition); |
| 1518 ASSERT(pos >= 0); | 1518 ASSERT(pos >= 0); |
| 1519 state_.current_position = pos; | 1519 state_.current_position = pos; |
| 1520 #ifdef ENABLE_GDB_JIT_INTERFACE | 1520 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 1521 if (gdbjit_lineinfo_ != NULL) { | 1521 if (gdbjit_lineinfo_ != NULL) { |
| 1522 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); | 1522 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); |
| 1523 } | 1523 } |
| 1524 #endif | 1524 #endif |
| 1525 if (user_data_ != NULL) { | |
|
danno
2013/02/01 13:43:10
Why conditionally call? It seems like you should _
| |
| 1526 LOG_CODE_EVENT(this->assembler()->isolate(), | |
| 1527 CodeLinePosInfoAddEvent(user_data_, | |
| 1528 assembler_->pc_offset(), | |
| 1529 pos, | |
| 1530 JitCodeEvent::POSITION)); | |
| 1531 } | |
| 1525 } | 1532 } |
| 1526 | 1533 |
| 1527 | 1534 |
| 1528 void PositionsRecorder::RecordStatementPosition(int pos) { | 1535 void PositionsRecorder::RecordStatementPosition(int pos) { |
| 1529 ASSERT(pos != RelocInfo::kNoPosition); | 1536 ASSERT(pos != RelocInfo::kNoPosition); |
| 1530 ASSERT(pos >= 0); | 1537 ASSERT(pos >= 0); |
| 1531 state_.current_statement_position = pos; | 1538 state_.current_statement_position = pos; |
| 1532 #ifdef ENABLE_GDB_JIT_INTERFACE | 1539 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 1533 if (gdbjit_lineinfo_ != NULL) { | 1540 if (gdbjit_lineinfo_ != NULL) { |
| 1534 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); | 1541 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); |
| 1535 } | 1542 } |
| 1536 #endif | 1543 #endif |
| 1544 if (user_data_ != NULL) { | |
|
danno
2013/02/01 13:43:10
Same comment as above (please always call LOG_CODE
| |
| 1545 LOG_CODE_EVENT(this->assembler()->isolate(), | |
| 1546 CodeLinePosInfoAddEvent(user_data_, | |
| 1547 assembler_->pc_offset(), | |
| 1548 pos, | |
| 1549 JitCodeEvent::STATEMENT_POSITION)); | |
| 1550 } | |
| 1537 } | 1551 } |
| 1538 | 1552 |
| 1539 | 1553 |
| 1540 bool PositionsRecorder::WriteRecordedPositions() { | 1554 bool PositionsRecorder::WriteRecordedPositions() { |
| 1541 bool written = false; | 1555 bool written = false; |
| 1542 | 1556 |
| 1543 // Write the statement position if it is different from what was written last | 1557 // Write the statement position if it is different from what was written last |
| 1544 // time. | 1558 // time. |
| 1545 if (state_.current_statement_position != state_.written_statement_position) { | 1559 if (state_.current_statement_position != state_.written_statement_position) { |
| 1546 EnsureSpace ensure_space(assembler_); | 1560 EnsureSpace ensure_space(assembler_); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 1558 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1572 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1559 state_.written_position = state_.current_position; | 1573 state_.written_position = state_.current_position; |
| 1560 written = true; | 1574 written = true; |
| 1561 } | 1575 } |
| 1562 | 1576 |
| 1563 // Return whether something was written. | 1577 // Return whether something was written. |
| 1564 return written; | 1578 return written; |
| 1565 } | 1579 } |
| 1566 | 1580 |
| 1567 } } // namespace v8::internal | 1581 } } // namespace v8::internal |
| OLD | NEW |