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

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

Issue 2227493002: [turbofan] Add initial support for growing stores. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comments. Created 4 years, 4 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 kCheckForMinusZero, 134 kCheckForMinusZero,
135 kDontCheckForMinusZero, 135 kDontCheckForMinusZero,
136 }; 136 };
137 137
138 size_t hash_value(CheckForMinusZeroMode); 138 size_t hash_value(CheckForMinusZeroMode);
139 139
140 std::ostream& operator<<(std::ostream&, CheckForMinusZeroMode); 140 std::ostream& operator<<(std::ostream&, CheckForMinusZeroMode);
141 141
142 CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator*) WARN_UNUSED_RESULT; 142 CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator*) WARN_UNUSED_RESULT;
143 143
144 // A descriptor for growing elements backing stores.
145 enum class GrowFastElementsFlag : uint8_t {
146 kNone = 0u,
147 kArrayObject = 1u << 0, // Update JSArray::length field.
148 kHoleyElements = 1u << 1, // Backing store is holey.
149 kDoubleElements = 1u << 2, // Backing store contains doubles.
150 };
151 typedef base::Flags<GrowFastElementsFlag> GrowFastElementsFlags;
152
153 DEFINE_OPERATORS_FOR_FLAGS(GrowFastElementsFlags)
154
155 std::ostream& operator<<(std::ostream&, GrowFastElementsFlags);
156
157 GrowFastElementsFlags GrowFastElementsFlagsOf(const Operator*)
158 WARN_UNUSED_RESULT;
159
144 // A descriptor for elements kind transitions. 160 // A descriptor for elements kind transitions.
145 enum class ElementsTransition : uint8_t { 161 enum class ElementsTransition : uint8_t {
146 kFastTransition, // simple transition, just updating the map. 162 kFastTransition, // simple transition, just updating the map.
147 kSlowTransition // full transition, round-trip to the runtime. 163 kSlowTransition // full transition, round-trip to the runtime.
148 }; 164 };
149 165
150 size_t hash_value(ElementsTransition); 166 size_t hash_value(ElementsTransition);
151 167
152 std::ostream& operator<<(std::ostream&, ElementsTransition); 168 std::ostream& operator<<(std::ostream&, ElementsTransition);
153 169
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 const Operator* ObjectIsCallable(); 332 const Operator* ObjectIsCallable();
317 const Operator* ObjectIsNumber(); 333 const Operator* ObjectIsNumber();
318 const Operator* ObjectIsReceiver(); 334 const Operator* ObjectIsReceiver();
319 const Operator* ObjectIsSmi(); 335 const Operator* ObjectIsSmi();
320 const Operator* ObjectIsString(); 336 const Operator* ObjectIsString();
321 const Operator* ObjectIsUndetectable(); 337 const Operator* ObjectIsUndetectable();
322 338
323 // ensure-writable-fast-elements object, elements 339 // ensure-writable-fast-elements object, elements
324 const Operator* EnsureWritableFastElements(); 340 const Operator* EnsureWritableFastElements();
325 341
342 // maybe-grow-fast-elements object, elements, index, length
343 const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags);
344
326 // transition-elements-kind object, from-map, to-map 345 // transition-elements-kind object, from-map, to-map
327 const Operator* TransitionElementsKind(ElementsTransition transition); 346 const Operator* TransitionElementsKind(ElementsTransition transition);
328 347
329 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); 348 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED);
330 349
331 const Operator* LoadField(FieldAccess const&); 350 const Operator* LoadField(FieldAccess const&);
332 const Operator* StoreField(FieldAccess const&); 351 const Operator* StoreField(FieldAccess const&);
333 352
334 // load-buffer buffer, offset, length 353 // load-buffer buffer, offset, length
335 const Operator* LoadBuffer(BufferAccess); 354 const Operator* LoadBuffer(BufferAccess);
(...skipping 20 matching lines...) Expand all
356 Zone* const zone_; 375 Zone* const zone_;
357 376
358 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 377 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
359 }; 378 };
360 379
361 } // namespace compiler 380 } // namespace compiler
362 } // namespace internal 381 } // namespace internal
363 } // namespace v8 382 } // namespace v8
364 383
365 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 384 #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