Index: src/scopes.h |
diff --git a/src/scopes.h b/src/scopes.h |
index 21040b7c06f386ac5e17d27d32a1bfecc91a89c6..526c3d34e9aa42e062b6a3ceb77f90e1e15ed790 100644 |
--- a/src/scopes.h |
+++ b/src/scopes.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2006-2008 the V8 project authors. All rights reserved. |
+// Copyright 2010 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -34,6 +34,9 @@ |
namespace v8 { |
namespace internal { |
+class CompilationInfo; |
+ |
+ |
// A hash map to support fast variable declaration and lookup. |
class VariableMap: public HashMap { |
public: |
@@ -96,6 +99,11 @@ class Scope: public ZoneObject { |
virtual ~Scope() { } |
+ // Compute top scope and allocate variables. For lazy compilation the top |
+ // scope only contains the single lazily compiled function, so this |
+ // doesn't re-allocate variables repeatedly. |
+ static bool Analyze(CompilationInfo* info); |
+ |
// The scope name is only used for printing/debugging. |
void SetScopeName(Handle<String> scope_name) { scope_name_ = scope_name; } |