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 1495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1506 | 1506 |
| 1507 void PositionsRecorder::RecordPosition(int pos) { | 1507 void PositionsRecorder::RecordPosition(int pos) { |
| 1508 ASSERT(pos != RelocInfo::kNoPosition); | 1508 ASSERT(pos != RelocInfo::kNoPosition); |
| 1509 ASSERT(pos >= 0); | 1509 ASSERT(pos >= 0); |
| 1510 state_.current_position = pos; | 1510 state_.current_position = pos; |
| 1511 #ifdef ENABLE_GDB_JIT_INTERFACE | 1511 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 1512 if (gdbjit_lineinfo_ != NULL) { | 1512 if (gdbjit_lineinfo_ != NULL) { |
| 1513 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); | 1513 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, false); |
| 1514 } | 1514 } |
| 1515 #endif | 1515 #endif |
| 1516 if (jit_code_event_line_info_ != NULL) { | |
| 1517 LOG_CODE_EVENT(this->assembler()->isolate(), CodeLinePosInfoAddEvent( | |
| 1518 jit_code_event_line_info_, | |
|
danno
2012/12/20 16:27:20
nit: formatting according to google C++ style guid
| |
| 1519 assembler_->pc_offset(), | |
| 1520 pos, | |
| 1521 false)); | |
| 1522 } | |
| 1516 } | 1523 } |
| 1517 | 1524 |
| 1518 | 1525 |
| 1519 void PositionsRecorder::RecordStatementPosition(int pos) { | 1526 void PositionsRecorder::RecordStatementPosition(int pos) { |
| 1520 ASSERT(pos != RelocInfo::kNoPosition); | 1527 ASSERT(pos != RelocInfo::kNoPosition); |
| 1521 ASSERT(pos >= 0); | 1528 ASSERT(pos >= 0); |
| 1522 state_.current_statement_position = pos; | 1529 state_.current_statement_position = pos; |
| 1523 #ifdef ENABLE_GDB_JIT_INTERFACE | 1530 #ifdef ENABLE_GDB_JIT_INTERFACE |
| 1524 if (gdbjit_lineinfo_ != NULL) { | 1531 if (gdbjit_lineinfo_ != NULL) { |
| 1525 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); | 1532 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); |
| 1526 } | 1533 } |
| 1527 #endif | 1534 #endif |
| 1535 if (jit_code_event_line_info_ != NULL) { | |
| 1536 LOG_CODE_EVENT(this->assembler()->isolate(), CodeLinePosInfoAddEvent( | |
|
danno
2012/12/20 16:27:20
nit: formatting according to google C++ style guid
| |
| 1537 jit_code_event_line_info_, | |
| 1538 assembler_->pc_offset(), | |
| 1539 pos, | |
| 1540 true)); | |
| 1541 } | |
| 1528 } | 1542 } |
| 1529 | 1543 |
| 1530 | 1544 |
| 1531 bool PositionsRecorder::WriteRecordedPositions() { | 1545 bool PositionsRecorder::WriteRecordedPositions() { |
| 1532 bool written = false; | 1546 bool written = false; |
| 1533 | 1547 |
| 1534 // Write the statement position if it is different from what was written last | 1548 // Write the statement position if it is different from what was written last |
| 1535 // time. | 1549 // time. |
| 1536 if (state_.current_statement_position != state_.written_statement_position) { | 1550 if (state_.current_statement_position != state_.written_statement_position) { |
| 1537 EnsureSpace ensure_space(assembler_); | 1551 EnsureSpace ensure_space(assembler_); |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 1549 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1563 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
| 1550 state_.written_position = state_.current_position; | 1564 state_.written_position = state_.current_position; |
| 1551 written = true; | 1565 written = true; |
| 1552 } | 1566 } |
| 1553 | 1567 |
| 1554 // Return whether something was written. | 1568 // Return whether something was written. |
| 1555 return written; | 1569 return written; |
| 1556 } | 1570 } |
| 1557 | 1571 |
| 1558 } } // namespace v8::internal | 1572 } } // namespace v8::internal |
| OLD | NEW |