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

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

Issue 1938993002: [turbofan] Restore basic write barrier elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comments. Created 4 years, 7 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/handles.h" 10 #include "src/handles.h"
11 #include "src/machine-type.h" 11 #include "src/machine-type.h"
12 #include "src/objects.h" 12 #include "src/objects.h"
13 13
14 namespace v8 { 14 namespace v8 {
15 namespace internal { 15 namespace internal {
16 16
17 // Forward declarations. 17 // Forward declarations.
18 class Type; 18 class Type;
19 class Zone; 19 class Zone;
20 20
21 21
22 namespace compiler { 22 namespace compiler {
23 23
24 // Forward declarations. 24 // Forward declarations.
25 class Operator; 25 class Operator;
26 struct SimplifiedOperatorGlobalCache; 26 struct SimplifiedOperatorGlobalCache;
27 27
28 enum BaseTaggedness : uint8_t { kUntaggedBase, kTaggedBase };
28 29
29 enum BaseTaggedness { kUntaggedBase, kTaggedBase }; 30 size_t hash_value(BaseTaggedness);
30 31
31 std::ostream& operator<<(std::ostream&, BaseTaggedness); 32 std::ostream& operator<<(std::ostream&, BaseTaggedness);
32 33
33 34
34 // An access descriptor for loads/stores of array buffers. 35 // An access descriptor for loads/stores of array buffers.
35 class BufferAccess final { 36 class BufferAccess final {
36 public: 37 public:
37 explicit BufferAccess(ExternalArrayType external_array_type) 38 explicit BufferAccess(ExternalArrayType external_array_type)
38 : external_array_type_(external_array_type) {} 39 : external_array_type_(external_array_type) {}
39 40
(...skipping 16 matching lines...) Expand all
56 57
57 // An access descriptor for loads/stores of fixed structures like field 58 // An access descriptor for loads/stores of fixed structures like field
58 // accesses of heap objects. Accesses from either tagged or untagged base 59 // accesses of heap objects. Accesses from either tagged or untagged base
59 // pointers are supported; untagging is done automatically during lowering. 60 // pointers are supported; untagging is done automatically during lowering.
60 struct FieldAccess { 61 struct FieldAccess {
61 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. 62 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
62 int offset; // offset of the field, without tag. 63 int offset; // offset of the field, without tag.
63 MaybeHandle<Name> name; // debugging only. 64 MaybeHandle<Name> name; // debugging only.
64 Type* type; // type of the field. 65 Type* type; // type of the field.
65 MachineType machine_type; // machine type of the field. 66 MachineType machine_type; // machine type of the field.
67 WriteBarrierKind write_barrier_kind; // write barrier hint.
66 68
67 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } 69 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
68 }; 70 };
69 71
70 bool operator==(FieldAccess const&, FieldAccess const&); 72 bool operator==(FieldAccess const&, FieldAccess const&);
71 bool operator!=(FieldAccess const&, FieldAccess const&); 73 bool operator!=(FieldAccess const&, FieldAccess const&);
72 74
73 size_t hash_value(FieldAccess const&); 75 size_t hash_value(FieldAccess const&);
74 76
75 std::ostream& operator<<(std::ostream&, FieldAccess const&); 77 std::ostream& operator<<(std::ostream&, FieldAccess const&);
76 78
77 FieldAccess const& FieldAccessOf(const Operator* op) WARN_UNUSED_RESULT; 79 FieldAccess const& FieldAccessOf(const Operator* op) WARN_UNUSED_RESULT;
78 80
79 81
80 // An access descriptor for loads/stores of indexed structures like characters 82 // An access descriptor for loads/stores of indexed structures like characters
81 // in strings or off-heap backing stores. Accesses from either tagged or 83 // in strings or off-heap backing stores. Accesses from either tagged or
82 // untagged base pointers are supported; untagging is done automatically during 84 // untagged base pointers are supported; untagging is done automatically during
83 // lowering. 85 // lowering.
84 struct ElementAccess { 86 struct ElementAccess {
85 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged. 87 BaseTaggedness base_is_tagged; // specifies if the base pointer is tagged.
86 int header_size; // size of the header, without tag. 88 int header_size; // size of the header, without tag.
87 Type* type; // type of the element. 89 Type* type; // type of the element.
88 MachineType machine_type; // machine type of the element. 90 MachineType machine_type; // machine type of the element.
91 WriteBarrierKind write_barrier_kind; // write barrier hint.
89 92
90 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; } 93 int tag() const { return base_is_tagged == kTaggedBase ? kHeapObjectTag : 0; }
91 }; 94 };
92 95
93 bool operator==(ElementAccess const&, ElementAccess const&); 96 bool operator==(ElementAccess const&, ElementAccess const&);
94 bool operator!=(ElementAccess const&, ElementAccess const&); 97 bool operator!=(ElementAccess const&, ElementAccess const&);
95 98
96 size_t hash_value(ElementAccess const&); 99 size_t hash_value(ElementAccess const&);
97 100
98 std::ostream& operator<<(std::ostream&, ElementAccess const&); 101 std::ostream& operator<<(std::ostream&, ElementAccess const&);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 Zone* const zone_; 205 Zone* const zone_;
203 206
204 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder); 207 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorBuilder);
205 }; 208 };
206 209
207 } // namespace compiler 210 } // namespace compiler
208 } // namespace internal 211 } // namespace internal
209 } // namespace v8 212 } // namespace v8
210 213
211 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_H_ 214 #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