Lines Matching refs:mode
29 // to which the relocation information applies, the relocation mode
30 // (rmode), and an optional data field. The relocation mode may be
96 // This is not an actual reloc mode, but used to encode a long pc jump that
127 static constexpr bool IsRealRelocMode(Mode mode) {
128 return mode >= FIRST_REAL_RELOC_MODE && mode <= LAST_REAL_RELOC_MODE;
130 // Is the relocation mode affected by GC?
131 static constexpr bool IsGCRelocMode(Mode mode) {
132 return mode <= LAST_GCED_ENUM;
134 static constexpr bool IsShareableRelocMode(Mode mode) {
135 return mode == RelocInfo::NO_INFO ||
136 mode >= RelocInfo::FIRST_SHAREABLE_RELOC_MODE;
138 static constexpr bool IsCodeTarget(Mode mode) { return mode == CODE_TARGET; }
139 static constexpr bool IsCodeTargetMode(Mode mode) {
140 return mode <= LAST_CODE_TARGET_MODE;
142 static constexpr bool IsRelativeCodeTarget(Mode mode) {
143 return mode == RELATIVE_CODE_TARGET;
145 static constexpr bool IsFullEmbeddedObject(Mode mode) {
146 return mode == FULL_EMBEDDED_OBJECT;
148 static constexpr bool IsCompressedEmbeddedObject(Mode mode) {
149 return COMPRESS_POINTERS_BOOL && mode == COMPRESSED_EMBEDDED_OBJECT;
151 static constexpr bool IsDataEmbeddedObject(Mode mode) {
152 return mode == DATA_EMBEDDED_OBJECT;
154 static constexpr bool IsEmbeddedObjectMode(Mode mode) {
155 return base::IsInRange(mode, FIRST_EMBEDDED_OBJECT_RELOC_MODE,
159 static constexpr bool IsRuntimeEntry(Mode mode) {
160 return mode == RUNTIME_ENTRY;
162 static constexpr bool IsWasmCall(Mode mode) { return mode == WASM_CALL; }
163 static constexpr bool IsWasmReference(Mode mode) { return mode == WASM_CALL; }
164 static constexpr bool IsWasmStubCall(Mode mode) {
165 return mode == WASM_STUB_CALL;
167 static constexpr bool IsConstPool(Mode mode) { return mode == CONST_POOL; }
168 static constexpr bool IsVeneerPool(Mode mode) { return mode == VENEER_POOL; }
169 static constexpr bool IsDeoptPosition(Mode mode) {
170 return mode == DEOPT_SCRIPT_OFFSET || mode == DEOPT_INLINING_ID;
172 static constexpr bool IsDeoptReason(Mode mode) {
173 return mode == DEOPT_REASON;
175 static constexpr bool IsDeoptId(Mode mode) { return mode == DEOPT_ID; }
176 static constexpr bool IsLiteralConstant(Mode mode) {
177 return mode == LITERAL_CONSTANT;
179 static constexpr bool IsDeoptNodeId(Mode mode) {
180 return mode == DEOPT_NODE_ID;
182 static constexpr bool IsExternalReference(Mode mode) {
183 return mode == EXTERNAL_REFERENCE;
185 static constexpr bool IsInternalReference(Mode mode) {
186 return mode == INTERNAL_REFERENCE;
188 static constexpr bool IsInternalReferenceEncoded(Mode mode) {
189 return mode == INTERNAL_REFERENCE_ENCODED;
191 static constexpr bool IsOffHeapTarget(Mode mode) {
192 return mode == OFF_HEAP_TARGET;
194 static constexpr bool IsNoInfo(Mode mode) { return mode == NO_INFO; }
196 static bool IsOnlyForSerializer(Mode mode) {
201 return mode == EXTERNAL_REFERENCE;
205 return mode == EXTERNAL_REFERENCE || mode == OFF_HEAP_TARGET;
209 static constexpr int ModeMask(Mode mode) { return 1 << mode; }
315 Mode mode = rmode();
316 if (IsEmbeddedObjectMode(mode)) {
318 } else if (IsCodeTargetMode(mode)) {
320 } else if (IsExternalReference(mode)) {
322 } else if (IsInternalReference(mode) || IsInternalReferenceEncoded(mode)) {
324 } else if (IsRuntimeEntry(mode)) {
326 } else if (IsOffHeapTarget(mode)) {
435 // Relocation information with mode k is included in the
481 // If the given mode is wanted, set it in rinfo_ and return true.
483 bool SetMode(RelocInfo::Mode mode) {
484 return (mode_mask_ & (1 << mode)) ? (rinfo_.rmode_ = mode, true) : false;