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

Side by Side Diff: src/typing.h

Issue 1318823010: Eliminate use of CompilationInfo in several AstVisitor descendants. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 3 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 | « src/hydrogen.cc ('k') | src/typing.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 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_TYPING_H_ 5 #ifndef V8_TYPING_H_
6 #define V8_TYPING_H_ 6 #define V8_TYPING_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/ast.h" 9 #include "src/ast.h"
10 #include "src/effects.h" 10 #include "src/effects.h"
11 #include "src/scopes.h" 11 #include "src/scopes.h"
12 #include "src/type-info.h" 12 #include "src/type-info.h"
13 #include "src/types.h" 13 #include "src/types.h"
14 #include "src/zone.h" 14 #include "src/zone.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 19
20 class AstTyper: public AstVisitor { 20 class AstTyper: public AstVisitor {
21 public: 21 public:
22 explicit AstTyper(CompilationInfo* info); 22 AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
23 Scope* scope, BailoutId osr_ast_id, FunctionLiteral* root);
23 void Run(); 24 void Run();
24 25
25 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 26 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
26 27
27 private: 28 private:
28 Effect ObservedOnStack(Object* value); 29 Effect ObservedOnStack(Object* value);
29 void ObserveTypesAtOsrEntry(IterationStatement* stmt); 30 void ObserveTypesAtOsrEntry(IterationStatement* stmt);
30 31
31 static const int kNoVar = INT_MIN; 32 static const int kNoVar = INT_MIN;
32 typedef v8::internal::Effects<int, kNoVar> Effects; 33 typedef v8::internal::Effects<int, kNoVar> Effects;
33 typedef v8::internal::NestedEffects<int, kNoVar> Store; 34 typedef v8::internal::NestedEffects<int, kNoVar> Store;
34 35
35 CompilationInfo* info_; 36 Handle<JSFunction> closure_;
37 Scope* scope_;
38 BailoutId osr_ast_id_;
39 FunctionLiteral* root_;
36 TypeFeedbackOracle oracle_; 40 TypeFeedbackOracle oracle_;
37 Store store_; 41 Store store_;
38 42
39 TypeFeedbackOracle* oracle() { return &oracle_; } 43 TypeFeedbackOracle* oracle() { return &oracle_; }
40 44
41 void NarrowType(Expression* e, Bounds b) { 45 void NarrowType(Expression* e, Bounds b) {
42 e->set_bounds(Bounds::Both(e->bounds(), b, zone())); 46 e->set_bounds(Bounds::Both(e->bounds(), b, zone()));
43 } 47 }
44 void NarrowLowerType(Expression* e, Type* t) { 48 void NarrowLowerType(Expression* e, Type* t) {
45 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone())); 49 e->set_bounds(Bounds::NarrowLower(e->bounds(), t, zone()));
(...skipping 22 matching lines...) Expand all
68 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override; 72 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
69 AST_NODE_LIST(DECLARE_VISIT) 73 AST_NODE_LIST(DECLARE_VISIT)
70 #undef DECLARE_VISIT 74 #undef DECLARE_VISIT
71 75
72 DISALLOW_COPY_AND_ASSIGN(AstTyper); 76 DISALLOW_COPY_AND_ASSIGN(AstTyper);
73 }; 77 };
74 78
75 } } // namespace v8::internal 79 } } // namespace v8::internal
76 80
77 #endif // V8_TYPING_H_ 81 #endif // V8_TYPING_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698