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

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

Issue 2797993006: [turbofan] Add type to the allocation operator. (Closed)
Patch Set: Rename Created 3 years, 8 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/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 size_t hash_value(NumberOperationHint); 238 size_t hash_value(NumberOperationHint);
239 239
240 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, NumberOperationHint); 240 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, NumberOperationHint);
241 241
242 NumberOperationHint NumberOperationHintOf(const Operator* op) 242 NumberOperationHint NumberOperationHintOf(const Operator* op)
243 WARN_UNUSED_RESULT; 243 WARN_UNUSED_RESULT;
244 244
245 int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT; 245 int FormalParameterCountOf(const Operator* op) WARN_UNUSED_RESULT;
246 bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT; 246 bool IsRestLengthOf(const Operator* op) WARN_UNUSED_RESULT;
247 247
248 struct AllocationParameters {
Benedikt Meurer 2017/04/06 12:08:05 Nit: AllocateParameters
Jarin 2017/04/06 15:11:29 Done.
249 Type* type;
Benedikt Meurer 2017/04/06 12:08:05 Can we please stick to classes here?
Jarin 2017/04/06 15:11:29 Done. Out of curiosity, what is the rationale beh
Benedikt Meurer 2017/04/06 17:22:28 I'd like to have some consistency. Switching to st
250 PretenureFlag pretenure;
251
252 AllocationParameters(Type* type, PretenureFlag pretenure)
253 : type(type), pretenure(pretenure) {}
254 };
255
256 size_t hash_value(AllocationParameters);
257
258 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, AllocationParameters);
259
260 bool operator==(AllocationParameters const&, AllocationParameters const&);
261 bool operator!=(AllocationParameters const&, AllocationParameters const&);
262
248 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT; 263 PretenureFlag PretenureFlagOf(const Operator* op) WARN_UNUSED_RESULT;
249 264
265 Type* AllocateTypeOf(const Operator* op) WARN_UNUSED_RESULT;
266
250 UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT; 267 UnicodeEncoding UnicodeEncodingOf(const Operator*) WARN_UNUSED_RESULT;
251 268
252 // Interface for building simplified operators, which represent the 269 // Interface for building simplified operators, which represent the
253 // medium-level operations of V8, including adding numbers, allocating objects, 270 // medium-level operations of V8, including adding numbers, allocating objects,
254 // indexing into objects and arrays, etc. 271 // indexing into objects and arrays, etc.
255 // All operators are typed but many are representation independent. 272 // All operators are typed but many are representation independent.
256 273
257 // Number values from JS can be in one of these representations: 274 // Number values from JS can be in one of these representations:
258 // - Tagged: word-sized integer that is either 275 // - Tagged: word-sized integer that is either
259 // - a signed small integer (31 or 32 bits plus a tag) 276 // - a signed small integer (31 or 32 bits plus a tag)
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 452
436 // ensure-writable-fast-elements object, elements 453 // ensure-writable-fast-elements object, elements
437 const Operator* EnsureWritableFastElements(); 454 const Operator* EnsureWritableFastElements();
438 455
439 // maybe-grow-fast-elements object, elements, index, length 456 // maybe-grow-fast-elements object, elements, index, length
440 const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags); 457 const Operator* MaybeGrowFastElements(GrowFastElementsFlags flags);
441 458
442 // transition-elements-kind object, from-map, to-map 459 // transition-elements-kind object, from-map, to-map
443 const Operator* TransitionElementsKind(ElementsTransition transition); 460 const Operator* TransitionElementsKind(ElementsTransition transition);
444 461
445 const Operator* Allocate(PretenureFlag pretenure = NOT_TENURED); 462 const Operator* Allocate(Type* type, PretenureFlag pretenure = NOT_TENURED);
446 463
447 const Operator* LoadField(FieldAccess const&); 464 const Operator* LoadField(FieldAccess const&);
448 const Operator* StoreField(FieldAccess const&); 465 const Operator* StoreField(FieldAccess const&);
449 466
450 // load-buffer buffer, offset, length 467 // load-buffer buffer, offset, length
451 const Operator* LoadBuffer(BufferAccess); 468 const Operator* LoadBuffer(BufferAccess);
452 469
453 // store-buffer buffer, offset, length, value 470 // store-buffer buffer, offset, length, value
454 const Operator* StoreBuffer(BufferAccess); 471 const Operator* StoreBuffer(BufferAccess);
455 472
(...skipping 16 matching lines...) Expand all
472 Zone* const zone_; 489 Zone* const zone_;
473 490
474 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 491 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
475 }; 492 };
476 493
477 } // namespace compiler 494 } // namespace compiler
478 } // namespace internal 495 } // namespace internal
479 } // namespace v8 496 } // namespace v8
480 497
481 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 498 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698