Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 6317 of file il.cc.

6321 {
6322 if (compiler->intrinsic_mode()) {
6323 __ TryAllocate(cls, compiler->intrinsic_slow_path_label(),
6325 } else {
6327 auto slow_path = new BoxAllocationSlowPath(instruction, cls, result);
6328 compiler->AddSlowPathCode(slow_path);
6329
6330 if (FLAG_inline_alloc && !FLAG_use_slow_path) {
6331 __ TryAllocate(cls, slow_path->entry_label(),
6333 } else {
6334 __ Jump(slow_path->entry_label());
6335 }
6336 __ Bind(slow_path->exit_label());
6337 }
6338}
#define __
#define RELEASE_ASSERT(cond)
Definition assert.h:327
BoxAllocationSlowPath(Instruction *instruction, const Class &cls, Register result)
virtual bool CanTriggerGC() const
Definition il.cc:1619

◆ EmitNativeCode()

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

Implements dart::SlowPathCode.

Definition at line 6291 of file il.cc.

6291 {
6293 __ Comment("%s slow path allocation of %s", instruction()->DebugName(),
6294 cls_.ScrubbedNameCString());
6295 }
6296 __ Bind(entry_label());
6297 const auto& stub = Code::ZoneHandle(
6299
6300 LocationSummary* locs = instruction()->locs();
6301
6303 compiler->SaveLiveRegisters(locs);
6304 // Box allocation slow paths cannot lazy-deopt.
6305 ASSERT(!kAllocateMintRuntimeEntry.can_lazy_deopt() &&
6306 !kAllocateDoubleRuntimeEntry.can_lazy_deopt() &&
6307 !kAllocateFloat32x4RuntimeEntry.can_lazy_deopt() &&
6308 !kAllocateFloat64x2RuntimeEntry.can_lazy_deopt());
6309 compiler->GenerateNonLazyDeoptableStubCall(
6310 InstructionSource(), // No token position.
6311 stub, UntaggedPcDescriptors::kOther, locs);
6312 __ MoveRegister(result_, AllocateBoxABI::kResultReg);
6313 compiler->RestoreLiveRegisters(locs);
6314 __ Jump(exit_label());
6315}
const char * ScrubbedNameCString() const
Definition object.cc:3046
LocationSummary * locs()
Definition il.h:1186
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: