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

#include <flow_graph_compiler.h>

Inheritance diagram for dart::BoxAllocationSlowPath:
dart::TemplateSlowPathCode< Instruction > dart::SlowPathCode dart::ZoneAllocated

Public Member Functions

 BoxAllocationSlowPath (Instruction *instruction, const Class &cls, Register result)
 
virtual void EmitNativeCode (FlowGraphCompiler *compiler)
 
- Public Member Functions inherited from dart::TemplateSlowPathCode< Instruction >
 TemplateSlowPathCode (Instruction *instruction)
 
Instructioninstruction () const
 
- Public Member Functions inherited from dart::SlowPathCode
 SlowPathCode (Instruction *instruction)
 
virtual ~SlowPathCode ()
 
Instructioninstruction () const
 
compiler::Labelentry_label ()
 
compiler::Labelexit_label ()
 
void GenerateCode (FlowGraphCompiler *compiler)
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Static Public Member Functions

static void Allocate (FlowGraphCompiler *compiler, Instruction *instruction, const Class &cls, Register result, Register temp)
 

Detailed Description

Definition at line 181 of file flow_graph_compiler.h.

Constructor & Destructor Documentation

◆ BoxAllocationSlowPath()

dart::BoxAllocationSlowPath::BoxAllocationSlowPath ( Instruction instruction,
const Class cls,
Register  result 
)
inline

Definition at line 183 of file flow_graph_compiler.h.

186 : TemplateSlowPathCode(instruction), cls_(cls), result_(result) {}
GAsyncResult * result

Member Function Documentation

◆ Allocate()

void dart::BoxAllocationSlowPath::Allocate ( FlowGraphCompiler compiler,
Instruction instruction,
const Class cls,
Register  result,
Register  temp 
)
static

Definition at line 6309 of file il.cc.

6313 {
6314 if (compiler->intrinsic_mode()) {
6315 __ TryAllocate(cls, compiler->intrinsic_slow_path_label(),
6317 } else {
6319 auto slow_path = new BoxAllocationSlowPath(instruction, cls, result);
6320 compiler->AddSlowPathCode(slow_path);
6321
6322 if (FLAG_inline_alloc && !FLAG_use_slow_path) {
6323 __ TryAllocate(cls, slow_path->entry_label(),
6325 } else {
6326 __ Jump(slow_path->entry_label());
6327 }
6328 __ Bind(slow_path->exit_label());
6329 }
6330}
#define RELEASE_ASSERT(cond)
Definition: assert.h:327
BoxAllocationSlowPath(Instruction *instruction, const Class &cls, Register result)
virtual bool CanTriggerGC() const
Definition: il.cc:1628
#define __
Definition: il.cc:4271
static bool Bind(PassBindingsCacheMTL &pass, ShaderStage stage, size_t bind_index, const BufferView &view)

◆ EmitNativeCode()

void dart::BoxAllocationSlowPath::EmitNativeCode ( FlowGraphCompiler compiler)
virtual

Implements dart::SlowPathCode.

Definition at line 6283 of file il.cc.

6283 {
6285 __ Comment("%s slow path allocation of %s", instruction()->DebugName(),
6286 cls_.ScrubbedNameCString());
6287 }
6288 __ Bind(entry_label());
6289 const auto& stub = Code::ZoneHandle(
6291
6292 LocationSummary* locs = instruction()->locs();
6293
6295 compiler->SaveLiveRegisters(locs);
6296 // Box allocation slow paths cannot lazy-deopt.
6297 ASSERT(!kAllocateMintRuntimeEntry.can_lazy_deopt() &&
6298 !kAllocateDoubleRuntimeEntry.can_lazy_deopt() &&
6299 !kAllocateFloat32x4RuntimeEntry.can_lazy_deopt() &&
6300 !kAllocateFloat64x2RuntimeEntry.can_lazy_deopt());
6301 compiler->GenerateNonLazyDeoptableStubCall(
6302 InstructionSource(), // No token position.
6303 stub, UntaggedPcDescriptors::kOther, locs);
6304 __ MoveRegister(result_, AllocateBoxABI::kResultReg);
6305 compiler->RestoreLiveRegisters(locs);
6306 __ Jump(exit_label());
6307}
const char * ScrubbedNameCString() const
Definition: object.cc:2985
LocationSummary * locs()
Definition: il.h:1192
RegisterSet * live_registers()
Definition: locations.h:941
static Location RegisterLocation(Register reg)
Definition: locations.h:398
static Object & ZoneHandle()
Definition: object.h:419
void Remove(Location loc)
Definition: locations.h:766
compiler::Label * entry_label()
compiler::Label * exit_label()
static CodePtr GetAllocationStubForClass(const Class &cls)
Definition: stub_code.cc:174
void static bool EmittingComments()
#define ASSERT(E)
static constexpr Register kResultReg

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