Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Side by Side Diff: src/assembler.cc

Issue 12223027: This patch is the propagation version of https://codereview.chromium.org/10824032 patch (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/assembler.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 LOG_CODE_EVENT(assembler_->isolate(),
1526 CodeLinePosInfoAddPositionEvent(jit_handler_data_,
1527 assembler_->pc_offset(),
1528 pos));
1525 } 1529 }
1526 1530
1527 1531
1528 void PositionsRecorder::RecordStatementPosition(int pos) { 1532 void PositionsRecorder::RecordStatementPosition(int pos) {
1529 ASSERT(pos != RelocInfo::kNoPosition); 1533 ASSERT(pos != RelocInfo::kNoPosition);
1530 ASSERT(pos >= 0); 1534 ASSERT(pos >= 0);
1531 state_.current_statement_position = pos; 1535 state_.current_statement_position = pos;
1532 #ifdef ENABLE_GDB_JIT_INTERFACE 1536 #ifdef ENABLE_GDB_JIT_INTERFACE
1533 if (gdbjit_lineinfo_ != NULL) { 1537 if (gdbjit_lineinfo_ != NULL) {
1534 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true); 1538 gdbjit_lineinfo_->SetPosition(assembler_->pc_offset(), pos, true);
1535 } 1539 }
1536 #endif 1540 #endif
1541 LOG_CODE_EVENT(assembler_->isolate(),
1542 CodeLinePosInfoAddStatementPositionEvent(
1543 jit_handler_data_,
1544 assembler_->pc_offset(),
1545 pos));
1537 } 1546 }
1538 1547
1539 1548
1540 bool PositionsRecorder::WriteRecordedPositions() { 1549 bool PositionsRecorder::WriteRecordedPositions() {
1541 bool written = false; 1550 bool written = false;
1542 1551
1543 // Write the statement position if it is different from what was written last 1552 // Write the statement position if it is different from what was written last
1544 // time. 1553 // time.
1545 if (state_.current_statement_position != state_.written_statement_position) { 1554 if (state_.current_statement_position != state_.written_statement_position) {
1546 EnsureSpace ensure_space(assembler_); 1555 EnsureSpace ensure_space(assembler_);
(...skipping 11 matching lines...) Expand all
1558 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1567 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1559 state_.written_position = state_.current_position; 1568 state_.written_position = state_.current_position;
1560 written = true; 1569 written = true;
1561 } 1570 }
1562 1571
1563 // Return whether something was written. 1572 // Return whether something was written.
1564 return written; 1573 return written;
1565 } 1574 }
1566 1575
1567 } } // namespace v8::internal 1576 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/assembler.h ('k') | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698