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

Side by Side Diff: src/compiler/js-typed-lowering.h

Issue 1407413014: [turbofan] Pseudo-inline instanceof (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Pre-dinner try Created 5 years, 1 month 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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_JS_TYPED_LOWERING_H_ 5 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_
6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ 6 #define V8_COMPILER_JS_TYPED_LOWERING_H_
7 7
8 #include "src/compilation-dependencies.h"
Michael Starzinger 2015/11/09 19:59:59 nit: The class can be forward-declared, no need fo
sigurds 2015/11/10 09:39:44 Done.
8 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
9 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
10 11
11 namespace v8 { 12 namespace v8 {
12 namespace internal { 13 namespace internal {
13 14
14 // Forward declarations. 15 // Forward declarations.
15 class Factory; 16 class Factory;
16 17
17 18
18 namespace compiler { 19 namespace compiler {
19 20
20 // Forward declarations. 21 // Forward declarations.
21 class CommonOperatorBuilder; 22 class CommonOperatorBuilder;
22 class JSGraph; 23 class JSGraph;
23 class JSOperatorBuilder; 24 class JSOperatorBuilder;
24 class MachineOperatorBuilder; 25 class MachineOperatorBuilder;
25 class SimplifiedOperatorBuilder; 26 class SimplifiedOperatorBuilder;
26 27
27 28
28 // Lowers JS-level operators to simplified operators based on types. 29 // Lowers JS-level operators to simplified operators based on types.
29 class JSTypedLowering final : public AdvancedReducer { 30 class JSTypedLowering final : public AdvancedReducer {
30 public: 31 public:
31 JSTypedLowering(Editor* editor, JSGraph* jsgraph, Zone* zone); 32 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies,
33 JSGraph* jsgraph, Zone* zone);
32 ~JSTypedLowering() final {} 34 ~JSTypedLowering() final {}
33 35
34 Reduction Reduce(Node* node) final; 36 Reduction Reduce(Node* node) final;
35 37
36 private: 38 private:
37 friend class JSBinopReduction; 39 friend class JSBinopReduction;
38 40
39 Reduction ReduceJSAdd(Node* node); 41 Reduction ReduceJSAdd(Node* node);
40 Reduction ReduceJSModulus(Node* node); 42 Reduction ReduceJSModulus(Node* node);
41 Reduction ReduceJSBitwiseOr(Node* node); 43 Reduction ReduceJSBitwiseOr(Node* node);
42 Reduction ReduceJSMultiply(Node* node); 44 Reduction ReduceJSMultiply(Node* node);
43 Reduction ReduceJSComparison(Node* node); 45 Reduction ReduceJSComparison(Node* node);
44 Reduction ReduceJSLoadNamed(Node* node); 46 Reduction ReduceJSLoadNamed(Node* node);
45 Reduction ReduceJSLoadProperty(Node* node); 47 Reduction ReduceJSLoadProperty(Node* node);
46 Reduction ReduceJSStoreProperty(Node* node); 48 Reduction ReduceJSStoreProperty(Node* node);
49 Reduction ReduceJSInstanceOf(Node* node);
47 Reduction ReduceJSLoadContext(Node* node); 50 Reduction ReduceJSLoadContext(Node* node);
48 Reduction ReduceJSStoreContext(Node* node); 51 Reduction ReduceJSStoreContext(Node* node);
49 Reduction ReduceJSEqual(Node* node, bool invert); 52 Reduction ReduceJSEqual(Node* node, bool invert);
50 Reduction ReduceJSStrictEqual(Node* node, bool invert); 53 Reduction ReduceJSStrictEqual(Node* node, bool invert);
51 Reduction ReduceJSUnaryNot(Node* node); 54 Reduction ReduceJSUnaryNot(Node* node);
52 Reduction ReduceJSToBoolean(Node* node); 55 Reduction ReduceJSToBoolean(Node* node);
53 Reduction ReduceJSToNumberInput(Node* input); 56 Reduction ReduceJSToNumberInput(Node* input);
54 Reduction ReduceJSToNumber(Node* node); 57 Reduction ReduceJSToNumber(Node* node);
55 Reduction ReduceJSToStringInput(Node* input); 58 Reduction ReduceJSToStringInput(Node* input);
56 Reduction ReduceJSToString(Node* node); 59 Reduction ReduceJSToString(Node* node);
(...skipping 23 matching lines...) Expand all
80 bool* has_aliased_arguments); 83 bool* has_aliased_arguments);
81 84
82 Factory* factory() const; 85 Factory* factory() const;
83 Graph* graph() const; 86 Graph* graph() const;
84 JSGraph* jsgraph() const { return jsgraph_; } 87 JSGraph* jsgraph() const { return jsgraph_; }
85 Isolate* isolate() const; 88 Isolate* isolate() const;
86 JSOperatorBuilder* javascript() const; 89 JSOperatorBuilder* javascript() const;
87 CommonOperatorBuilder* common() const; 90 CommonOperatorBuilder* common() const;
88 SimplifiedOperatorBuilder* simplified() const; 91 SimplifiedOperatorBuilder* simplified() const;
89 MachineOperatorBuilder* machine() const; 92 MachineOperatorBuilder* machine() const;
93 CompilationDependencies* dependencies() const;
90 94
91 // Limits up to which context allocations are inlined. 95 // Limits up to which context allocations are inlined.
92 static const int kFunctionContextAllocationLimit = 16; 96 static const int kFunctionContextAllocationLimit = 16;
93 static const int kBlockContextAllocationLimit = 16; 97 static const int kBlockContextAllocationLimit = 16;
94 98
99 CompilationDependencies* dependencies_;
95 JSGraph* jsgraph_; 100 JSGraph* jsgraph_;
96 Type* shifted_int32_ranges_[4]; 101 Type* shifted_int32_ranges_[4];
97 }; 102 };
98 103
99 } // namespace compiler 104 } // namespace compiler
100 } // namespace internal 105 } // namespace internal
101 } // namespace v8 106 } // namespace v8
102 107
103 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ 108 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698