summaryrefslogtreecommitdiffstats
path: root/src/scopes.cc
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-06-13 19:13:29 +0100
committerSteve Block <steveblock@google.com>2011-06-13 19:47:33 +0100
commit053d10c438f14580aaf4ab1b2aad93a5a4fe8b82 (patch)
tree252c105b821e8370a0cc06c168f909e9817a3ebb /src/scopes.cc
parent442c3c4c26c4d864ad9a4948f856e706e77c3cd2 (diff)
downloadandroid_external_v8-053d10c438f14580aaf4ab1b2aad93a5a4fe8b82.tar.gz
android_external_v8-053d10c438f14580aaf4ab1b2aad93a5a4fe8b82.tar.bz2
android_external_v8-053d10c438f14580aaf4ab1b2aad93a5a4fe8b82.zip
Merge V8 at branches/3.2 r8200: Initial merge by Git
Change-Id: I5c434306e98132997e9c5f6024b6ce200b255edf
Diffstat (limited to 'src/scopes.cc')
-rw-r--r--src/scopes.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/scopes.cc b/src/scopes.cc
index 7d9bce5c..8df93c5d 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -202,6 +202,7 @@ void Scope::SetDefaults(Type type,
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;
@@ -364,12 +365,17 @@ Variable* Scope::DeclareFunctionVar(Handle<String> name) {
}
-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);
}