Index: src/scopes.cc |
diff --git a/src/scopes.cc b/src/scopes.cc |
index 3565e11b58f710e280f1080c0fb479e5e01376f9..dfe1018d98c2ddd6fc75b1ea7a6f69925bc196e4 100644 |
--- a/src/scopes.cc |
+++ b/src/scopes.cc |
@@ -413,6 +413,16 @@ int Scope::ContextChainLength(Scope* scope) { |
} |
+bool Scope::IsParameterDeclared(Handle<String> name) { |
+ for (int i = 0, length = num_parameters(); i < length; i ++) { |
Lasse Reichstein
2011/01/18 13:40:59
Perhaps ASSERT that both name and parameter(i)->na
Martin Maly
2011/01/18 16:46:38
Done.
|
+ if (name.is_identical_to(parameter(i)->name())) { |
+ return true; |
+ } |
+ } |
+ return false; |
+} |
+ |
+ |
#ifdef DEBUG |
static const char* Header(Scope::Type type) { |
switch (type) { |