OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/compiler/simplified-operator.h" | 5 #include "src/compiler/simplified-operator.h" |
6 | 6 |
7 #include "src/base/lazy-instance.h" | 7 #include "src/base/lazy-instance.h" |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/types.h" | 10 #include "src/types.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 switch (mode) { | 222 switch (mode) { |
223 case CheckForMinusZeroMode::kCheckForMinusZero: | 223 case CheckForMinusZeroMode::kCheckForMinusZero: |
224 return os << "check-for-minus-zero"; | 224 return os << "check-for-minus-zero"; |
225 case CheckForMinusZeroMode::kDontCheckForMinusZero: | 225 case CheckForMinusZeroMode::kDontCheckForMinusZero: |
226 return os << "dont-check-for-minus-zero"; | 226 return os << "dont-check-for-minus-zero"; |
227 } | 227 } |
228 UNREACHABLE(); | 228 UNREACHABLE(); |
229 return os; | 229 return os; |
230 } | 230 } |
231 | 231 |
232 size_t hash_value(CheckTaggedHoleMode mode) { | |
233 return static_cast<size_t>(mode); | |
234 } | |
235 | |
236 std::ostream& operator<<(std::ostream& os, CheckTaggedHoleMode mode) { | |
237 switch (mode) { | |
238 case CheckTaggedHoleMode::kConvertHoleToUndefined: | |
239 return os << "convert-hole-to-undefined"; | |
240 case CheckTaggedHoleMode::kNeverReturnHole: | |
241 return os << "never-return-hole"; | |
242 } | |
243 UNREACHABLE(); | |
244 return os; | |
245 } | |
246 | |
247 CheckTaggedHoleMode CheckTaggedHoleModeOf(const Operator* op) { | |
248 DCHECK_EQ(IrOpcode::kCheckTaggedHole, op->opcode()); | |
249 return OpParameter<CheckTaggedHoleMode>(op); | |
250 } | |
251 | |
252 size_t hash_value(CheckTaggedInputMode mode) { | 232 size_t hash_value(CheckTaggedInputMode mode) { |
253 return static_cast<size_t>(mode); | 233 return static_cast<size_t>(mode); |
254 } | 234 } |
255 | 235 |
256 std::ostream& operator<<(std::ostream& os, CheckTaggedInputMode mode) { | 236 std::ostream& operator<<(std::ostream& os, CheckTaggedInputMode mode) { |
257 switch (mode) { | 237 switch (mode) { |
258 case CheckTaggedInputMode::kNumber: | 238 case CheckTaggedInputMode::kNumber: |
259 return os << "Number"; | 239 return os << "Number"; |
260 case CheckTaggedInputMode::kNumberOrOddball: | 240 case CheckTaggedInputMode::kNumberOrOddball: |
261 return os << "NumberOrOddball"; | 241 return os << "NumberOrOddball"; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical || | 324 op->opcode() == IrOpcode::kSpeculativeNumberShiftRightLogical || |
345 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseAnd || | 325 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseAnd || |
346 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseOr || | 326 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseOr || |
347 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseXor || | 327 op->opcode() == IrOpcode::kSpeculativeNumberBitwiseXor || |
348 op->opcode() == IrOpcode::kSpeculativeNumberEqual || | 328 op->opcode() == IrOpcode::kSpeculativeNumberEqual || |
349 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || | 329 op->opcode() == IrOpcode::kSpeculativeNumberLessThan || |
350 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); | 330 op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); |
351 return OpParameter<NumberOperationHint>(op); | 331 return OpParameter<NumberOperationHint>(op); |
352 } | 332 } |
353 | 333 |
354 #define PURE_OP_LIST(V) \ | 334 #define PURE_OP_LIST(V) \ |
355 V(BooleanNot, Operator::kNoProperties, 1, 0) \ | 335 V(BooleanNot, Operator::kNoProperties, 1, 0) \ |
356 V(NumberEqual, Operator::kCommutative, 2, 0) \ | 336 V(NumberEqual, Operator::kCommutative, 2, 0) \ |
357 V(NumberLessThan, Operator::kNoProperties, 2, 0) \ | 337 V(NumberLessThan, Operator::kNoProperties, 2, 0) \ |
358 V(NumberLessThanOrEqual, Operator::kNoProperties, 2, 0) \ | 338 V(NumberLessThanOrEqual, Operator::kNoProperties, 2, 0) \ |
359 V(NumberAdd, Operator::kCommutative, 2, 0) \ | 339 V(NumberAdd, Operator::kCommutative, 2, 0) \ |
360 V(NumberSubtract, Operator::kNoProperties, 2, 0) \ | 340 V(NumberSubtract, Operator::kNoProperties, 2, 0) \ |
361 V(NumberMultiply, Operator::kCommutative, 2, 0) \ | 341 V(NumberMultiply, Operator::kCommutative, 2, 0) \ |
362 V(NumberDivide, Operator::kNoProperties, 2, 0) \ | 342 V(NumberDivide, Operator::kNoProperties, 2, 0) \ |
363 V(NumberModulus, Operator::kNoProperties, 2, 0) \ | 343 V(NumberModulus, Operator::kNoProperties, 2, 0) \ |
364 V(NumberBitwiseOr, Operator::kCommutative, 2, 0) \ | 344 V(NumberBitwiseOr, Operator::kCommutative, 2, 0) \ |
365 V(NumberBitwiseXor, Operator::kCommutative, 2, 0) \ | 345 V(NumberBitwiseXor, Operator::kCommutative, 2, 0) \ |
366 V(NumberBitwiseAnd, Operator::kCommutative, 2, 0) \ | 346 V(NumberBitwiseAnd, Operator::kCommutative, 2, 0) \ |
367 V(NumberShiftLeft, Operator::kNoProperties, 2, 0) \ | 347 V(NumberShiftLeft, Operator::kNoProperties, 2, 0) \ |
368 V(NumberShiftRight, Operator::kNoProperties, 2, 0) \ | 348 V(NumberShiftRight, Operator::kNoProperties, 2, 0) \ |
369 V(NumberShiftRightLogical, Operator::kNoProperties, 2, 0) \ | 349 V(NumberShiftRightLogical, Operator::kNoProperties, 2, 0) \ |
370 V(NumberImul, Operator::kCommutative, 2, 0) \ | 350 V(NumberImul, Operator::kCommutative, 2, 0) \ |
371 V(NumberAbs, Operator::kNoProperties, 1, 0) \ | 351 V(NumberAbs, Operator::kNoProperties, 1, 0) \ |
372 V(NumberClz32, Operator::kNoProperties, 1, 0) \ | 352 V(NumberClz32, Operator::kNoProperties, 1, 0) \ |
373 V(NumberCeil, Operator::kNoProperties, 1, 0) \ | 353 V(NumberCeil, Operator::kNoProperties, 1, 0) \ |
374 V(NumberFloor, Operator::kNoProperties, 1, 0) \ | 354 V(NumberFloor, Operator::kNoProperties, 1, 0) \ |
375 V(NumberFround, Operator::kNoProperties, 1, 0) \ | 355 V(NumberFround, Operator::kNoProperties, 1, 0) \ |
376 V(NumberAcos, Operator::kNoProperties, 1, 0) \ | 356 V(NumberAcos, Operator::kNoProperties, 1, 0) \ |
377 V(NumberAcosh, Operator::kNoProperties, 1, 0) \ | 357 V(NumberAcosh, Operator::kNoProperties, 1, 0) \ |
378 V(NumberAsin, Operator::kNoProperties, 1, 0) \ | 358 V(NumberAsin, Operator::kNoProperties, 1, 0) \ |
379 V(NumberAsinh, Operator::kNoProperties, 1, 0) \ | 359 V(NumberAsinh, Operator::kNoProperties, 1, 0) \ |
380 V(NumberAtan, Operator::kNoProperties, 1, 0) \ | 360 V(NumberAtan, Operator::kNoProperties, 1, 0) \ |
381 V(NumberAtan2, Operator::kNoProperties, 2, 0) \ | 361 V(NumberAtan2, Operator::kNoProperties, 2, 0) \ |
382 V(NumberAtanh, Operator::kNoProperties, 1, 0) \ | 362 V(NumberAtanh, Operator::kNoProperties, 1, 0) \ |
383 V(NumberCbrt, Operator::kNoProperties, 1, 0) \ | 363 V(NumberCbrt, Operator::kNoProperties, 1, 0) \ |
384 V(NumberCos, Operator::kNoProperties, 1, 0) \ | 364 V(NumberCos, Operator::kNoProperties, 1, 0) \ |
385 V(NumberCosh, Operator::kNoProperties, 1, 0) \ | 365 V(NumberCosh, Operator::kNoProperties, 1, 0) \ |
386 V(NumberExp, Operator::kNoProperties, 1, 0) \ | 366 V(NumberExp, Operator::kNoProperties, 1, 0) \ |
387 V(NumberExpm1, Operator::kNoProperties, 1, 0) \ | 367 V(NumberExpm1, Operator::kNoProperties, 1, 0) \ |
388 V(NumberLog, Operator::kNoProperties, 1, 0) \ | 368 V(NumberLog, Operator::kNoProperties, 1, 0) \ |
389 V(NumberLog1p, Operator::kNoProperties, 1, 0) \ | 369 V(NumberLog1p, Operator::kNoProperties, 1, 0) \ |
390 V(NumberLog10, Operator::kNoProperties, 1, 0) \ | 370 V(NumberLog10, Operator::kNoProperties, 1, 0) \ |
391 V(NumberLog2, Operator::kNoProperties, 1, 0) \ | 371 V(NumberLog2, Operator::kNoProperties, 1, 0) \ |
392 V(NumberMax, Operator::kNoProperties, 2, 0) \ | 372 V(NumberMax, Operator::kNoProperties, 2, 0) \ |
393 V(NumberMin, Operator::kNoProperties, 2, 0) \ | 373 V(NumberMin, Operator::kNoProperties, 2, 0) \ |
394 V(NumberPow, Operator::kNoProperties, 2, 0) \ | 374 V(NumberPow, Operator::kNoProperties, 2, 0) \ |
395 V(NumberRound, Operator::kNoProperties, 1, 0) \ | 375 V(NumberRound, Operator::kNoProperties, 1, 0) \ |
396 V(NumberSign, Operator::kNoProperties, 1, 0) \ | 376 V(NumberSign, Operator::kNoProperties, 1, 0) \ |
397 V(NumberSin, Operator::kNoProperties, 1, 0) \ | 377 V(NumberSin, Operator::kNoProperties, 1, 0) \ |
398 V(NumberSinh, Operator::kNoProperties, 1, 0) \ | 378 V(NumberSinh, Operator::kNoProperties, 1, 0) \ |
399 V(NumberSqrt, Operator::kNoProperties, 1, 0) \ | 379 V(NumberSqrt, Operator::kNoProperties, 1, 0) \ |
400 V(NumberTan, Operator::kNoProperties, 1, 0) \ | 380 V(NumberTan, Operator::kNoProperties, 1, 0) \ |
401 V(NumberTanh, Operator::kNoProperties, 1, 0) \ | 381 V(NumberTanh, Operator::kNoProperties, 1, 0) \ |
402 V(NumberTrunc, Operator::kNoProperties, 1, 0) \ | 382 V(NumberTrunc, Operator::kNoProperties, 1, 0) \ |
403 V(NumberToInt32, Operator::kNoProperties, 1, 0) \ | 383 V(NumberToInt32, Operator::kNoProperties, 1, 0) \ |
404 V(NumberToUint32, Operator::kNoProperties, 1, 0) \ | 384 V(NumberToUint32, Operator::kNoProperties, 1, 0) \ |
405 V(NumberSilenceNaN, Operator::kNoProperties, 1, 0) \ | 385 V(NumberSilenceNaN, Operator::kNoProperties, 1, 0) \ |
406 V(StringCharCodeAt, Operator::kNoProperties, 2, 1) \ | 386 V(StringCharCodeAt, Operator::kNoProperties, 2, 1) \ |
407 V(StringFromCharCode, Operator::kNoProperties, 1, 0) \ | 387 V(StringFromCharCode, Operator::kNoProperties, 1, 0) \ |
408 V(PlainPrimitiveToNumber, Operator::kNoProperties, 1, 0) \ | 388 V(PlainPrimitiveToNumber, Operator::kNoProperties, 1, 0) \ |
409 V(PlainPrimitiveToWord32, Operator::kNoProperties, 1, 0) \ | 389 V(PlainPrimitiveToWord32, Operator::kNoProperties, 1, 0) \ |
410 V(PlainPrimitiveToFloat64, Operator::kNoProperties, 1, 0) \ | 390 V(PlainPrimitiveToFloat64, Operator::kNoProperties, 1, 0) \ |
411 V(ChangeTaggedSignedToInt32, Operator::kNoProperties, 1, 0) \ | 391 V(ChangeTaggedSignedToInt32, Operator::kNoProperties, 1, 0) \ |
412 V(ChangeTaggedToInt32, Operator::kNoProperties, 1, 0) \ | 392 V(ChangeTaggedToInt32, Operator::kNoProperties, 1, 0) \ |
413 V(ChangeTaggedToUint32, Operator::kNoProperties, 1, 0) \ | 393 V(ChangeTaggedToUint32, Operator::kNoProperties, 1, 0) \ |
414 V(ChangeTaggedToFloat64, Operator::kNoProperties, 1, 0) \ | 394 V(ChangeTaggedToFloat64, Operator::kNoProperties, 1, 0) \ |
415 V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1, 0) \ | 395 V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1, 0) \ |
416 V(ChangeInt32ToTagged, Operator::kNoProperties, 1, 0) \ | 396 V(ChangeInt32ToTagged, Operator::kNoProperties, 1, 0) \ |
417 V(ChangeUint32ToTagged, Operator::kNoProperties, 1, 0) \ | 397 V(ChangeUint32ToTagged, Operator::kNoProperties, 1, 0) \ |
418 V(ChangeFloat64ToTagged, Operator::kNoProperties, 1, 0) \ | 398 V(ChangeFloat64ToTagged, Operator::kNoProperties, 1, 0) \ |
419 V(ChangeTaggedToBit, Operator::kNoProperties, 1, 0) \ | 399 V(ChangeTaggedToBit, Operator::kNoProperties, 1, 0) \ |
420 V(ChangeBitToTagged, Operator::kNoProperties, 1, 0) \ | 400 V(ChangeBitToTagged, Operator::kNoProperties, 1, 0) \ |
421 V(TruncateTaggedToWord32, Operator::kNoProperties, 1, 0) \ | 401 V(TruncateTaggedToWord32, Operator::kNoProperties, 1, 0) \ |
422 V(TruncateTaggedToFloat64, Operator::kNoProperties, 1, 0) \ | 402 V(TruncateTaggedToFloat64, Operator::kNoProperties, 1, 0) \ |
423 V(ObjectIsCallable, Operator::kNoProperties, 1, 0) \ | 403 V(ObjectIsCallable, Operator::kNoProperties, 1, 0) \ |
424 V(ObjectIsNumber, Operator::kNoProperties, 1, 0) \ | 404 V(ObjectIsNumber, Operator::kNoProperties, 1, 0) \ |
425 V(ObjectIsReceiver, Operator::kNoProperties, 1, 0) \ | 405 V(ObjectIsReceiver, Operator::kNoProperties, 1, 0) \ |
426 V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \ | 406 V(ObjectIsSmi, Operator::kNoProperties, 1, 0) \ |
427 V(ObjectIsString, Operator::kNoProperties, 1, 0) \ | 407 V(ObjectIsString, Operator::kNoProperties, 1, 0) \ |
428 V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \ | 408 V(ObjectIsUndetectable, Operator::kNoProperties, 1, 0) \ |
429 V(ReferenceEqual, Operator::kCommutative, 2, 0) \ | 409 V(ConvertTaggedHoleToUndefined, Operator::kNoProperties, 1, 0) \ |
430 V(StringEqual, Operator::kCommutative, 2, 0) \ | 410 V(ReferenceEqual, Operator::kCommutative, 2, 0) \ |
431 V(StringLessThan, Operator::kNoProperties, 2, 0) \ | 411 V(StringEqual, Operator::kCommutative, 2, 0) \ |
| 412 V(StringLessThan, Operator::kNoProperties, 2, 0) \ |
432 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) | 413 V(StringLessThanOrEqual, Operator::kNoProperties, 2, 0) |
433 | 414 |
434 #define SPECULATIVE_NUMBER_BINOP_LIST(V) \ | 415 #define SPECULATIVE_NUMBER_BINOP_LIST(V) \ |
435 SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \ | 416 SIMPLIFIED_SPECULATIVE_NUMBER_BINOP_LIST(V) \ |
436 V(SpeculativeNumberEqual) \ | 417 V(SpeculativeNumberEqual) \ |
437 V(SpeculativeNumberLessThan) \ | 418 V(SpeculativeNumberLessThan) \ |
438 V(SpeculativeNumberLessThanOrEqual) | 419 V(SpeculativeNumberLessThanOrEqual) |
439 | 420 |
440 #define CHECKED_OP_LIST(V) \ | 421 #define CHECKED_OP_LIST(V) \ |
441 V(CheckBounds, 2, 1) \ | 422 V(CheckBounds, 2, 1) \ |
442 V(CheckIf, 1, 0) \ | 423 V(CheckIf, 1, 0) \ |
443 V(CheckNumber, 1, 1) \ | 424 V(CheckNumber, 1, 1) \ |
444 V(CheckString, 1, 1) \ | 425 V(CheckString, 1, 1) \ |
| 426 V(CheckTaggedHole, 1, 1) \ |
445 V(CheckTaggedPointer, 1, 1) \ | 427 V(CheckTaggedPointer, 1, 1) \ |
446 V(CheckTaggedSigned, 1, 1) \ | 428 V(CheckTaggedSigned, 1, 1) \ |
447 V(CheckedInt32Add, 2, 1) \ | 429 V(CheckedInt32Add, 2, 1) \ |
448 V(CheckedInt32Sub, 2, 1) \ | 430 V(CheckedInt32Sub, 2, 1) \ |
449 V(CheckedInt32Div, 2, 1) \ | 431 V(CheckedInt32Div, 2, 1) \ |
450 V(CheckedInt32Mod, 2, 1) \ | 432 V(CheckedInt32Mod, 2, 1) \ |
451 V(CheckedUint32Div, 2, 1) \ | 433 V(CheckedUint32Div, 2, 1) \ |
452 V(CheckedUint32Mod, 2, 1) \ | 434 V(CheckedUint32Mod, 2, 1) \ |
453 V(CheckedUint32ToInt32, 1, 1) \ | 435 V(CheckedUint32ToInt32, 1, 1) \ |
454 V(CheckedTaggedSignedToInt32, 1, 1) \ | 436 V(CheckedTaggedSignedToInt32, 1, 1) \ |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 : Operator1<CheckFloat64HoleMode>( | 521 : Operator1<CheckFloat64HoleMode>( |
540 IrOpcode::kCheckFloat64Hole, | 522 IrOpcode::kCheckFloat64Hole, |
541 Operator::kFoldable | Operator::kNoThrow, "CheckFloat64Hole", 1, | 523 Operator::kFoldable | Operator::kNoThrow, "CheckFloat64Hole", 1, |
542 1, 1, 1, 1, 0, kMode) {} | 524 1, 1, 1, 1, 0, kMode) {} |
543 }; | 525 }; |
544 CheckFloat64HoleNaNOperator<CheckFloat64HoleMode::kAllowReturnHole> | 526 CheckFloat64HoleNaNOperator<CheckFloat64HoleMode::kAllowReturnHole> |
545 kCheckFloat64HoleAllowReturnHoleOperator; | 527 kCheckFloat64HoleAllowReturnHoleOperator; |
546 CheckFloat64HoleNaNOperator<CheckFloat64HoleMode::kNeverReturnHole> | 528 CheckFloat64HoleNaNOperator<CheckFloat64HoleMode::kNeverReturnHole> |
547 kCheckFloat64HoleNeverReturnHoleOperator; | 529 kCheckFloat64HoleNeverReturnHoleOperator; |
548 | 530 |
549 template <CheckTaggedHoleMode kMode> | |
550 struct CheckTaggedHoleOperator final : public Operator1<CheckTaggedHoleMode> { | |
551 CheckTaggedHoleOperator() | |
552 : Operator1<CheckTaggedHoleMode>( | |
553 IrOpcode::kCheckTaggedHole, | |
554 Operator::kFoldable | Operator::kNoThrow, "CheckTaggedHole", 1, 1, | |
555 1, 1, 1, 0, kMode) {} | |
556 }; | |
557 CheckTaggedHoleOperator<CheckTaggedHoleMode::kConvertHoleToUndefined> | |
558 kCheckTaggedHoleConvertHoleToUndefinedOperator; | |
559 CheckTaggedHoleOperator<CheckTaggedHoleMode::kNeverReturnHole> | |
560 kCheckTaggedHoleNeverReturnHoleOperator; | |
561 | |
562 template <PretenureFlag kPretenure> | 531 template <PretenureFlag kPretenure> |
563 struct AllocateOperator final : public Operator1<PretenureFlag> { | 532 struct AllocateOperator final : public Operator1<PretenureFlag> { |
564 AllocateOperator() | 533 AllocateOperator() |
565 : Operator1<PretenureFlag>( | 534 : Operator1<PretenureFlag>( |
566 IrOpcode::kAllocate, | 535 IrOpcode::kAllocate, |
567 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, | 536 Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, |
568 "Allocate", 1, 1, 1, 1, 1, 0, kPretenure) {} | 537 "Allocate", 1, 1, 1, 1, 1, 0, kPretenure) {} |
569 }; | 538 }; |
570 AllocateOperator<NOT_TENURED> kAllocateNotTenuredOperator; | 539 AllocateOperator<NOT_TENURED> kAllocateNotTenuredOperator; |
571 AllocateOperator<TENURED> kAllocateTenuredOperator; | 540 AllocateOperator<TENURED> kAllocateTenuredOperator; |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 switch (mode) { | 668 switch (mode) { |
700 case CheckFloat64HoleMode::kAllowReturnHole: | 669 case CheckFloat64HoleMode::kAllowReturnHole: |
701 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator; | 670 return &cache_.kCheckFloat64HoleAllowReturnHoleOperator; |
702 case CheckFloat64HoleMode::kNeverReturnHole: | 671 case CheckFloat64HoleMode::kNeverReturnHole: |
703 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator; | 672 return &cache_.kCheckFloat64HoleNeverReturnHoleOperator; |
704 } | 673 } |
705 UNREACHABLE(); | 674 UNREACHABLE(); |
706 return nullptr; | 675 return nullptr; |
707 } | 676 } |
708 | 677 |
709 const Operator* SimplifiedOperatorBuilder::CheckTaggedHole( | |
710 CheckTaggedHoleMode mode) { | |
711 switch (mode) { | |
712 case CheckTaggedHoleMode::kConvertHoleToUndefined: | |
713 return &cache_.kCheckTaggedHoleConvertHoleToUndefinedOperator; | |
714 case CheckTaggedHoleMode::kNeverReturnHole: | |
715 return &cache_.kCheckTaggedHoleNeverReturnHoleOperator; | |
716 } | |
717 UNREACHABLE(); | |
718 return nullptr; | |
719 } | |
720 | |
721 const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() { | 678 const Operator* SimplifiedOperatorBuilder::EnsureWritableFastElements() { |
722 return &cache_.kEnsureWritableFastElements; | 679 return &cache_.kEnsureWritableFastElements; |
723 } | 680 } |
724 | 681 |
725 const Operator* SimplifiedOperatorBuilder::MaybeGrowFastElements( | 682 const Operator* SimplifiedOperatorBuilder::MaybeGrowFastElements( |
726 GrowFastElementsFlags flags) { | 683 GrowFastElementsFlags flags) { |
727 return new (zone()) Operator1<GrowFastElementsFlags>( // -- | 684 return new (zone()) Operator1<GrowFastElementsFlags>( // -- |
728 IrOpcode::kMaybeGrowFastElements, // opcode | 685 IrOpcode::kMaybeGrowFastElements, // opcode |
729 Operator::kNoThrow, // flags | 686 Operator::kNoThrow, // flags |
730 "MaybeGrowFastElements", // name | 687 "MaybeGrowFastElements", // name |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
813 Operator::kNoDeopt | Operator::kNoThrow | properties, \ | 770 Operator::kNoDeopt | Operator::kNoThrow | properties, \ |
814 #Name, value_input_count, 1, control_input_count, \ | 771 #Name, value_input_count, 1, control_input_count, \ |
815 output_count, 1, 0, access); \ | 772 output_count, 1, 0, access); \ |
816 } | 773 } |
817 ACCESS_OP_LIST(ACCESS) | 774 ACCESS_OP_LIST(ACCESS) |
818 #undef ACCESS | 775 #undef ACCESS |
819 | 776 |
820 } // namespace compiler | 777 } // namespace compiler |
821 } // namespace internal | 778 } // namespace internal |
822 } // namespace v8 | 779 } // namespace v8 |
OLD | NEW |