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

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

Issue 2302283002: Forking the type system between Crankshaft & Turbofan. (Closed)
Patch Set: Nits. Created 4 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/crankshaft/hydrogen-types.cc ('k') | src/crankshaft/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_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-types.h"
10 #include "src/ast/scopes.h" 11 #include "src/ast/scopes.h"
11 #include "src/ast/variables.h" 12 #include "src/ast/variables.h"
12 #include "src/effects.h" 13 #include "src/effects.h"
13 #include "src/type-info.h" 14 #include "src/type-info.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 FunctionLiteral; 20 class FunctionLiteral;
21 21
22 class AstTyper final : public AstVisitor<AstTyper> { 22 class AstTyper final : public AstVisitor<AstTyper> {
23 public: 23 public:
24 AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure, 24 AstTyper(Isolate* isolate, Zone* zone, Handle<JSFunction> closure,
(...skipping 17 matching lines...) Expand all
42 DeclarationScope* scope_; 42 DeclarationScope* scope_;
43 BailoutId osr_ast_id_; 43 BailoutId osr_ast_id_;
44 FunctionLiteral* root_; 44 FunctionLiteral* root_;
45 TypeFeedbackOracle oracle_; 45 TypeFeedbackOracle oracle_;
46 Store store_; 46 Store store_;
47 AstTypeBounds* bounds_; 47 AstTypeBounds* bounds_;
48 48
49 Zone* zone() const { return zone_; } 49 Zone* zone() const { return zone_; }
50 TypeFeedbackOracle* oracle() { return &oracle_; } 50 TypeFeedbackOracle* oracle() { return &oracle_; }
51 51
52 void NarrowType(Expression* e, Bounds b) { 52 void NarrowType(Expression* e, AstBounds b) {
53 bounds_->set(e, Bounds::Both(bounds_->get(e), b, zone())); 53 bounds_->set(e, AstBounds::Both(bounds_->get(e), b, zone()));
54 } 54 }
55 void NarrowLowerType(Expression* e, Type* t) { 55 void NarrowLowerType(Expression* e, AstType* t) {
56 bounds_->set(e, Bounds::NarrowLower(bounds_->get(e), t, zone())); 56 bounds_->set(e, AstBounds::NarrowLower(bounds_->get(e), t, zone()));
57 } 57 }
58 58
59 Effects EnterEffects() { 59 Effects EnterEffects() {
60 store_ = store_.Push(); 60 store_ = store_.Push();
61 return store_.Top(); 61 return store_.Top();
62 } 62 }
63 void ExitEffects() { store_ = store_.Pop(); } 63 void ExitEffects() { store_ = store_.Pop(); }
64 64
65 int parameter_index(int index) { return -index - 2; } 65 int parameter_index(int index) { return -index - 2; }
66 int stack_local_index(int index) { return index; } 66 int stack_local_index(int index) { return index; }
(...skipping 13 matching lines...) Expand all
80 AST_NODE_LIST(DECLARE_VISIT) 80 AST_NODE_LIST(DECLARE_VISIT)
81 #undef DECLARE_VISIT 81 #undef DECLARE_VISIT
82 82
83 DISALLOW_COPY_AND_ASSIGN(AstTyper); 83 DISALLOW_COPY_AND_ASSIGN(AstTyper);
84 }; 84 };
85 85
86 } // namespace internal 86 } // namespace internal
87 } // namespace v8 87 } // namespace v8
88 88
89 #endif // V8_CRANKSHAFT_TYPING_H_ 89 #endif // V8_CRANKSHAFT_TYPING_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-types.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698