Flutter Engine
The Flutter Engine
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
dart::Location Class Reference

#include <locations.h>

Inheritance diagram for dart::Location:
dart::ValueObject

Public Types

enum  Kind : intptr_t {
  kInvalid = 0 , kConstantTag = 1 , kPairLocationTag = 2 , kUnallocated = 1 << 2 ,
  kStackSlot = 2 << 2 , kDoubleStackSlot = 3 << 2 , kQuadStackSlot = 4 << 2 , kRegister = 5 << 2 ,
  kFpuRegister = 6 << 2
}
 
enum  Policy {
  kAny , kPrefersRegister , kRequiresRegister , kRequiresFpuRegister ,
  kWritableRegister , kSameAsFirstInput , kRequiresStack
}
 

Public Member Functions

 Location ()
 
 Location (const Location &other)
 
Locationoperator= (const Location &other)
 
bool IsInvalid () const
 
bool IsConstant () const
 
intptr_t pair_index () const
 
ConstantInstrconstant_instruction () const
 
const Objectconstant () const
 
bool IsPairLocation () const
 
PairLocationAsPairLocation () const
 
Location Component (intptr_t i) const
 
bool IsUnallocated () const
 
bool IsRegisterBeneficial ()
 
Policy policy () const
 
bool IsRegister () const
 
Register reg () const
 
bool IsFpuRegister () const
 
FpuRegister fpu_reg () const
 
bool IsMachineRegister () const
 
intptr_t register_code () const
 
bool IsStackSlot () const
 
bool IsDoubleStackSlot () const
 
bool IsQuadStackSlot () const
 
Register base_reg () const
 
intptr_t stack_index () const
 
bool HasStackIndex () const
 
intptr_t ToStackSlotOffset () const
 
Location ToSpRelative (intptr_t fp_to_sp_delta) const
 
Location ToEntrySpRelative () const
 
Location ToCallerSpRelative () const
 
const char * Name () const
 
void PrintTo (BaseTextBuffer *f) const
 
void Print () const
 
const char * ToCString () const
 
bool Equals (Location other) const
 
Kind kind () const
 
Location Copy () const
 
void Write (FlowGraphSerializer *s) const
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Static Public Member Functions

static Location Constant (const ConstantInstr *obj, int pair_index=0)
 
static Location Pair (Location first, Location second)
 
static Location UnallocatedLocation (Policy policy)
 
static Location Any ()
 
static Location RequiresStack ()
 
static Location PrefersRegister ()
 
static Location RequiresRegister ()
 
static Location RequiresFpuRegister ()
 
static Location WritableRegister ()
 
static Location SameAsFirstInput ()
 
static Location NoLocation ()
 
static Location RegisterLocation (Register reg)
 
static Location FpuRegisterLocation (FpuRegister reg)
 
static bool IsMachineRegisterKind (Kind kind)
 
static Location MachineRegisterLocation (Kind kind, intptr_t reg)
 
static uword EncodeStackIndex (intptr_t stack_index)
 
static Location StackSlot (intptr_t stack_index, Register base)
 
static Location DoubleStackSlot (intptr_t stack_index, Register base)
 
static Location QuadStackSlot (intptr_t stack_index, Register base)
 
static Location Read (FlowGraphDeserializer *d)
 

Detailed Description

Definition at line 198 of file locations.h.

Member Enumeration Documentation

◆ Kind

enum dart::Location::Kind : intptr_t
Enumerator
kInvalid 
kConstantTag 
kPairLocationTag 
kUnallocated 
kStackSlot 
kDoubleStackSlot 
kQuadStackSlot 
kRegister 
kFpuRegister 

Definition at line 219 of file locations.h.

219 : intptr_t {
220 // This location is invalid. Payload must be zero.
221 kInvalid = 0,
222
223 // Constant value. This location contains a tagged Object handle.
224 kConstantTag = 1,
225
226 // This location contains a tagged pointer to a PairLocation.
228
229 // Unallocated location represents a location that is not fixed and can be
230 // allocated by a register allocator. Each unallocated location has
231 // a policy that specifies what kind of location is suitable. Payload
232 // contains register allocation policy.
233 kUnallocated = 1 << 2,
234
235 // Spill slots allocated by the register allocator. Payload contains
236 // a spill index.
237 kStackSlot = 2 << 2, // Word size slot.
238 kDoubleStackSlot = 3 << 2, // 64bit stack slot.
239 kQuadStackSlot = 4 << 2, // 128bit stack slot.
240
241 // Register location represents a fixed register. Payload contains
242 // register code.
243 kRegister = 5 << 2,
244
245 // FpuRegister location represents a fixed fpu register. Payload contains
246 // its code.
247 kFpuRegister = 6 << 2,
248 };

◆ Policy

Enumerator
kAny 
kPrefersRegister 
kRequiresRegister 
kRequiresFpuRegister 
kWritableRegister 
kSameAsFirstInput 
kRequiresStack 

Definition at line 328 of file locations.h.

328 {
329 kAny,
335 // Forces the location to be spilled to the stack.
336 // Currently only used for `Handle` arguments in `FfiCall` instructions.
337 // Only available in optimized mode.
339 };
@ kRequiresFpuRegister
Definition: locations.h:332

Constructor & Destructor Documentation

◆ Location() [1/2]

dart::Location::Location ( )
inline

Definition at line 250 of file locations.h.

250 : value_(kInvalidLocation) {
251 // Verify that non-tagged location kinds do not interfere with location tags
252 // (kConstantTag and kPairLocationTag).
253 COMPILE_ASSERT((kInvalid & kLocationTagMask) != kConstantTag);
254 COMPILE_ASSERT((kInvalid & kLocationTagMask) != kPairLocationTag);
255
256 COMPILE_ASSERT((kUnallocated & kLocationTagMask) != kConstantTag);
257 COMPILE_ASSERT((kUnallocated & kLocationTagMask) != kPairLocationTag);
258
259 COMPILE_ASSERT((kStackSlot & kLocationTagMask) != kConstantTag);
260 COMPILE_ASSERT((kStackSlot & kLocationTagMask) != kPairLocationTag);
261
262 COMPILE_ASSERT((kDoubleStackSlot & kLocationTagMask) != kConstantTag);
263 COMPILE_ASSERT((kDoubleStackSlot & kLocationTagMask) != kPairLocationTag);
264
265 COMPILE_ASSERT((kQuadStackSlot & kLocationTagMask) != kConstantTag);
266 COMPILE_ASSERT((kQuadStackSlot & kLocationTagMask) != kPairLocationTag);
267
268 COMPILE_ASSERT((kRegister & kLocationTagMask) != kConstantTag);
269 COMPILE_ASSERT((kRegister & kLocationTagMask) != kPairLocationTag);
270
271 COMPILE_ASSERT((kFpuRegister & kLocationTagMask) != kConstantTag);
272 COMPILE_ASSERT((kFpuRegister & kLocationTagMask) != kPairLocationTag);
273
274 // Verify tags and tagmask.
275 COMPILE_ASSERT((kConstantTag & kLocationTagMask) == kConstantTag);
276
277 COMPILE_ASSERT((kPairLocationTag & kLocationTagMask) == kPairLocationTag);
278
279 ASSERT(IsInvalid());
280 }
bool IsInvalid() const
Definition: locations.h:289
#define ASSERT(E)

◆ Location() [2/2]

dart::Location::Location ( const Location other)
inline

Definition at line 282 of file locations.h.

282: ValueObject(), value_(other.value_) {}

Member Function Documentation

◆ Any()

static Location dart::Location::Any ( )
inlinestatic

Definition at line 352 of file locations.h.

352{ return UnallocatedLocation(kAny); }
static Location UnallocatedLocation(Policy policy)
Definition: locations.h:347

◆ AsPairLocation()

PairLocation * Location::AsPairLocation ( ) const

Definition at line 280 of file locations.cc.

280 {
282 return reinterpret_cast<PairLocation*>(value_ & ~kLocationTagMask);
283}
bool IsPairLocation() const
Definition: locations.h:316

◆ base_reg()

Register dart::Location::base_reg ( ) const
inline

Definition at line 480 of file locations.h.

480 {
482 return StackSlotBaseField::decode(payload());
483 }
bool HasStackIndex() const
Definition: locations.h:491
static DecodeResult decode(std::string path)
Definition: png_codec.cpp:124

◆ Component()

Location Location::Component ( intptr_t  i) const

Definition at line 285 of file locations.cc.

285 {
286 return AsPairLocation()->At(i);
287}
PairLocation * AsPairLocation() const
Definition: locations.cc:280
Location At(intptr_t i) const
Definition: locations.h:618

◆ constant()

const Object & Location::constant ( ) const

Definition at line 373 of file locations.cc.

373 {
374 return constant_instruction()->value();
375}
const Object & value() const
Definition: il.h:4230
ConstantInstr * constant_instruction() const
Definition: locations.h:309

◆ Constant()

static Location dart::Location::Constant ( const ConstantInstr obj,
int  pair_index = 0 
)
inlinestatic

Definition at line 294 of file locations.h.

294 {
295 ASSERT((pair_index == 0) || (pair_index == 1));
296 Location loc(reinterpret_cast<uword>(obj) |
297 (pair_index != 0 ? static_cast<uword>(kPairLocationTag) : 0) |
298 static_cast<uword>(kConstantTag));
299 ASSERT(obj == loc.constant_instruction());
300 ASSERT(loc.pair_index() == pair_index);
301 return loc;
302 }
intptr_t pair_index() const
Definition: locations.h:304
uintptr_t uword
Definition: globals.h:501

◆ constant_instruction()

ConstantInstr * dart::Location::constant_instruction ( ) const
inline

Definition at line 309 of file locations.h.

309 {
311 return reinterpret_cast<ConstantInstr*>(value_ & ~kLocationTagMask);
312 }
bool IsConstant() const
Definition: locations.h:292

◆ Copy()

Location Location::Copy ( ) const

Definition at line 468 of file locations.cc.

468 {
469 if (IsPairLocation()) {
470 PairLocation* pair = AsPairLocation();
471 ASSERT(!pair->At(0).IsPairLocation());
472 ASSERT(!pair->At(1).IsPairLocation());
473 return Location::Pair(pair->At(0).Copy(), pair->At(1).Copy());
474 } else {
475 // Copy by value.
476 return *this;
477 }
478}
static Location Pair(Location first, Location second)
Definition: locations.cc:271

◆ DoubleStackSlot()

static Location dart::Location::DoubleStackSlot ( intptr_t  stack_index,
Register  base 
)
inlinestatic

Definition at line 458 of file locations.h.

458 {
461 Location loc(kDoubleStackSlot, payload);
462 // Ensure that sign is preserved.
463 ASSERT(loc.stack_index() == stack_index);
464 return loc;
465 }
static void encode(uint8_t output[16], const uint32_t input[4])
Definition: SkMD5.cpp:240
static uword EncodeStackIndex(intptr_t stack_index)
Definition: locations.h:441
intptr_t stack_index() const
Definition: locations.h:485

◆ EncodeStackIndex()

static uword dart::Location::EncodeStackIndex ( intptr_t  stack_index)
inlinestatic

Definition at line 441 of file locations.h.

441 {
442 ASSERT((-kStackIndexBias <= stack_index) &&
443 (stack_index < kStackIndexBias));
444 return static_cast<uword>(kStackIndexBias + stack_index);
445 }

◆ Equals()

bool dart::Location::Equals ( Location  other) const
inline

Definition at line 519 of file locations.h.

519{ return value_ == other.value_; }

◆ fpu_reg()

FpuRegister dart::Location::fpu_reg ( ) const
inline

Definition at line 416 of file locations.h.

416 {
418 return static_cast<FpuRegister>(payload());
419 }
bool IsFpuRegister() const
Definition: locations.h:414
QRegister FpuRegister

◆ FpuRegisterLocation()

static Location dart::Location::FpuRegisterLocation ( FpuRegister  reg)
inlinestatic

Definition at line 410 of file locations.h.

410 {
411 return Location(kFpuRegister, reg);
412 }
Register reg() const
Definition: locations.h:404

◆ HasStackIndex()

bool dart::Location::HasStackIndex ( ) const
inline

Definition at line 491 of file locations.h.

491 {
493 }
bool IsDoubleStackSlot() const
Definition: locations.h:467
bool IsQuadStackSlot() const
Definition: locations.h:478
bool IsStackSlot() const
Definition: locations.h:456

◆ IsConstant()

bool dart::Location::IsConstant ( ) const
inline

Definition at line 292 of file locations.h.

292{ return (value_ & kConstantTag) == kConstantTag; }

◆ IsDoubleStackSlot()

bool dart::Location::IsDoubleStackSlot ( ) const
inline

Definition at line 467 of file locations.h.

467{ return kind() == kDoubleStackSlot; }
Kind kind() const
Definition: locations.h:523

◆ IsFpuRegister()

bool dart::Location::IsFpuRegister ( ) const
inline

Definition at line 414 of file locations.h.

414{ return kind() == kFpuRegister; }

◆ IsInvalid()

bool dart::Location::IsInvalid ( ) const
inline

Definition at line 289 of file locations.h.

289{ return value_ == kInvalidLocation; }

◆ IsMachineRegister()

bool dart::Location::IsMachineRegister ( ) const
inline

Definition at line 434 of file locations.h.

434{ return IsMachineRegisterKind(kind()); }
static bool IsMachineRegisterKind(Kind kind)
Definition: locations.h:421

◆ IsMachineRegisterKind()

static bool dart::Location::IsMachineRegisterKind ( Kind  kind)
inlinestatic

Definition at line 421 of file locations.h.

421 {
422 return (kind == kRegister) || (kind == kFpuRegister);
423 }

◆ IsPairLocation()

bool dart::Location::IsPairLocation ( ) const
inline

Definition at line 316 of file locations.h.

316 {
317 return (value_ & kLocationTagMask) == kPairLocationTag;
318 }

◆ IsQuadStackSlot()

bool dart::Location::IsQuadStackSlot ( ) const
inline

Definition at line 478 of file locations.h.

478{ return kind() == kQuadStackSlot; }

◆ IsRegister()

bool dart::Location::IsRegister ( ) const
inline

Definition at line 402 of file locations.h.

402{ return kind() == kRegister; }

◆ IsRegisterBeneficial()

bool dart::Location::IsRegisterBeneficial ( )
inline

Definition at line 343 of file locations.h.

343 {
344 return !Equals(Any()) && !Equals(RequiresStack());
345 }
static Location RequiresStack()
Definition: locations.h:354
static Location Any()
Definition: locations.h:352
bool Equals(Location other) const
Definition: locations.h:519

◆ IsStackSlot()

bool dart::Location::IsStackSlot ( ) const
inline

Definition at line 456 of file locations.h.

456{ return kind() == kStackSlot; }

◆ IsUnallocated()

bool dart::Location::IsUnallocated ( ) const
inline

Definition at line 341 of file locations.h.

341{ return kind() == kUnallocated; }

◆ kind()

Kind dart::Location::kind ( ) const
inline

Definition at line 523 of file locations.h.

523{ return KindField::decode(value_); }

◆ MachineRegisterLocation()

static Location dart::Location::MachineRegisterLocation ( Kind  kind,
intptr_t  reg 
)
inlinestatic

Definition at line 425 of file locations.h.

425 {
426 if (kind == kRegister) {
427 return RegisterLocation(static_cast<Register>(reg));
428 } else {
430 return FpuRegisterLocation(static_cast<FpuRegister>(reg));
431 }
432 }
static Location FpuRegisterLocation(FpuRegister reg)
Definition: locations.h:410
static Location RegisterLocation(Register reg)
Definition: locations.h:398

◆ Name()

const char * Location::Name ( ) const

Definition at line 377 of file locations.cc.

377 {
378 switch (kind()) {
379 case kInvalid:
380 return "?";
381 case kRegister:
383 case kFpuRegister:
385 case kStackSlot:
386 return "S";
387 case kDoubleStackSlot:
388 return "DS";
389 case kQuadStackSlot:
390 return "QS";
391 case kUnallocated:
392 switch (policy()) {
393 case kAny:
394 return "A";
395 case kPrefersRegister:
396 return "P";
398 return "R";
400 return "DR";
402 return "WR";
404 return "0";
405 case kRequiresStack:
406 return "RS";
407 }
408 UNREACHABLE();
409 default:
410 if (IsConstant()) {
411 return "C";
412 } else {
414 return "2P";
415 }
416 }
417 return "?";
418}
#define UNREACHABLE()
Definition: assert.h:248
Policy policy() const
Definition: locations.h:389
FpuRegister fpu_reg() const
Definition: locations.h:416
static const char * FpuRegisterName(FpuRegister reg)
Definition: constants.h:54
static const char * RegisterName(Register reg)
Definition: constants.h:46

◆ NoLocation()

static Location dart::Location::NoLocation ( )
inlinestatic

Definition at line 387 of file locations.h.

387{ return Location(); }

◆ operator=()

Location & dart::Location::operator= ( const Location other)
inline

Definition at line 284 of file locations.h.

284 {
285 value_ = other.value_;
286 return *this;
287 }

◆ Pair()

Location Location::Pair ( Location  first,
Location  second 
)
static

Definition at line 271 of file locations.cc.

271 {
272 PairLocation* pair_location = new PairLocation();
273 ASSERT((reinterpret_cast<intptr_t>(pair_location) & kLocationTagMask) == 0);
274 pair_location->SetAt(0, first);
275 pair_location->SetAt(1, second);
276 Location loc(reinterpret_cast<uword>(pair_location) | kPairLocationTag);
277 return loc;
278}

◆ pair_index()

intptr_t dart::Location::pair_index ( ) const
inline

Definition at line 304 of file locations.h.

304 {
306 return (value_ & kPairLocationTag) != 0 ? 1 : 0;
307 }

◆ policy()

Policy dart::Location::policy ( ) const
inline

Definition at line 389 of file locations.h.

389 {
391 return PolicyField::decode(payload());
392 }
static constexpr T decode(S value)
Definition: bitfield.h:171
bool IsUnallocated() const
Definition: locations.h:341

◆ PrefersRegister()

static Location dart::Location::PrefersRegister ( )
inlinestatic

Definition at line 358 of file locations.h.

358 {
360 }

◆ Print()

void Location::Print ( ) const

Definition at line 452 of file locations.cc.

452 {
453 if (kind() == kStackSlot || kind() == kDoubleStackSlot ||
454 kind() == kQuadStackSlot) {
455 const char* suffix = "";
456 if (kind() == kDoubleStackSlot) {
457 suffix = " f64";
458 } else if (kind() == kQuadStackSlot) {
459 suffix = " f128";
460 }
461 THR_Print("%s[%" Pd "] %s", base_reg() == FPREG ? "fp" : "sp",
463 } else {
464 THR_Print("%s", Name());
465 }
466}
const char * Name() const
Definition: locations.cc:377
Register base_reg() const
Definition: locations.h:480
#define THR_Print(format,...)
Definition: log.h:20
const Register FPREG
#define Pd
Definition: globals.h:408

◆ PrintTo()

void Location::PrintTo ( BaseTextBuffer f) const

Definition at line 420 of file locations.cc.

420 {
422 return;
423 }
424 if (kind() == kStackSlot || kind() == kDoubleStackSlot ||
425 kind() == kQuadStackSlot) {
426 const char* suffix = "";
427 if (kind() == kDoubleStackSlot) {
428 suffix = " f64";
429 } else if (kind() == kQuadStackSlot) {
430 suffix = " f128";
431 }
432 f->Printf("%s[%" Pd "]%s", base_reg() == FPREG ? "fp" : "sp", stack_index(),
433 suffix);
434 } else if (IsPairLocation()) {
435 f->AddString("(");
436 AsPairLocation()->At(0).PrintTo(f);
437 f->AddString(", ");
438 AsPairLocation()->At(1).PrintTo(f);
439 f->AddString(")");
440 } else {
441 f->Printf("%s", Name());
442 }
443}
void PrintTo(BaseTextBuffer *f) const
Definition: locations.cc:420
constexpr bool FLAG_support_il_printer
Definition: flag_list.h:48

◆ QuadStackSlot()

static Location dart::Location::QuadStackSlot ( intptr_t  stack_index,
Register  base 
)
inlinestatic

Definition at line 469 of file locations.h.

469 {
472 Location loc(kQuadStackSlot, payload);
473 // Ensure that sign is preserved.
474 ASSERT(loc.stack_index() == stack_index);
475 return loc;
476 }

◆ Read()

Location Location::Read ( FlowGraphDeserializer d)
static

Definition at line 1243 of file il_serializer.cc.

1243 {
1244 const uword value = d->Read<uword>();
1245 if (value == kPairLocationTag) {
1246 const Location first = Location::Read(d);
1247 const Location second = Location::Read(d);
1248 return Location::Pair(first, second);
1249 } else if ((value & kConstantTag) == kConstantTag) {
1250 ConstantInstr* instr = d->ReadRef<Definition*>()->AsConstant();
1251 ASSERT(instr != nullptr);
1252 const int pair_index = (value & kPairLocationTag) != 0 ? 1 : 0;
1253 return Location::Constant(instr, pair_index);
1254 } else {
1255 return Location(value);
1256 }
1257}
static Location Read(FlowGraphDeserializer *d)
static Location Constant(const ConstantInstr *obj, int pair_index=0)
Definition: locations.h:294
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
Definition: main.cc:19
uint8_t value

◆ reg()

Register dart::Location::reg ( ) const
inline

Definition at line 404 of file locations.h.

404 {
406 return static_cast<Register>(payload());
407 }
bool IsRegister() const
Definition: locations.h:402

◆ register_code()

intptr_t dart::Location::register_code ( ) const
inline

Definition at line 436 of file locations.h.

436 {
438 return static_cast<intptr_t>(payload());
439 }
bool IsMachineRegister() const
Definition: locations.h:434

◆ RegisterLocation()

static Location dart::Location::RegisterLocation ( Register  reg)
inlinestatic

Definition at line 398 of file locations.h.

398 {
399 return Location(kRegister, reg);
400 }

◆ RequiresFpuRegister()

static Location dart::Location::RequiresFpuRegister ( )
inlinestatic

Definition at line 369 of file locations.h.

369 {
371 }

◆ RequiresRegister()

static Location dart::Location::RequiresRegister ( )
inlinestatic

Definition at line 365 of file locations.h.

365 {
367 }

◆ RequiresStack()

static Location dart::Location::RequiresStack ( )
inlinestatic

Definition at line 354 of file locations.h.

354 {
356 }

◆ SameAsFirstInput()

static Location dart::Location::SameAsFirstInput ( )
inlinestatic

Definition at line 382 of file locations.h.

382 {
384 }

◆ stack_index()

intptr_t dart::Location::stack_index ( ) const
inline

Definition at line 485 of file locations.h.

485 {
487 // Decode stack index manually to preserve sign.
488 return StackIndexField::decode(payload()) - kStackIndexBias;
489 }

◆ StackSlot()

static Location dart::Location::StackSlot ( intptr_t  stack_index,
Register  base 
)
inlinestatic

Definition at line 447 of file locations.h.

447 {
450 Location loc(kStackSlot, payload);
451 // Ensure that sign is preserved.
452 ASSERT(loc.stack_index() == stack_index);
453 return loc;
454 }

◆ ToCallerSpRelative()

Location Location::ToCallerSpRelative ( ) const

Definition at line 265 of file locations.cc.

265 {
266 const auto fp_to_caller_sp_delta =
268 return ToSpRelative(fp_to_caller_sp_delta);
269}
Location ToSpRelative(intptr_t fp_to_sp_delta) const
Definition: locations.cc:240
FrameLayout frame_layout
Definition: stack_frame.cc:76
intptr_t param_end_from_fp
Definition: frame_layout.h:30

◆ ToCString()

const char * Location::ToCString ( ) const

Definition at line 445 of file locations.cc.

445 {
446 char buffer[1024];
447 BufferFormatter bf(buffer, 1024);
448 PrintTo(&bf);
450}
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
char * MakeCopyOfString(const char *str)
Definition: zone.cc:270
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
Definition: switches.h:126

◆ ToEntrySpRelative()

Location Location::ToEntrySpRelative ( ) const

Definition at line 258 of file locations.cc.

258 {
259 const auto fp_to_entry_sp_delta =
261 compiler::target::frame_layout.last_param_from_entry_sp;
262 return ToSpRelative(fp_to_entry_sp_delta);
263}

◆ ToSpRelative()

Location Location::ToSpRelative ( intptr_t  fp_to_sp_delta) const

Definition at line 240 of file locations.cc.

240 {
241 if (IsPairLocation()) {
242 auto pair = AsPairLocation();
243 return Pair(pair->At(0).ToSpRelative(fp_to_sp_delta),
244 pair->At(1).ToSpRelative(fp_to_sp_delta));
245 }
246
247 if (HasStackIndex()) {
248 ASSERT(base_reg() == FPREG);
251 EncodeStackIndex(stack_index() - fp_to_sp_delta));
252 return Location(kind(), payload);
253 }
254
255 return *this;
256}
const Register SPREG

◆ ToStackSlotOffset()

intptr_t Location::ToStackSlotOffset ( ) const

Definition at line 369 of file locations.cc.

369 {
371}
static constexpr intptr_t kWordSize
Definition: runtime_api.h:274

◆ UnallocatedLocation()

static Location dart::Location::UnallocatedLocation ( Policy  policy)
inlinestatic

Definition at line 347 of file locations.h.

347 {
349 }
static constexpr S encode(T value)
Definition: bitfield.h:165

◆ WritableRegister()

static Location dart::Location::WritableRegister ( )
inlinestatic

Definition at line 376 of file locations.h.

376 {
378 }

◆ Write()

void Location::Write ( FlowGraphSerializer s) const

Definition at line 1229 of file il_serializer.cc.

1229 {
1230 if (IsPairLocation()) {
1231 s->Write<uword>(value_ & kLocationTagMask);
1232 PairLocation* pair = AsPairLocation();
1233 pair->At(0).Write(s);
1234 pair->At(1).Write(s);
1235 } else if (IsConstant()) {
1236 s->Write<uword>(value_ & kLocationTagMask);
1237 s->WriteRef<Definition*>(constant_instruction());
1238 } else {
1239 s->Write<uword>(value_);
1240 }
1241}
struct MyStruct s

The documentation for this class was generated from the following files: