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

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: More CR feedback. 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
« src/parser.cc ('K') | « src/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ++) {
+ if (name.is_identical_to(parameter(i)->name())) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
#ifdef DEBUG
static const char* Header(Scope::Type type) {
switch (type) {
« src/parser.cc ('K') | « src/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698