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

Side by Side Diff: src/crankshaft/typing.h

Issue 2209573002: Separate Scope into DeclarationScope and Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Move has_simple_parameters_ to DeclarationScope Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_CRANKSHAFT_TYPING_H_ 5 #ifndef V8_CRANKSHAFT_TYPING_H_
6 #define V8_CRANKSHAFT_TYPING_H_ 6 #define V8_CRANKSHAFT_TYPING_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast/ast-type-bounds.h" 9 #include "src/ast/ast-type-bounds.h"
10 #include "src/ast/ast.h" 10 #include "src/ast/ast.h"
11 #include "src/ast/scopes.h" 11 #include "src/ast/scopes.h"
12 #include "src/effects.h" 12 #include "src/effects.h"
13 #include "src/type-info.h" 13 #include "src/type-info.h"
14 #include "src/types.h" 14 #include "src/types.h"
15 #include "src/zone.h" 15 #include "src/zone.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 19
20 class AstTyper final : public AstVisitor<AstTyper> { 20 class AstTyper final : public AstVisitor<AstTyper> {
21 public: 21 public:
22 AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure, 22 AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
23 Scope* scope, BailoutId osr_ast_id, FunctionLiteral* root, 23 DeclarationScope* scope, BailoutId osr_ast_id, FunctionLiteral* root,
24 AstTypeBounds* bounds); 24 AstTypeBounds* bounds);
25 void Run(); 25 void Run();
26 26
27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 27 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
28 28
29 private: 29 private:
30 Effect ObservedOnStack(Object* value); 30 Effect ObservedOnStack(Object* value);
31 void ObserveTypesAtOsrEntry(IterationStatement* stmt); 31 void ObserveTypesAtOsrEntry(IterationStatement* stmt);
32 32
33 static const int kNoVar = INT_MIN; 33 static const int kNoVar = INT_MIN;
34 typedef v8::internal::Effects<int, kNoVar> Effects; 34 typedef v8::internal::Effects<int, kNoVar> Effects;
35 typedef v8::internal::NestedEffects<int, kNoVar> Store; 35 typedef v8::internal::NestedEffects<int, kNoVar> Store;
36 36
37 Isolate* isolate_; 37 Isolate* isolate_;
38 Zone* zone_; 38 Zone* zone_;
39 Handle<JSFunction> closure_; 39 Handle<JSFunction> closure_;
40 Scope* scope_; 40 DeclarationScope* scope_;
41 BailoutId osr_ast_id_; 41 BailoutId osr_ast_id_;
42 FunctionLiteral* root_; 42 FunctionLiteral* root_;
43 TypeFeedbackOracle oracle_; 43 TypeFeedbackOracle oracle_;
44 Store store_; 44 Store store_;
45 AstTypeBounds* bounds_; 45 AstTypeBounds* bounds_;
46 46
47 Zone* zone() const { return zone_; } 47 Zone* zone() const { return zone_; }
48 TypeFeedbackOracle* oracle() { return &oracle_; } 48 TypeFeedbackOracle* oracle() { return &oracle_; }
49 49
50 void NarrowType(Expression* e, Bounds b) { 50 void NarrowType(Expression* e, Bounds b) {
(...skipping 27 matching lines...) Expand all
78 AST_NODE_LIST(DECLARE_VISIT) 78 AST_NODE_LIST(DECLARE_VISIT)
79 #undef DECLARE_VISIT 79 #undef DECLARE_VISIT
80 80
81 DISALLOW_COPY_AND_ASSIGN(AstTyper); 81 DISALLOW_COPY_AND_ASSIGN(AstTyper);
82 }; 82 };
83 83
84 } // namespace internal 84 } // namespace internal
85 } // namespace v8 85 } // namespace v8
86 86
87 #endif // V8_CRANKSHAFT_TYPING_H_ 87 #endif // V8_CRANKSHAFT_TYPING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698