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

Unified Diff: src/scopes.cc

Issue 6144005: Early draft of strict mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback + Tests. Created 9 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
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) {

Powered by Google App Engine
This is Rietveld 408576698