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

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

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 6 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/compiler/js-operator.cc ('k') | src/compiler/js-typed-lowering.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 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/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/compiler/graph-reducer.h" 9 #include "src/compiler/graph-reducer.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 18 matching lines...) Expand all
29 29
30 30
31 // Lowers JS-level operators to simplified operators based on types. 31 // Lowers JS-level operators to simplified operators based on types.
32 class JSTypedLowering final : public AdvancedReducer { 32 class JSTypedLowering final : public AdvancedReducer {
33 public: 33 public:
34 // Flags that control the mode of operation. 34 // Flags that control the mode of operation.
35 enum Flag { 35 enum Flag {
36 kNoFlags = 0u, 36 kNoFlags = 0u,
37 kDeoptimizationEnabled = 1u << 0, 37 kDeoptimizationEnabled = 1u << 0,
38 kDisableBinaryOpReduction = 1u << 1, 38 kDisableBinaryOpReduction = 1u << 1,
39 kTypeFeedbackEnabled = 1u << 2,
39 }; 40 };
40 typedef base::Flags<Flag> Flags; 41 typedef base::Flags<Flag> Flags;
41 42
42 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies, 43 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies,
43 Flags flags, JSGraph* jsgraph, Zone* zone); 44 Flags flags, JSGraph* jsgraph, Zone* zone);
44 ~JSTypedLowering() final {} 45 ~JSTypedLowering() final {}
45 46
46 Reduction Reduce(Node* node) final; 47 Reduction Reduce(Node* node) final;
47 48
48 private: 49 private:
(...skipping 24 matching lines...) Expand all
73 Reduction ReduceJSConvertReceiver(Node* node); 74 Reduction ReduceJSConvertReceiver(Node* node);
74 Reduction ReduceJSCallConstruct(Node* node); 75 Reduction ReduceJSCallConstruct(Node* node);
75 Reduction ReduceJSCallFunction(Node* node); 76 Reduction ReduceJSCallFunction(Node* node);
76 Reduction ReduceJSForInDone(Node* node); 77 Reduction ReduceJSForInDone(Node* node);
77 Reduction ReduceJSForInNext(Node* node); 78 Reduction ReduceJSForInNext(Node* node);
78 Reduction ReduceJSForInStep(Node* node); 79 Reduction ReduceJSForInStep(Node* node);
79 Reduction ReduceJSGeneratorStore(Node* node); 80 Reduction ReduceJSGeneratorStore(Node* node);
80 Reduction ReduceJSGeneratorRestoreContinuation(Node* node); 81 Reduction ReduceJSGeneratorRestoreContinuation(Node* node);
81 Reduction ReduceJSGeneratorRestoreRegister(Node* node); 82 Reduction ReduceJSGeneratorRestoreRegister(Node* node);
82 Reduction ReduceSelect(Node* node); 83 Reduction ReduceSelect(Node* node);
83 Reduction ReduceNumberBinop(Node* node, const Operator* numberOp); 84 Reduction ReduceJSSubtract(Node* node);
85 Reduction ReduceJSDivide(Node* node);
84 Reduction ReduceInt32Binop(Node* node, const Operator* intOp); 86 Reduction ReduceInt32Binop(Node* node, const Operator* intOp);
85 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness, 87 Reduction ReduceUI32Shift(Node* node, Signedness left_signedness,
86 const Operator* shift_op); 88 const Operator* shift_op);
87 89
88 Node* Word32Shl(Node* const lhs, int32_t const rhs); 90 Node* Word32Shl(Node* const lhs, int32_t const rhs);
89 91
90 Node* EmptyFrameState(); 92 Node* EmptyFrameState();
91 93
92 Factory* factory() const; 94 Factory* factory() const;
93 Graph* graph() const; 95 Graph* graph() const;
(...skipping 16 matching lines...) Expand all
110 TypeCache const& type_cache_; 112 TypeCache const& type_cache_;
111 }; 113 };
112 114
113 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) 115 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags)
114 116
115 } // namespace compiler 117 } // namespace compiler
116 } // namespace internal 118 } // namespace internal
117 } // namespace v8 119 } // namespace v8
118 120
119 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ 121 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_
OLDNEW
« no previous file with comments | « src/compiler/js-operator.cc ('k') | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698