Version 3.3.7
Updated MIPS infrastructure files.
Performance improvements and bug fixes on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@7897 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/scopes.cc b/src/scopes.cc
index 7eadab0..6102442 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -203,6 +203,7 @@
inner_scope_calls_eval_ = false;
outer_scope_is_eval_scope_ = false;
force_eager_compilation_ = false;
+ num_var_or_const_ = 0;
num_stack_slots_ = 0;
num_heap_slots_ = 0;
scope_info_ = scope_info;
@@ -365,12 +366,17 @@
}
-Variable* Scope::DeclareLocal(Handle<String> name, Variable::Mode mode) {
+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().
ASSERT(!resolved());
ASSERT(mode == Variable::VAR || mode == Variable::CONST);
+ if (type == VAR_OR_CONST) {
+ num_var_or_const_++;
+ }
return variables_.Declare(this, name, mode, true, Variable::NORMAL);
}