Index: src/scopeinfo.cc |
diff --git a/src/scopeinfo.cc b/src/scopeinfo.cc |
index 75938c355987087b69179a3875014fc62fcc7797..732908a9e64b06dcc2a3920be0a15d74ece82b35 100644 |
--- a/src/scopeinfo.cc |
+++ b/src/scopeinfo.cc |
@@ -813,19 +813,15 @@ void ScopeInfo::Print() { |
} |
PrintF("{"); |
- PrintList("parameters", 0, |
- ParameterEntriesIndex(), |
- ParameterEntriesIndex() + ParameterCount(), |
- this); |
- PrintList("stack slots", 0, |
- StackLocalEntriesIndex(), |
- StackLocalEntriesIndex() + StackLocalCount(), |
- this); |
- PrintList("context slots", |
- Context::MIN_CONTEXT_SLOTS, |
- ContextLocalNameEntriesIndex(), |
- ContextLocalNameEntriesIndex() + ContextLocalCount(), |
- this); |
+ if (length() > 0) { |
+ PrintList("parameters", 0, ParameterEntriesIndex(), |
+ ParameterEntriesIndex() + ParameterCount(), this); |
+ PrintList("stack slots", 0, StackLocalEntriesIndex(), |
+ StackLocalEntriesIndex() + StackLocalCount(), this); |
+ PrintList("context slots", Context::MIN_CONTEXT_SLOTS, |
+ ContextLocalNameEntriesIndex(), |
+ ContextLocalNameEntriesIndex() + ContextLocalCount(), this); |
+ } |
PrintF("}\n"); |
} |