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

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

Issue 2164573003: [turbofan] Introduce a TransitionElementsKind simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix the runtime fallback. Created 4 years, 5 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/simplified-lowering.cc ('k') | src/compiler/simplified-operator.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_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/operator.h" 10 #include "src/compiler/operator.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 kCheckForMinusZero, 133 kCheckForMinusZero,
134 kDontCheckForMinusZero, 134 kDontCheckForMinusZero,
135 }; 135 };
136 136
137 size_t hash_value(CheckForMinusZeroMode); 137 size_t hash_value(CheckForMinusZeroMode);
138 138
139 std::ostream& operator<<(std::ostream&, CheckForMinusZeroMode); 139 std::ostream& operator<<(std::ostream&, CheckForMinusZeroMode);
140 140
141 CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator*) WARN_UNUSED_RESULT; 141 CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator*) WARN_UNUSED_RESULT;
142 142
143 Type* TypeOf(const Operator* op) WARN_UNUSED_RESULT; 143 // A descriptor for elements kind transitions.
144 enum class ElementsTransition : uint8_t {
145 kFastTransition, // simple transition, just updating the map.
146 kSlowTransition // full transition, round-trip to the runtime.
147 };
148
149 std::ostream& operator<<(std::ostream&, ElementsTransition);
150
151 ElementsTransition ElementsTransitionOf(const Operator* op) WARN_UNUSED_RESULT;
144 152
145 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op); 153 BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op);
146 154
147 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op); 155 CompareOperationHints::Hint CompareOperationHintOf(const Operator* op);
148 156
149 // Interface for building simplified operators, which represent the 157 // Interface for building simplified operators, which represent the
150 // medium-level operations of V8, including adding numbers, allocating objects, 158 // medium-level operations of V8, including adding numbers, allocating objects,
151 // indexing into objects and arrays, etc. 159 // indexing into objects and arrays, etc.
152 // All operators are typed but many are representation independent. 160 // All operators are typed but many are representation independent.
153 161
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 const Operator* CheckFloat64Hole(CheckFloat64HoleMode); 289 const Operator* CheckFloat64Hole(CheckFloat64HoleMode);
282 const Operator* CheckTaggedHole(CheckTaggedHoleMode); 290 const Operator* CheckTaggedHole(CheckTaggedHoleMode);
283 291
284 const Operator* ObjectIsCallable(); 292 const Operator* ObjectIsCallable();
285 const Operator* ObjectIsNumber(); 293 const Operator* ObjectIsNumber();
286 const Operator* ObjectIsReceiver(); 294 const Operator* ObjectIsReceiver();
287 const Operator* ObjectIsSmi(); 295 const Operator* ObjectIsSmi();
288 const Operator* ObjectIsString(); 296 const Operator* ObjectIsString();
289 const Operator* ObjectIsUndetectable(); 297 const Operator* ObjectIsUndetectable();
290 298
299 // transition-elements-kind object, from-map, to-map
300 const Operator* TransitionElementsKind(ElementsTransition transition);
301
291 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); 302 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED);
292 303
293 const Operator* LoadField(FieldAccess const&); 304 const Operator* LoadField(FieldAccess const&);
294 const Operator* StoreField(FieldAccess const&); 305 const Operator* StoreField(FieldAccess const&);
295 306
296 // load-buffer buffer, offset, length 307 // load-buffer buffer, offset, length
297 const Operator* LoadBuffer(BufferAccess); 308 const Operator* LoadBuffer(BufferAccess);
298 309
299 // store-buffer buffer, offset, length, value 310 // store-buffer buffer, offset, length, value
300 const Operator* StoreBuffer(BufferAccess); 311 const Operator* StoreBuffer(BufferAccess);
(...skipping 11 matching lines...) Expand all
312 Zone* const zone_; 323 Zone* const zone_;
313 324
314 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 325 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
315 }; 326 };
316 327
317 } // namespace compiler 328 } // namespace compiler
318 } // namespace internal 329 } // namespace internal
319 } // namespace v8 330 } // namespace v8
320 331
321 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 332 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/simplified-lowering.cc ('k') | src/compiler/simplified-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698