Merge V8 at r7668: Initial merge by Git.
Change-Id: I1703c8b4f5c63052451a22cf3fb878abc9a0ec75
diff --git a/src/scopes.h b/src/scopes.h
index 24622b4..18db0cd 100644
--- a/src/scopes.h
+++ b/src/scopes.h
@@ -149,7 +149,9 @@
void AddParameter(Variable* var);
// Create a new unresolved variable.
- virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with);
+ virtual VariableProxy* NewUnresolved(Handle<String> name,
+ bool inside_with,
+ int position = RelocInfo::kNoPosition);
// Remove a unresolved variable. During parsing, an unresolved variable
// may have been added optimistically, but then only the variable name
@@ -376,8 +378,8 @@
int num_heap_slots_;
// Serialized scopes support.
- SerializedScopeInfo* scope_info_;
- bool resolved() { return scope_info_ != NULL; }
+ Handle<SerializedScopeInfo> scope_info_;
+ bool resolved() { return !scope_info_.is_null(); }
// Create a non-local variable with a given name.
// These variables are looked up dynamically at runtime.
@@ -412,7 +414,7 @@
void AllocateVariablesRecursively();
private:
- Scope(Scope* inner_scope, SerializedScopeInfo* scope_info);
+ Scope(Scope* inner_scope, Handle<SerializedScopeInfo> scope_info);
void AddInnerScope(Scope* inner_scope) {
if (inner_scope != NULL) {
@@ -423,29 +425,7 @@
void SetDefaults(Type type,
Scope* outer_scope,
- SerializedScopeInfo* scope_info) {
- outer_scope_ = outer_scope;
- type_ = type;
- scope_name_ = FACTORY->empty_symbol();
- dynamics_ = NULL;
- receiver_ = NULL;
- function_ = NULL;
- arguments_ = NULL;
- arguments_shadow_ = NULL;
- illegal_redecl_ = NULL;
- scope_inside_with_ = false;
- scope_contains_with_ = false;
- scope_calls_eval_ = false;
- // Inherit the strict mode from the parent scope.
- strict_mode_ = (outer_scope != NULL) && outer_scope->strict_mode_;
- outer_scope_calls_eval_ = false;
- inner_scope_calls_eval_ = false;
- outer_scope_is_eval_scope_ = false;
- force_eager_compilation_ = false;
- num_stack_slots_ = 0;
- num_heap_slots_ = 0;
- scope_info_ = scope_info;
- }
+ Handle<SerializedScopeInfo> scope_info);
};
@@ -479,7 +459,9 @@
virtual Variable* Lookup(Handle<String> name) { return NULL; }
- virtual VariableProxy* NewUnresolved(Handle<String> name, bool inside_with) {
+ virtual VariableProxy* NewUnresolved(Handle<String> name,
+ bool inside_with,
+ int position = RelocInfo::kNoPosition) {
return NULL;
}