summaryrefslogtreecommitdiffstats
path: root/src/data-flow.cc
diff options
context:
space:
mode:
authorAndrei Popescu <andreip@google.com>2010-02-23 13:46:05 +0000
committerAndrei Popescu <andreip@google.com>2010-02-25 14:07:18 +0000
commit3100271588b61cbc1dc472a3f2f105d2eed8497f (patch)
tree05c3c54cf44b861d1d61dfcbb6b83e2ee2c13281 /src/data-flow.cc
parent6b23cceca405474a281cdf61cbcd6ecf10944a82 (diff)
downloadandroid_external_v8-3100271588b61cbc1dc472a3f2f105d2eed8497f.tar.gz
android_external_v8-3100271588b61cbc1dc472a3f2f105d2eed8497f.tar.bz2
android_external_v8-3100271588b61cbc1dc472a3f2f105d2eed8497f.zip
Update to V8 with partial snapshots. This is taken from the partial_snapshot branch of V8.
Diffstat (limited to 'src/data-flow.cc')
-rw-r--r--src/data-flow.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/data-flow.cc b/src/data-flow.cc
index 0e30b315..22ec66fd 100644
--- a/src/data-flow.cc
+++ b/src/data-flow.cc
@@ -33,8 +33,9 @@ namespace v8 {
namespace internal {
-void AstLabeler::Label(FunctionLiteral* fun) {
- VisitStatements(fun->body());
+void AstLabeler::Label(CompilationInfo* info) {
+ info_ = info;
+ VisitStatements(info_->function()->body());
}
@@ -162,6 +163,10 @@ void AstLabeler::VisitSlot(Slot* expr) {
void AstLabeler::VisitVariableProxy(VariableProxy* expr) {
expr->set_num(next_number_++);
+ Variable* var = expr->var();
+ if (var->is_global() && !var->is_this()) {
+ info_->set_has_globals(true);
+ }
}
@@ -198,7 +203,7 @@ void AstLabeler::VisitAssignment(Assignment* expr) {
ASSERT(prop->key()->IsPropertyName());
VariableProxy* proxy = prop->obj()->AsVariableProxy();
if (proxy != NULL && proxy->var()->is_this()) {
- has_this_properties_ = true;
+ info()->set_has_this_properties(true);
} else {
Visit(prop->obj());
}