OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 | 367 |
368 int StackLocalCount() const; | 368 int StackLocalCount() const; |
369 int ContextLocalCount() const; | 369 int ContextLocalCount() const; |
370 | 370 |
371 // Make sure this scope and all outer scopes are eagerly compiled. | 371 // Make sure this scope and all outer scopes are eagerly compiled. |
372 void ForceEagerCompilation() { force_eager_compilation_ = true; } | 372 void ForceEagerCompilation() { force_eager_compilation_ = true; } |
373 | 373 |
374 // Determine if we can use lazy compilation for this scope. | 374 // Determine if we can use lazy compilation for this scope. |
375 bool AllowsLazyCompilation() const; | 375 bool AllowsLazyCompilation() const; |
376 | 376 |
377 // True if we can lazily recompile functions with this scope. | 377 // Determine if we can use lazy compilation for this scope without a context. |
378 bool AllowsLazyRecompilation() const; | 378 bool AllowsLazyCompilationWithoutContext() const; |
379 | 379 |
380 // True if the outer context of this scope is always the global context. | 380 // True if the outer context of this scope is always the global context. |
381 bool HasTrivialOuterContext() const; | 381 bool HasTrivialOuterContext() const; |
382 | 382 |
383 // True if this scope is inside a with scope and all declaration scopes | 383 // True if this scope is inside a with scope and all declaration scopes |
384 // between them have empty contexts. Such declaration scopes become | 384 // between them have empty contexts. Such declaration scopes become |
385 // invisible during scope info deserialization. | 385 // invisible during scope info deserialization. |
386 bool TrivialDeclarationScopesBeforeWithScope() const; | 386 bool TrivialDeclarationScopesBeforeWithScope() const; |
387 | 387 |
388 // The number of contexts between this and scope; zero if this == scope. | 388 // The number of contexts between this and scope; zero if this == scope. |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
610 void SetDefaults(ScopeType type, | 610 void SetDefaults(ScopeType type, |
611 Scope* outer_scope, | 611 Scope* outer_scope, |
612 Handle<ScopeInfo> scope_info); | 612 Handle<ScopeInfo> scope_info); |
613 | 613 |
614 Zone* zone_; | 614 Zone* zone_; |
615 }; | 615 }; |
616 | 616 |
617 } } // namespace v8::internal | 617 } } // namespace v8::internal |
618 | 618 |
619 #endif // V8_SCOPES_H_ | 619 #endif // V8_SCOPES_H_ |
OLD | NEW |