Version 3.4.0.
Changed calls to undefined property setters to not throw (issue 1355).
Made RegExp objects not callable.
Fixed issues on special case large JSON strings in new json parser (issues http://crbug.com/83877 and http://crbug.com/84186).
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@8096 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/scopes.cc b/src/scopes.cc
index 6102442..e159257 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -366,17 +366,22 @@
}
-Variable* Scope::DeclareLocal(Handle<String> name,
- Variable::Mode mode,
- LocalType type) {
- // DYNAMIC variables are introduces during variable allocation,
- // INTERNAL variables are allocated explicitly, and TEMPORARY
- // variables are allocated via NewTemporary().
+void Scope::DeclareParameter(Handle<String> name) {
ASSERT(!resolved());
+ ASSERT(is_function_scope());
+ Variable* var =
+ variables_.Declare(this, name, Variable::VAR, true, Variable::NORMAL);
+ params_.Add(var);
+}
+
+
+Variable* Scope::DeclareLocal(Handle<String> name, Variable::Mode mode) {
+ ASSERT(!resolved());
+ // This function handles VAR and CONST modes. DYNAMIC variables are
+ // introduces during variable allocation, INTERNAL variables are allocated
+ // explicitly, and TEMPORARY variables are allocated via NewTemporary().
ASSERT(mode == Variable::VAR || mode == Variable::CONST);
- if (type == VAR_OR_CONST) {
- num_var_or_const_++;
- }
+ ++num_var_or_const_;
return variables_.Declare(this, name, mode, true, Variable::NORMAL);
}
@@ -388,13 +393,6 @@
}
-void Scope::AddParameter(Variable* var) {
- ASSERT(is_function_scope());
- ASSERT(LocalLookup(var->name()) == var);
- params_.Add(var);
-}
-
-
VariableProxy* Scope::NewUnresolved(Handle<String> name,
bool inside_with,
int position) {