Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
dart::NullErrorSlowPath Class Reference

#include <flow_graph_compiler.h>

Inheritance diagram for dart::NullErrorSlowPath:
dart::ThrowErrorSlowPathCode dart::TemplateSlowPathCode< Instruction > dart::SlowPathCode dart::ZoneAllocated

Public Member Functions

 NullErrorSlowPath (CheckNullInstr *instruction)
 
CheckNullInstr::ExceptionType exception_type () const
 
const char * name () override
 
void EmitSharedStubCall (FlowGraphCompiler *compiler, bool save_fpu_registers) override
 
void AddMetadataForRuntimeCall (FlowGraphCompiler *compiler) override
 
- Public Member Functions inherited from dart::ThrowErrorSlowPathCode
 ThrowErrorSlowPathCode (Instruction *instruction, const RuntimeEntry &runtime_entry)
 
virtual void EmitCodeAtSlowPathEntry (FlowGraphCompiler *compiler)
 
virtual void PushArgumentsForRuntimeCall (FlowGraphCompiler *compiler)
 
virtual intptr_t GetNumberOfArgumentsForRuntimeCall ()
 
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 CodePtr GetStub (FlowGraphCompiler *compiler, CheckNullInstr::ExceptionType exception_type, bool save_fpu_registers)
 

Detailed Description

Definition at line 243 of file flow_graph_compiler.h.

Constructor & Destructor Documentation

◆ NullErrorSlowPath()

dart::NullErrorSlowPath::NullErrorSlowPath ( CheckNullInstr instruction)
inlineexplicit

Definition at line 245 of file flow_graph_compiler.h.

247 GetRuntimeEntry(instruction->exception_type())) {
248 }
ThrowErrorSlowPathCode(Instruction *instruction, const RuntimeEntry &runtime_entry)

Member Function Documentation

◆ AddMetadataForRuntimeCall()

void dart::NullErrorSlowPath::AddMetadataForRuntimeCall ( FlowGraphCompiler compiler)
inlineoverridevirtual

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 259 of file flow_graph_compiler.h.

259 {
261 compiler);
262 }
static void AddMetadataForRuntimeCall(CheckNullInstr *check_null, FlowGraphCompiler *compiler)
Definition il.cc:6286

◆ EmitSharedStubCall()

void dart::NullErrorSlowPath::EmitSharedStubCall ( FlowGraphCompiler compiler,
bool  save_fpu_registers 
)
overridevirtual

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 3191 of file flow_graph_compiler.cc.

3192 {
3193#if defined(TARGET_ARCH_IA32)
3194 UNREACHABLE();
3195#else
3196 const auto& stub =
3197 Code::ZoneHandle(compiler->zone(),
3198 GetStub(compiler, exception_type(), save_fpu_registers));
3199 compiler->EmitCallToStub(stub);
3200#endif
3201}
#define UNREACHABLE()
Definition assert.h:248
static CodePtr GetStub(FlowGraphCompiler *compiler, CheckNullInstr::ExceptionType exception_type, bool save_fpu_registers)
CheckNullInstr::ExceptionType exception_type() const
static Object & ZoneHandle()
Definition object.h:419

◆ exception_type()

CheckNullInstr::ExceptionType dart::NullErrorSlowPath::exception_type ( ) const
inline

Definition at line 250 of file flow_graph_compiler.h.

250 {
251 return instruction()->AsCheckNull()->exception_type();
252 }

◆ GetStub()

CodePtr dart::NullErrorSlowPath::GetStub ( FlowGraphCompiler compiler,
CheckNullInstr::ExceptionType  exception_type,
bool  save_fpu_registers 
)
static

Definition at line 3170 of file flow_graph_compiler.cc.

3172 {
3173 auto object_store = compiler->isolate_group()->object_store();
3174 switch (exception_type) {
3176 return save_fpu_registers
3177 ? object_store->null_error_stub_with_fpu_regs_stub()
3178 : object_store->null_error_stub_without_fpu_regs_stub();
3180 return save_fpu_registers
3181 ? object_store->null_arg_error_stub_with_fpu_regs_stub()
3182 : object_store->null_arg_error_stub_without_fpu_regs_stub();
3184 return save_fpu_registers
3185 ? object_store->null_cast_error_stub_with_fpu_regs_stub()
3186 : object_store->null_cast_error_stub_without_fpu_regs_stub();
3187 }
3188 UNREACHABLE();
3189}

◆ name()

const char * dart::NullErrorSlowPath::name ( )
overridevirtual

Implements dart::ThrowErrorSlowPathCode.

Definition at line 3145 of file flow_graph_compiler.cc.

3145 {
3146 switch (exception_type()) {
3148 return "check null (nsm)";
3150 return "check null (arg)";
3152 return "check null (cast)";
3153 }
3154 UNREACHABLE();
3155}

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