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

Side by Side Diff: src/assembler.cc

Issue 922153002: Move identical code from platform specific assemblers to assembler.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/ia32/assembler-ia32.h » ('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 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1645 EnsureSpace ensure_space(assembler_); 1645 EnsureSpace ensure_space(assembler_);
1646 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); 1646 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position);
1647 state_.written_position = state_.current_position; 1647 state_.written_position = state_.current_position;
1648 written = true; 1648 written = true;
1649 } 1649 }
1650 1650
1651 // Return whether something was written. 1651 // Return whether something was written.
1652 return written; 1652 return written;
1653 } 1653 }
1654 1654
1655
1656 // Platform specific but identical code for all the platforms.
1657
1658
1659 void Assembler::RecordDeoptReason(const int reason, const int raw_position) {
1660 if (FLAG_trace_deopt || isolate()->cpu_profiler()->is_profiling()) {
1661 EnsureSpace ensure_space(this);
1662 RecordRelocInfo(RelocInfo::POSITION, raw_position);
1663 RecordRelocInfo(RelocInfo::DEOPT_REASON, reason);
1664 }
1665 }
1666
1667
1668 void Assembler::RecordComment(const char* msg) {
1669 if (FLAG_code_comments) {
1670 EnsureSpace ensure_space(this);
1671 RecordRelocInfo(RelocInfo::COMMENT, reinterpret_cast<intptr_t>(msg));
1672 }
1673 }
1674
1675
1676 void Assembler::RecordJSReturn() {
1677 positions_recorder()->WriteRecordedPositions();
1678 EnsureSpace ensure_space(this);
1679 RecordRelocInfo(RelocInfo::JS_RETURN);
1680 }
1681
1682
1683 void Assembler::RecordDebugBreakSlot() {
1684 positions_recorder()->WriteRecordedPositions();
1685 EnsureSpace ensure_space(this);
1686 RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT);
1687 }
1655 } } // namespace v8::internal 1688 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.cc ('k') | src/ia32/assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698