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

Unified Diff: src/code-stub-assembler.h

Issue 2622833002: WIP [esnext] implement async iteration proposal (Closed)
Patch Set: simplify AsyncIteratorValueUnwrap Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/access-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index a5a70c10f80908257ab09e2cf29326a24ea5873e..7359ec51bbc1b981de95abb946ef5e9c903a2ebd 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -1137,6 +1137,31 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// Debug helpers
Node* IsDebugActive();
+ // Useful tools for PrintF-style debugging CSA builtins.
+ void ReleasePrint(const char* c_str) {
+ std::string std_str(c_str);
+ std_str += '\n';
+ Handle<String> str =
+ factory()->NewStringFromAsciiChecked(std_str.c_str(), TENURED);
+ CallRuntime(Runtime::kGlobalPrint, NoContextConstant(), HeapConstant(str));
+ }
+
+ void ReleaseDebugPrint(Node* object) {
+ CallRuntime(Runtime::kDebugPrint, NoContextConstant(), object);
+ }
+
+ void Print(const char* c_str) {
+#ifdef DEBUG
+ ReleasePrint(c_str);
+#endif
+ }
+
+ void DebugPrint(Node* object) {
+#ifdef DEBUG
+ ReleaseDebugPrint(object);
+#endif
+ }
+
// TypedArray/ArrayBuffer helpers
Node* IsDetachedBuffer(Node* buffer);
« no previous file with comments | « src/code-factory.cc ('k') | src/compiler/access-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698