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

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

Issue 2279213002: [turbofan] Introduce a dedicated ArrayBufferWasNeutered operator. (Closed)
Patch Set: Created 4 years, 3 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-operator.h ('k') | src/compiler/typer.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 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 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 struct Name##Operator final : public Operator { \ 451 struct Name##Operator final : public Operator { \
452 Name##Operator() \ 452 Name##Operator() \
453 : Operator(IrOpcode::k##Name, \ 453 : Operator(IrOpcode::k##Name, \
454 Operator::kFoldable | Operator::kNoThrow, #Name, \ 454 Operator::kFoldable | Operator::kNoThrow, #Name, \
455 value_input_count, 1, 1, value_output_count, 1, 0) {} \ 455 value_input_count, 1, 1, value_output_count, 1, 0) {} \
456 }; \ 456 }; \
457 Name##Operator k##Name; 457 Name##Operator k##Name;
458 CHECKED_OP_LIST(CHECKED) 458 CHECKED_OP_LIST(CHECKED)
459 #undef CHECKED 459 #undef CHECKED
460 460
461 struct ArrayBufferWasNeuteredOperator final : public Operator {
462 ArrayBufferWasNeuteredOperator()
463 : Operator(IrOpcode::kArrayBufferWasNeutered, Operator::kEliminatable,
464 "ArrayBufferWasNeutered", 1, 1, 1, 1, 1, 0) {}
465 };
466 ArrayBufferWasNeuteredOperator kArrayBufferWasNeutered;
467
461 template <CheckForMinusZeroMode kMode> 468 template <CheckForMinusZeroMode kMode>
462 struct ChangeFloat64ToTaggedOperator final 469 struct ChangeFloat64ToTaggedOperator final
463 : public Operator1<CheckForMinusZeroMode> { 470 : public Operator1<CheckForMinusZeroMode> {
464 ChangeFloat64ToTaggedOperator() 471 ChangeFloat64ToTaggedOperator()
465 : Operator1<CheckForMinusZeroMode>( 472 : Operator1<CheckForMinusZeroMode>(
466 IrOpcode::kChangeFloat64ToTagged, Operator::kPure, 473 IrOpcode::kChangeFloat64ToTagged, Operator::kPure,
467 "ChangeFloat64ToTagged", 1, 0, 0, 1, 0, 0, kMode) {} 474 "ChangeFloat64ToTagged", 1, 0, 0, 1, 0, 0, kMode) {}
468 }; 475 };
469 ChangeFloat64ToTaggedOperator<CheckForMinusZeroMode::kCheckForMinusZero> 476 ChangeFloat64ToTaggedOperator<CheckForMinusZeroMode::kCheckForMinusZero>
470 kChangeFloat64ToTaggedCheckForMinusZeroOperator; 477 kChangeFloat64ToTaggedCheckForMinusZeroOperator;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 LAZY_INSTANCE_INITIALIZER; 614 LAZY_INSTANCE_INITIALIZER;
608 615
609 616
610 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone) 617 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone)
611 : cache_(kCache.Get()), zone_(zone) {} 618 : cache_(kCache.Get()), zone_(zone) {}
612 619
613 #define GET_FROM_CACHE(Name, ...) \ 620 #define GET_FROM_CACHE(Name, ...) \
614 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; } 621 const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; }
615 PURE_OP_LIST(GET_FROM_CACHE) 622 PURE_OP_LIST(GET_FROM_CACHE)
616 CHECKED_OP_LIST(GET_FROM_CACHE) 623 CHECKED_OP_LIST(GET_FROM_CACHE)
624 GET_FROM_CACHE(ArrayBufferWasNeutered)
617 #undef GET_FROM_CACHE 625 #undef GET_FROM_CACHE
618 626
619 const Operator* SimplifiedOperatorBuilder::ChangeFloat64ToTagged( 627 const Operator* SimplifiedOperatorBuilder::ChangeFloat64ToTagged(
620 CheckForMinusZeroMode mode) { 628 CheckForMinusZeroMode mode) {
621 switch (mode) { 629 switch (mode) {
622 case CheckForMinusZeroMode::kCheckForMinusZero: 630 case CheckForMinusZeroMode::kCheckForMinusZero:
623 return &cache_.kChangeFloat64ToTaggedCheckForMinusZeroOperator; 631 return &cache_.kChangeFloat64ToTaggedCheckForMinusZeroOperator;
624 case CheckForMinusZeroMode::kDontCheckForMinusZero: 632 case CheckForMinusZeroMode::kDontCheckForMinusZero:
625 return &cache_.kChangeFloat64ToTaggedDontCheckForMinusZeroOperator; 633 return &cache_.kChangeFloat64ToTaggedDontCheckForMinusZeroOperator;
626 } 634 }
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 Operator::kNoDeopt | Operator::kNoThrow | properties, \ 803 Operator::kNoDeopt | Operator::kNoThrow | properties, \
796 #Name, value_input_count, 1, control_input_count, \ 804 #Name, value_input_count, 1, control_input_count, \
797 output_count, 1, 0, access); \ 805 output_count, 1, 0, access); \
798 } 806 }
799 ACCESS_OP_LIST(ACCESS) 807 ACCESS_OP_LIST(ACCESS)
800 #undef ACCESS 808 #undef ACCESS
801 809
802 } // namespace compiler 810 } // namespace compiler
803 } // namespace internal 811 } // namespace internal
804 } // namespace v8 812 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/simplified-operator.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698