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

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

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ben's review 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/arm64/code-generator-arm64.cc ('k') | src/compiler/common-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_COMMON_OPERATOR_H_ 5 #ifndef V8_COMPILER_COMMON_OPERATOR_H_
6 #define V8_COMPILER_COMMON_OPERATOR_H_ 6 #define V8_COMPILER_COMMON_OPERATOR_H_
7 7
8 #include "src/assembler.h" 8 #include "src/assembler.h"
9 #include "src/compiler/frame-states.h" 9 #include "src/compiler/frame-states.h"
10 #include "src/machine-type.h" 10 #include "src/machine-type.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const char* debug_name_; 110 const char* debug_name_;
111 }; 111 };
112 112
113 std::ostream& operator<<(std::ostream&, ParameterInfo const&); 113 std::ostream& operator<<(std::ostream&, ParameterInfo const&);
114 114
115 int ParameterIndexOf(const Operator* const); 115 int ParameterIndexOf(const Operator* const);
116 const ParameterInfo& ParameterInfoOf(const Operator* const); 116 const ParameterInfo& ParameterInfoOf(const Operator* const);
117 117
118 class RelocatablePtrConstantInfo final { 118 class RelocatablePtrConstantInfo final {
119 public: 119 public:
120 RelocatablePtrConstantInfo(intptr_t value, RelocInfo::Mode rmode) 120 enum Type { kInt32, kInt64 };
121 : value_(value), rmode_(rmode) {} 121
122 RelocatablePtrConstantInfo(int32_t value, RelocInfo::Mode rmode)
123 : value_(value), rmode_(rmode), type_(kInt32) {}
124 RelocatablePtrConstantInfo(int64_t value, RelocInfo::Mode rmode)
125 : value_(value), rmode_(rmode), type_(kInt64) {}
122 126
123 intptr_t value() const { return value_; } 127 intptr_t value() const { return value_; }
124 RelocInfo::Mode rmode() const { return rmode_; } 128 RelocInfo::Mode rmode() const { return rmode_; }
129 Type type() const { return type_; }
125 130
126 private: 131 private:
127 intptr_t value_; 132 intptr_t value_;
128 RelocInfo::Mode rmode_; 133 RelocInfo::Mode rmode_;
134 Type type_;
129 }; 135 };
130 136
131 bool operator==(RelocatablePtrConstantInfo const& lhs, 137 bool operator==(RelocatablePtrConstantInfo const& lhs,
132 RelocatablePtrConstantInfo const& rhs); 138 RelocatablePtrConstantInfo const& rhs);
133 bool operator!=(RelocatablePtrConstantInfo const& lhs, 139 bool operator!=(RelocatablePtrConstantInfo const& lhs,
134 RelocatablePtrConstantInfo const& rhs); 140 RelocatablePtrConstantInfo const& rhs);
135 std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&); 141 std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&);
136 size_t hash_value(RelocatablePtrConstantInfo const& p); 142 size_t hash_value(RelocatablePtrConstantInfo const& p);
137 143
138 // Interface for building common operators that can be used at any level of IR, 144 // Interface for building common operators that can be used at any level of IR,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 Zone* const zone_; 220 Zone* const zone_;
215 221
216 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder); 222 DISALLOW_COPY_AND_ASSIGN(CommonOperatorBuilder);
217 }; 223 };
218 224
219 } // namespace compiler 225 } // namespace compiler
220 } // namespace internal 226 } // namespace internal
221 } // namespace v8 227 } // namespace v8
222 228
223 #endif // V8_COMPILER_COMMON_OPERATOR_H_ 229 #endif // V8_COMPILER_COMMON_OPERATOR_H_
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/common-operator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698