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

Side by Side Diff: src/scopes.h

Issue 352583008: Rollback to Version 3.28.4 (based on bleeding_edge revision r22031) (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 5 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/preparser.h ('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 // 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_SCOPES_H_ 5 #ifndef V8_SCOPES_H_
6 #define V8_SCOPES_H_ 6 #define V8_SCOPES_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/zone.h" 9 #include "src/zone.h"
10 10
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 bool scope_calls_eval_; 467 bool scope_calls_eval_;
468 // The strict mode of this scope. 468 // The strict mode of this scope.
469 StrictMode strict_mode_; 469 StrictMode strict_mode_;
470 // Source positions. 470 // Source positions.
471 int start_position_; 471 int start_position_;
472 int end_position_; 472 int end_position_;
473 473
474 // Computed via PropagateScopeInfo. 474 // Computed via PropagateScopeInfo.
475 bool outer_scope_calls_sloppy_eval_; 475 bool outer_scope_calls_sloppy_eval_;
476 bool inner_scope_calls_eval_; 476 bool inner_scope_calls_eval_;
477 bool inner_scope_contains_with_;
478 bool force_eager_compilation_; 477 bool force_eager_compilation_;
479 bool force_context_allocation_; 478 bool force_context_allocation_;
480 479
481 // True if it doesn't need scope resolution (e.g., if the scope was 480 // True if it doesn't need scope resolution (e.g., if the scope was
482 // constructed based on a serialized scope info or a catch context). 481 // constructed based on a serialized scope info or a catch context).
483 bool already_resolved_; 482 bool already_resolved_;
484 483
485 // Computed as variables are declared. 484 // Computed as variables are declared.
486 int num_var_or_const_; 485 int num_var_or_const_;
487 486
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // The variable potentially references a property of the 'with' object. 544 // The variable potentially references a property of the 'with' object.
546 // * The code is being executed as part of a call to 'eval' and the calling 545 // * The code is being executed as part of a call to 'eval' and the calling
547 // context chain contains either a variable binding for the name or it 546 // context chain contains either a variable binding for the name or it
548 // contains a 'with' context. 547 // contains a 'with' context.
549 DYNAMIC_LOOKUP 548 DYNAMIC_LOOKUP
550 }; 549 };
551 550
552 // Lookup a variable reference given by name recursively starting with this 551 // Lookup a variable reference given by name recursively starting with this
553 // scope. If the code is executed because of a call to 'eval', the context 552 // scope. If the code is executed because of a call to 'eval', the context
554 // parameter should be set to the calling context of 'eval'. 553 // parameter should be set to the calling context of 'eval'.
555 Variable* LookupRecursive(VariableProxy* proxy, 554 Variable* LookupRecursive(const AstRawString* name,
556 BindingKind* binding_kind, 555 BindingKind* binding_kind,
557 AstNodeFactory<AstNullVisitor>* factory); 556 AstNodeFactory<AstNullVisitor>* factory);
558 MUST_USE_RESULT 557 MUST_USE_RESULT
559 bool ResolveVariable(CompilationInfo* info, 558 bool ResolveVariable(CompilationInfo* info,
560 VariableProxy* proxy, 559 VariableProxy* proxy,
561 AstNodeFactory<AstNullVisitor>* factory); 560 AstNodeFactory<AstNullVisitor>* factory);
562 MUST_USE_RESULT 561 MUST_USE_RESULT
563 bool ResolveVariablesRecursively(CompilationInfo* info, 562 bool ResolveVariablesRecursively(CompilationInfo* info,
564 AstNodeFactory<AstNullVisitor>* factory); 563 AstNodeFactory<AstNullVisitor>* factory);
565 564
566 // Scope analysis. 565 // Scope analysis.
567 void PropagateScopeInfo(bool outer_scope_calls_sloppy_eval); 566 bool PropagateScopeInfo(bool outer_scope_calls_sloppy_eval);
568 bool HasTrivialContext() const; 567 bool HasTrivialContext() const;
569 568
570 // Predicates. 569 // Predicates.
571 bool MustAllocate(Variable* var); 570 bool MustAllocate(Variable* var);
572 bool MustAllocateInContext(Variable* var); 571 bool MustAllocateInContext(Variable* var);
573 bool HasArgumentsParameter(); 572 bool HasArgumentsParameter();
574 573
575 // Variable allocation. 574 // Variable allocation.
576 void AllocateStackSlot(Variable* var); 575 void AllocateStackSlot(Variable* var);
577 void AllocateHeapSlot(Variable* var); 576 void AllocateHeapSlot(Variable* var);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 Scope* outer_scope, 613 Scope* outer_scope,
615 Handle<ScopeInfo> scope_info); 614 Handle<ScopeInfo> scope_info);
616 615
617 AstValueFactory* ast_value_factory_; 616 AstValueFactory* ast_value_factory_;
618 Zone* zone_; 617 Zone* zone_;
619 }; 618 };
620 619
621 } } // namespace v8::internal 620 } } // namespace v8::internal
622 621
623 #endif // V8_SCOPES_H_ 622 #endif // V8_SCOPES_H_
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | src/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698