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

Side by Side Diff: src/scopes.h

Issue 9535006: Profiler experiments: prevent self-optimization for V8 Extensions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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') | no next file » | 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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 int StackLocalCount() const; 366 int StackLocalCount() const;
367 int ContextLocalCount() const; 367 int ContextLocalCount() const;
368 368
369 // Make sure this scope and all outer scopes are eagerly compiled. 369 // Make sure this scope and all outer scopes are eagerly compiled.
370 void ForceEagerCompilation() { force_eager_compilation_ = true; } 370 void ForceEagerCompilation() { force_eager_compilation_ = true; }
371 371
372 // Determine if we can use lazy compilation for this scope. 372 // Determine if we can use lazy compilation for this scope.
373 bool AllowsLazyCompilation() const; 373 bool AllowsLazyCompilation() const;
374 374
375 // True if we can lazily recompile functions with this scope.
376 bool allows_lazy_recompilation() const {
377 return !force_eager_compilation_;
378 }
379
375 // 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.
376 bool HasTrivialOuterContext() const; 381 bool HasTrivialOuterContext() const;
377 382
378 // The number of contexts between this and scope; zero if this == scope. 383 // The number of contexts between this and scope; zero if this == scope.
379 int ContextChainLength(Scope* scope); 384 int ContextChainLength(Scope* scope);
380 385
381 // Find the first function, global, or eval scope. This is the scope 386 // Find the first function, global, or eval scope. This is the scope
382 // where var declarations will be hoisted to in the implementation. 387 // where var declarations will be hoisted to in the implementation.
383 Scope* DeclarationScope(); 388 Scope* DeclarationScope();
384 389
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 } 586 }
582 587
583 void SetDefaults(ScopeType type, 588 void SetDefaults(ScopeType type,
584 Scope* outer_scope, 589 Scope* outer_scope,
585 Handle<ScopeInfo> scope_info); 590 Handle<ScopeInfo> scope_info);
586 }; 591 };
587 592
588 } } // namespace v8::internal 593 } } // namespace v8::internal
589 594
590 #endif // V8_SCOPES_H_ 595 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698