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

Side by Side Diff: src/scopes.h

Issue 10121007: Allow more functions to be lazy compiled. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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/compiler.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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 int StackLocalCount() const; 355 int StackLocalCount() const;
356 int ContextLocalCount() const; 356 int ContextLocalCount() const;
357 357
358 // Make sure this scope and all outer scopes are eagerly compiled. 358 // Make sure this scope and all outer scopes are eagerly compiled.
359 void ForceEagerCompilation() { force_eager_compilation_ = true; } 359 void ForceEagerCompilation() { force_eager_compilation_ = true; }
360 360
361 // Determine if we can use lazy compilation for this scope. 361 // Determine if we can use lazy compilation for this scope.
362 bool AllowsLazyCompilation() const; 362 bool AllowsLazyCompilation() const;
363 363
364 bool AllowsLazyCompilationForNative() const;
365
364 // True if we can lazily recompile functions with this scope. 366 // True if we can lazily recompile functions with this scope.
365 bool allows_lazy_recompilation() const { 367 bool allows_lazy_recompilation() const {
366 return !force_eager_compilation_; 368 return !force_eager_compilation_;
367 } 369 }
368 370
369 // True if the outer context of this scope is always the global context. 371 // True if the outer context of this scope is always the global context.
370 bool HasTrivialOuterContext() const; 372 bool HasTrivialOuterContext() const;
371 373
372 // The number of contexts between this and scope; zero if this == scope. 374 // The number of contexts between this and scope; zero if this == scope.
373 int ContextChainLength(Scope* scope); 375 int ContextChainLength(Scope* scope);
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } 593 }
592 594
593 void SetDefaults(ScopeType type, 595 void SetDefaults(ScopeType type,
594 Scope* outer_scope, 596 Scope* outer_scope,
595 Handle<ScopeInfo> scope_info); 597 Handle<ScopeInfo> scope_info);
596 }; 598 };
597 599
598 } } // namespace v8::internal 600 } } // namespace v8::internal
599 601
600 #endif // V8_SCOPES_H_ 602 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698