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

Side by Side Diff: src/ast/scopes.h

Issue 2417643003: Turn AllowsLazyParsingWithoutUnresolvedVariables into a whitelist stopping at the outer parsed cont… (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | src/ast/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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_AST_SCOPES_H_ 5 #ifndef V8_AST_SCOPES_H_
6 #define V8_AST_SCOPES_H_ 6 #define V8_AST_SCOPES_H_
7 7
8 #include "src/base/hashmap.h" 8 #include "src/base/hashmap.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 #include "src/objects.h" 10 #include "src/objects.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 // Result of variable allocation. 340 // Result of variable allocation.
341 int num_stack_slots() const { return num_stack_slots_; } 341 int num_stack_slots() const { return num_stack_slots_; }
342 int num_heap_slots() const { return num_heap_slots_; } 342 int num_heap_slots() const { return num_heap_slots_; }
343 343
344 int StackLocalCount() const; 344 int StackLocalCount() const;
345 int ContextLocalCount() const; 345 int ContextLocalCount() const;
346 346
347 // Determine if we can parse a function literal in this scope lazily without 347 // Determine if we can parse a function literal in this scope lazily without
348 // caring about the unresolved variables within. 348 // caring about the unresolved variables within.
349 bool AllowsLazyParsingWithoutUnresolvedVariables() const; 349 bool AllowsLazyParsingWithoutUnresolvedVariables(const Scope* outer) const;
350 350
351 // The number of contexts between this and scope; zero if this == scope. 351 // The number of contexts between this and scope; zero if this == scope.
352 int ContextChainLength(Scope* scope) const; 352 int ContextChainLength(Scope* scope) const;
353 353
354 // The number of contexts between this and the outermost context that has a 354 // The number of contexts between this and the outermost context that has a
355 // sloppy eval call. One if this->calls_sloppy_eval(). 355 // sloppy eval call. One if this->calls_sloppy_eval().
356 int ContextChainLengthUntilOutermostSloppyEval() const; 356 int ContextChainLengthUntilOutermostSloppyEval() const;
357 357
358 // The maximum number of nested contexts required for this scope and any inner 358 // The maximum number of nested contexts required for this scope and any inner
359 // scopes. 359 // scopes.
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 void AllocateModuleVariables(); 888 void AllocateModuleVariables();
889 889
890 private: 890 private:
891 ModuleDescriptor* module_descriptor_; 891 ModuleDescriptor* module_descriptor_;
892 }; 892 };
893 893
894 } // namespace internal 894 } // namespace internal
895 } // namespace v8 895 } // namespace v8
896 896
897 #endif // V8_AST_SCOPES_H_ 897 #endif // V8_AST_SCOPES_H_
OLDNEW
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698