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

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

Issue 2203693002: [turbofan] Introduce initial support for TypedArrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5254
Patch Set: Fix Retain 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/machine-operator.h ('k') | src/compiler/memory-optimizer.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 #include "src/compiler/machine-operator.h" 5 #include "src/compiler/machine-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 10
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 AtomicStore##Type##Operator kAtomicStore##Type; 604 AtomicStore##Type##Operator kAtomicStore##Type;
605 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE) 605 ATOMIC_REPRESENTATION_LIST(ATOMIC_STORE)
606 #undef STORE 606 #undef STORE
607 607
608 struct DebugBreakOperator : public Operator { 608 struct DebugBreakOperator : public Operator {
609 DebugBreakOperator() 609 DebugBreakOperator()
610 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0, 610 : Operator(IrOpcode::kDebugBreak, Operator::kNoThrow, "DebugBreak", 0,
611 0, 0, 0, 0, 0) {} 611 0, 0, 0, 0, 0) {}
612 }; 612 };
613 DebugBreakOperator kDebugBreak; 613 DebugBreakOperator kDebugBreak;
614
615 struct UnsafePointerAddOperator final : public Operator {
616 UnsafePointerAddOperator()
617 : Operator(IrOpcode::kUnsafePointerAdd, Operator::kKontrol,
618 "UnsafePointerAdd", 2, 1, 1, 1, 1, 0) {}
619 };
620 UnsafePointerAddOperator kUnsafePointerAdd;
614 }; 621 };
615 622
616 struct CommentOperator : public Operator1<const char*> { 623 struct CommentOperator : public Operator1<const char*> {
617 explicit CommentOperator(const char* msg) 624 explicit CommentOperator(const char* msg)
618 : Operator1<const char*>(IrOpcode::kComment, Operator::kNoThrow, 625 : Operator1<const char*>(IrOpcode::kComment, Operator::kNoThrow,
619 "Comment", 0, 0, 0, 0, 0, 0, msg) {} 626 "Comment", 0, 0, 0, 0, 0, 0, msg) {}
620 }; 627 };
621 628
622 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache = 629 static base::LazyInstance<MachineOperatorGlobalCache>::type kCache =
623 LAZY_INSTANCE_INITIALIZER; 630 LAZY_INSTANCE_INITIALIZER;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 MACHINE_REPRESENTATION_LIST(STORE) 728 MACHINE_REPRESENTATION_LIST(STORE)
722 #undef STORE 729 #undef STORE
723 case MachineRepresentation::kBit: 730 case MachineRepresentation::kBit:
724 case MachineRepresentation::kNone: 731 case MachineRepresentation::kNone:
725 break; 732 break;
726 } 733 }
727 UNREACHABLE(); 734 UNREACHABLE();
728 return nullptr; 735 return nullptr;
729 } 736 }
730 737
738 const Operator* MachineOperatorBuilder::UnsafePointerAdd() {
739 return &cache_.kUnsafePointerAdd;
740 }
741
731 const Operator* MachineOperatorBuilder::DebugBreak() { 742 const Operator* MachineOperatorBuilder::DebugBreak() {
732 return &cache_.kDebugBreak; 743 return &cache_.kDebugBreak;
733 } 744 }
734 745
735 const Operator* MachineOperatorBuilder::Comment(const char* msg) { 746 const Operator* MachineOperatorBuilder::Comment(const char* msg) {
736 return new (zone_) CommentOperator(msg); 747 return new (zone_) CommentOperator(msg);
737 } 748 }
738 749
739 const Operator* MachineOperatorBuilder::CheckedLoad( 750 const Operator* MachineOperatorBuilder::CheckedLoad(
740 CheckedLoadRepresentation rep) { 751 CheckedLoadRepresentation rep) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 } 794 }
784 ATOMIC_REPRESENTATION_LIST(STORE) 795 ATOMIC_REPRESENTATION_LIST(STORE)
785 #undef STORE 796 #undef STORE
786 UNREACHABLE(); 797 UNREACHABLE();
787 return nullptr; 798 return nullptr;
788 } 799 }
789 800
790 } // namespace compiler 801 } // namespace compiler
791 } // namespace internal 802 } // namespace internal
792 } // namespace v8 803 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.h ('k') | src/compiler/memory-optimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698