Flutter Engine
The Flutter Engine
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 const char * name ()=0
 
virtual void EmitCodeAtSlowPathEntry (FlowGraphCompiler *compiler)
 
virtual void AddMetadataForRuntimeCall (FlowGraphCompiler *compiler)
 
virtual void PushArgumentsForRuntimeCall (FlowGraphCompiler *compiler)
 
virtual intptr_t GetNumberOfArgumentsForRuntimeCall ()
 
virtual void EmitSharedStubCall (FlowGraphCompiler *compiler, bool save_fpu_registers)
 
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:6278

◆ EmitSharedStubCall()

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

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 3202 of file flow_graph_compiler.cc.

3203 {
3204#if defined(TARGET_ARCH_IA32)
3205 UNREACHABLE();
3206#else
3207 const auto& stub =
3208 Code::ZoneHandle(compiler->zone(),
3209 GetStub(compiler, exception_type(), save_fpu_registers));
3210 compiler->EmitCallToStub(stub);
3211#endif
3212}
#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 3181 of file flow_graph_compiler.cc.

3183 {
3184 auto object_store = compiler->isolate_group()->object_store();
3185 switch (exception_type) {
3187 return save_fpu_registers
3188 ? object_store->null_error_stub_with_fpu_regs_stub()
3189 : object_store->null_error_stub_without_fpu_regs_stub();
3191 return save_fpu_registers
3192 ? object_store->null_arg_error_stub_with_fpu_regs_stub()
3193 : object_store->null_arg_error_stub_without_fpu_regs_stub();
3195 return save_fpu_registers
3196 ? object_store->null_cast_error_stub_with_fpu_regs_stub()
3197 : object_store->null_cast_error_stub_without_fpu_regs_stub();
3198 }
3199 UNREACHABLE();
3200}

◆ name()

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

Implements dart::ThrowErrorSlowPathCode.

Definition at line 3156 of file flow_graph_compiler.cc.

3156 {
3157 switch (exception_type()) {
3159 return "check null (nsm)";
3161 return "check null (arg)";
3163 return "check null (cast)";
3164 }
3165 UNREACHABLE();
3166}

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