Index: src/ast/scopes.cc |
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc |
index 1cb3af312d19875ed8c58f927173491f990f6767..404e5075ade835db1469fc6916f4ec0dfe197cd5 100644 |
--- a/src/ast/scopes.cc |
+++ b/src/ast/scopes.cc |
@@ -1508,8 +1508,10 @@ void Scope::Print(int n) { |
PrintVar(n1, function); |
} |
- PrintMap(n1, "// local vars:\n", &variables_, true, function); |
- PrintMap(n1, "// dynamic vars:\n", &variables_, false, function); |
+ if (variables_.occupancy() > 0) { |
+ PrintMap(n1, "// local vars:\n", &variables_, true, function); |
+ PrintMap(n1, "// dynamic vars:\n", &variables_, false, function); |
+ } |
// Print inner scopes (disable by providing negative n). |
if (n >= 0) { |