Reviewers: Sven Panne,

Description:
Add convenience method to print types for debugging.

[email protected]

Please review this at https://codereview.chromium.org/435403002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+14, -0 lines):
  M src/types.h
  M src/types.cc


Index: src/types.cc
diff --git a/src/types.cc b/src/types.cc
index f52346e4e37489dbe519d2cdd0a18606a7ba0c60..898814dbcbd02de438c55e343b9b35fa152f6c0f 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -940,6 +940,16 @@ void TypeImpl<Config>::PrintTo(OStream& os, PrintDimension dim) { // NOLINT
 }


+#ifdef DEBUG
+template <class Config>
+void TypeImpl<Config>::Print() {
+  OFStream os(stdout);
+  PrintTo(os);
+  os << endl;
+}
+#endif
+
+
// -----------------------------------------------------------------------------
 // Instantiations.

Index: src/types.h
diff --git a/src/types.h b/src/types.h
index 98b9e014c7988bb4c0f6f3db34d21fe4389698bc..f5a263abb686e9e720a1afe23a0946b2fa7b7739 100644
--- a/src/types.h
+++ b/src/types.h
@@ -431,6 +431,10 @@ class TypeImpl : public Config::Base {

   void PrintTo(OStream& os, PrintDimension dim = BOTH_DIMS);  // NOLINT

+#ifdef DEBUG
+  void Print();
+#endif
+
  protected:
   // Friends.



--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to