[runtime] Fix PrintRegisters should not output to default stdout

PrintRegisters() should print output to `os` argument for unification,
and in case of the function would be used by other files.

Bug: v8:10821
Change-Id: Ia825c4deaf89ec454b7c293367cfa362acd4cccc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2371543
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69664}
This commit is contained in:
Cong Zuo 2020-08-24 12:05:24 +08:00 committed by Commit Bot
parent a2fd94f014
commit 67206a6ce9
2 changed files with 2 additions and 1 deletions

View File

@ -76,6 +76,7 @@ Choongwoo Han <cwhan.tunz@gmail.com>
Chris Nardi <hichris123@gmail.com>
Christopher A. Taylor <chris@gameclosure.com>
Colin Ihrig <cjihrig@gmail.com>
Cong Zuo <zckevinzc@gmail.com>
Daniel Andersson <kodandersson@gmail.com>
Daniel Bevenius <daniel.bevenius@gmail.com>
Daniel James <dnljms@gmail.com>

View File

@ -60,7 +60,7 @@ void PrintRegisters(Isolate* isolate, std::ostream& os, bool is_input,
if ((is_input && interpreter::Bytecodes::ReadsAccumulator(bytecode)) ||
(!is_input && interpreter::Bytecodes::WritesAccumulator(bytecode))) {
os << " [ " << kAccumulator << kArrowDirection;
accumulator->ShortPrint();
accumulator->ShortPrint(os);
os << " ]" << std::endl;
}