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

Side by Side Diff: src/assembler.cc

Issue 1049703002: Make compilers agree on source position of thrown errors. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix another regression. Created 5 years, 8 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
« no previous file with comments | « no previous file | 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 1608
1609 bool PositionsRecorder::WriteRecordedPositions() { 1609 bool PositionsRecorder::WriteRecordedPositions() {
1610 bool written = false; 1610 bool written = false;
1611 1611
1612 // Write the statement position if it is different from what was written last 1612 // Write the statement position if it is different from what was written last
1613 // time. 1613 // time.
1614 if (state_.current_statement_position != state_.written_statement_position) { 1614 if (state_.current_statement_position != state_.written_statement_position) {
1615 EnsureSpace ensure_space(assembler_); 1615 EnsureSpace ensure_space(assembler_);
1616 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION, 1616 assembler_->RecordRelocInfo(RelocInfo::STATEMENT_POSITION,
1617 state_.current_statement_position); 1617 state_.current_statement_position);
1618 state_.written_statement_position = state_.current_statement_position;
1619 written = true; 1618 written = true;
1620 } 1619 }
1620 state_.written_statement_position = state_.current_statement_position;
1621 1621
1622 // Write the position if it is different from what was written last time and 1622 // Write the position if it is different from what was written last time and
1623 // also different from the written statement position. 1623 // also different from the statement position that was just written.
1624 if (state_.current_position != state_.written_position && 1624 if (state_.current_position != state_.written_position &&
1625 state_.current_position != state_.written_statement_position) { 1625 (state_.current_position != state_.written_statement_position ||
1626 !written)) {
1626 EnsureSpace ensure_space(assembler_); 1627 EnsureSpace ensure_space(assembler_);
1627 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1628 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1628 state_.written_position = state_.current_position;
1629 written = true; 1629 written = true;
1630 } 1630 }
1631 state_.written_position = state_.current_position;
1631 1632
1632 // Return whether something was written. 1633 // Return whether something was written.
1633 return written; 1634 return written;
1634 } 1635 }
1635 1636
1636 1637
1637 // Platform specific but identical code for all the platforms. 1638 // Platform specific but identical code for all the platforms.
1638 1639
1639 1640
1640 void Assembler::RecordDeoptReason(const int reason, 1641 void Assembler::RecordDeoptReason(const int reason,
(...skipping 21 matching lines...) Expand all
1662 RecordRelocInfo(RelocInfo::JS_RETURN); 1663 RecordRelocInfo(RelocInfo::JS_RETURN);
1663 } 1664 }
1664 1665
1665 1666
1666 void Assembler::RecordDebugBreakSlot() { 1667 void Assembler::RecordDebugBreakSlot() {
1667 positions_recorder()->WriteRecordedPositions(); 1668 positions_recorder()->WriteRecordedPositions();
1668 EnsureSpace ensure_space(this); 1669 EnsureSpace ensure_space(this);
1669 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); 1670 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
1670 } 1671 }
1671 } } // namespace v8::internal 1672 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698