| Index: src/code-stub-assembler.cc
|
| diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
|
| index fc73d66c1b89945239913e51b0d3c68bf40f22b5..26bab00ccf09842534f05a745848cd907fd59478 100644
|
| --- a/src/code-stub-assembler.cc
|
| +++ b/src/code-stub-assembler.cc
|
| @@ -8398,5 +8398,29 @@ Node* CodeStubAssembler::AllocatePromiseReactionJobInfo(
|
| return result;
|
| }
|
|
|
| +void CodeStubAssembler::Print(const char* s) {
|
| +#ifdef DEBUG
|
| + std::string formatted(s);
|
| + formatted += "\n";
|
| + Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked(
|
| + formatted.c_str(), TENURED);
|
| + CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(string));
|
| +#endif
|
| +}
|
| +
|
| +void CodeStubAssembler::DebugPrint(const char* prefix, Node* tagged_value) {
|
| +#ifdef DEBUG
|
| + if (prefix != nullptr) {
|
| + std::string formatted(prefix);
|
| + formatted += ": ";
|
| + Handle<String> string = isolate()->factory()->NewStringFromAsciiChecked(
|
| + formatted.c_str(), TENURED);
|
| + CallRuntime(Runtime::kGlobalPrint, NoContextConstant(),
|
| + HeapConstant(string));
|
| + }
|
| + CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), tagged_value);
|
| +#endif
|
| +}
|
| +
|
| } // namespace internal
|
| } // namespace v8
|
|
|