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

Side by Side Diff: src/compiler/simplified-operator.h

Issue 1921563002: [turbofan] Initial version of number type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add tests for the checks and fix check insertion 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
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_SIMPLIFIED_OPERATOR_H_ 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_H_
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/compiler/type-hints.h"
10 #include "src/handles.h" 11 #include "src/handles.h"
11 #include "src/machine-type.h" 12 #include "src/machine-type.h"
12 #include "src/objects.h" 13 #include "src/objects.h"
13 14
14 namespace v8 { 15 namespace v8 {
15 namespace internal { 16 namespace internal {
16 17
17 // Forward declarations. 18 // Forward declarations.
18 class Type; 19 class Type;
19 class Zone; 20 class Zone;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 bool operator!=(ElementAccess const&, ElementAccess const&); 98 bool operator!=(ElementAccess const&, ElementAccess const&);
98 99
99 size_t hash_value(ElementAccess const&); 100 size_t hash_value(ElementAccess const&);
100 101
101 std::ostream& operator<<(std::ostream&, ElementAccess const&); 102 std::ostream& operator<<(std::ostream&, ElementAccess const&);
102 103
103 ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT; 104 ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT;
104 105
105 Type* TypeOf(const Operator* op) WARN_UNUSED_RESULT; 106 Type* TypeOf(const Operator* op) WARN_UNUSED_RESULT;
106 107
108 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op);
109
107 // Interface for building simplified operators, which represent the 110 // Interface for building simplified operators, which represent the
108 // medium-level operations of V8, including adding numbers, allocating objects, 111 // medium-level operations of V8, including adding numbers, allocating objects,
109 // indexing into objects and arrays, etc. 112 // indexing into objects and arrays, etc.
110 // All operators are typed but many are representation independent. 113 // All operators are typed but many are representation independent.
111 114
112 // Number values from JS can be in one of these representations: 115 // Number values from JS can be in one of these representations:
113 // - Tagged: word-sized integer that is either 116 // - Tagged: word-sized integer that is either
114 // - a signed small integer (31 or 32 bits plus a tag) 117 // - a signed small integer (31 or 32 bits plus a tag)
115 // - a tagged pointer to a HeapNumber object that has a float64 field 118 // - a tagged pointer to a HeapNumber object that has a float64 field
116 // - Int32: an untagged signed 32-bit integer 119 // - Int32: an untagged signed 32-bit integer
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 const Operator* NumberImul(); 153 const Operator* NumberImul();
151 const Operator* NumberClz32(); 154 const Operator* NumberClz32();
152 const Operator* NumberCeil(); 155 const Operator* NumberCeil();
153 const Operator* NumberFloor(); 156 const Operator* NumberFloor();
154 const Operator* NumberRound(); 157 const Operator* NumberRound();
155 const Operator* NumberTrunc(); 158 const Operator* NumberTrunc();
156 const Operator* NumberToInt32(); 159 const Operator* NumberToInt32();
157 const Operator* NumberToUint32(); 160 const Operator* NumberToUint32();
158 const Operator* NumberIsHoleNaN(); 161 const Operator* NumberIsHoleNaN();
159 162
163 const Operator* SpeculativeNumberAdd(BinaryOperationHints::Hint hint);
164 const Operator* SpeculativeNumberSubtract(BinaryOperationHints::Hint hint);
165
160 const Operator* ReferenceEqual(Type* type); 166 const Operator* ReferenceEqual(Type* type);
161 167
162 const Operator* StringEqual(); 168 const Operator* StringEqual();
163 const Operator* StringLessThan(); 169 const Operator* StringLessThan();
164 const Operator* StringLessThanOrEqual(); 170 const Operator* StringLessThanOrEqual();
165 const Operator* StringToNumber(); 171 const Operator* StringToNumber();
166 172
167 const Operator* ChangeTaggedSignedToInt32(); 173 const Operator* ChangeTaggedSignedToInt32();
168 const Operator* ChangeTaggedToInt32(); 174 const Operator* ChangeTaggedToInt32();
169 const Operator* ChangeTaggedToUint32(); 175 const Operator* ChangeTaggedToUint32();
170 const Operator* ChangeTaggedToFloat64(); 176 const Operator* ChangeTaggedToFloat64();
171 const Operator* ChangeInt31ToTaggedSigned(); 177 const Operator* ChangeInt31ToTaggedSigned();
172 const Operator* ChangeInt32ToTagged(); 178 const Operator* ChangeInt32ToTagged();
173 const Operator* ChangeUint32ToTagged(); 179 const Operator* ChangeUint32ToTagged();
174 const Operator* ChangeFloat64ToTagged(); 180 const Operator* ChangeFloat64ToTagged();
175 const Operator* ChangeTaggedToBit(); 181 const Operator* ChangeTaggedToBit();
176 const Operator* ChangeBitToTagged(); 182 const Operator* ChangeBitToTagged();
177 const Operator* TruncateTaggedToWord32(); 183 const Operator* TruncateTaggedToWord32();
178 184
185 const Operator* CheckedUint32ToInt32();
186 const Operator* CheckedFloat64ToInt32();
187 const Operator* CheckedTaggedToInt32();
188 const Operator* CheckedTaggedToFloat64();
189
179 const Operator* ObjectIsCallable(); 190 const Operator* ObjectIsCallable();
180 const Operator* ObjectIsNumber(); 191 const Operator* ObjectIsNumber();
181 const Operator* ObjectIsReceiver(); 192 const Operator* ObjectIsReceiver();
182 const Operator* ObjectIsSmi(); 193 const Operator* ObjectIsSmi();
183 const Operator* ObjectIsString(); 194 const Operator* ObjectIsString();
184 const Operator* ObjectIsUndetectable(); 195 const Operator* ObjectIsUndetectable();
185 196
186 const Operator* TypeGuard(Type* type); 197 const Operator* TypeGuard(Type* type);
187 198
188 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); 199 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED);
(...skipping 20 matching lines...) Expand all
209 Zone* const zone_; 220 Zone* const zone_;
210 221
211 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 222 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
212 }; 223 };
213 224
214 } // namespace compiler 225 } // namespace compiler
215 } // namespace internal 226 } // namespace internal
216 } // namespace v8 227 } // namespace v8
217 228
218 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 229 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698