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

Side by Side Diff: src/scopes.h

Issue 10448006: Merged r11592 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
Patch Set: Add missing test Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/full-codegen.cc ('k') | src/scopes.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 int StackLocalCount() const; 362 int StackLocalCount() const;
363 int ContextLocalCount() const; 363 int ContextLocalCount() const;
364 364
365 // Make sure this scope and all outer scopes are eagerly compiled. 365 // Make sure this scope and all outer scopes are eagerly compiled.
366 void ForceEagerCompilation() { force_eager_compilation_ = true; } 366 void ForceEagerCompilation() { force_eager_compilation_ = true; }
367 367
368 // Determine if we can use lazy compilation for this scope. 368 // Determine if we can use lazy compilation for this scope.
369 bool AllowsLazyCompilation() const; 369 bool AllowsLazyCompilation() const;
370 370
371 // True if we can lazily recompile functions with this scope. 371 // True if we can lazily recompile functions with this scope.
372 bool allows_lazy_recompilation() const { 372 bool AllowsLazyRecompilation() const;
373 return !force_eager_compilation_;
374 }
375 373
376 // True if the outer context of this scope is always the global context. 374 // True if the outer context of this scope is always the global context.
377 bool HasTrivialOuterContext() const; 375 bool HasTrivialOuterContext() const;
378 376
377 // True if this scope is inside a with scope and all declaration scopes
378 // between them have empty contexts. Such declaration scopes become
379 // invisible during scope info deserialization.
380 bool TrivialDeclarationScopesBeforeWithScope() const;
381
379 // The number of contexts between this and scope; zero if this == scope. 382 // The number of contexts between this and scope; zero if this == scope.
380 int ContextChainLength(Scope* scope); 383 int ContextChainLength(Scope* scope);
381 384
382 // Find the first function, global, or eval scope. This is the scope 385 // Find the first function, global, or eval scope. This is the scope
383 // where var declarations will be hoisted to in the implementation. 386 // where var declarations will be hoisted to in the implementation.
384 Scope* DeclarationScope(); 387 Scope* DeclarationScope();
385 388
386 Handle<ScopeInfo> GetScopeInfo(); 389 Handle<ScopeInfo> GetScopeInfo();
387 390
388 // Get the chain of nested scopes within this scope for the source statement 391 // Get the chain of nested scopes within this scope for the source statement
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 } 601 }
599 602
600 void SetDefaults(ScopeType type, 603 void SetDefaults(ScopeType type,
601 Scope* outer_scope, 604 Scope* outer_scope,
602 Handle<ScopeInfo> scope_info); 605 Handle<ScopeInfo> scope_info);
603 }; 606 };
604 607
605 } } // namespace v8::internal 608 } } // namespace v8::internal
606 609
607 #endif // V8_SCOPES_H_ 610 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698