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

Unified Diff: src/scopes.cc

Issue 7826009: Support declarations of context allocated locals in Crankshaft. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 4 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
Index: src/scopes.cc
===================================================================
--- src/scopes.cc (revision 9109)
+++ src/scopes.cc (working copy)
@@ -376,9 +376,11 @@
}
-Variable* Scope::DeclareFunctionVar(Handle<String> name) {
+VariableProxy* Scope::DeclareFunctionVar(Handle<String> name) {
ASSERT(is_function_scope() && function_ == NULL);
- function_ = new Variable(this, name, Variable::CONST, true, Variable::NORMAL);
+ Variable* function_var =
+ new Variable(this, name, Variable::CONST, true, Variable::NORMAL);
+ function_ = new(isolate_->zone()) VariableProxy(isolate_, function_var);
return function_;
}
@@ -715,7 +717,7 @@
PrettyPrinter printer;
Indent(n1, "// function var\n");
if (function_ != NULL) {
- PrintVar(&printer, n1, function_);
+ PrintVar(&printer, n1, function_->var());
}
Indent(n1, "// temporary vars\n");
@@ -795,8 +797,8 @@
// between this scope and the outer scope. (ECMA-262, 3rd., requires that
// the name of named function literal is kept in an intermediate scope
// in between this scope and the next outer scope.)
- if (function_ != NULL && function_->name().is_identical_to(name)) {
- var = function_;
+ if (function_ != NULL && function_->var()->name().is_identical_to(name)) {
Kevin Millikin (Chromium) 2011/09/01 15:40:58 function_->name() because the VariableProxy and Va
fschneider 2011/09/01 16:28:21 Done.
+ var = function_->var();
} else if (outer_scope_ != NULL) {
var = outer_scope_->LookupRecursive(
@@ -1114,7 +1116,7 @@
// because of the current ScopeInfo implementation (see
// ScopeInfo::ScopeInfo(FunctionScope* scope) constructor).
if (function_ != NULL) {
- AllocateNonParameterLocal(function_);
+ AllocateNonParameterLocal(function_->var());
}
}
« src/scopeinfo.cc ('K') | « src/scopes.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698