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

#include <flow_graph_compiler.h>

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

Public Member Functions

 RangeErrorSlowPath (GenericCheckBoundInstr *instruction)
 
virtual const char * name ()
 
virtual intptr_t GetNumberOfArgumentsForRuntimeCall ()
 
virtual void PushArgumentsForRuntimeCall (FlowGraphCompiler *compiler)
 
virtual void EmitSharedStubCall (FlowGraphCompiler *compiler, bool save_fpu_registers)
 
- 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)
 

Detailed Description

Definition at line 273 of file flow_graph_compiler.h.

Constructor & Destructor Documentation

◆ RangeErrorSlowPath()

dart::RangeErrorSlowPath::RangeErrorSlowPath ( GenericCheckBoundInstr instruction)
inlineexplicit

Definition at line 275 of file flow_graph_compiler.h.

279 ? kRangeErrorUnboxedInt64RuntimeEntry
280 : kRangeErrorRuntimeEntry) {}
static bool UseUnboxedRepresentation()
Definition: il.h:10864
ThrowErrorSlowPathCode(Instruction *instruction, const RuntimeEntry &runtime_entry)

Member Function Documentation

◆ EmitSharedStubCall()

void dart::RangeErrorSlowPath::EmitSharedStubCall ( FlowGraphCompiler compiler,
bool  save_fpu_registers 
)
virtual

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 3234 of file flow_graph_compiler.cc.

3235 {
3236#if defined(TARGET_ARCH_IA32)
3237 UNREACHABLE();
3238#else
3239 auto object_store = compiler->isolate_group()->object_store();
3240 const auto& stub = Code::ZoneHandle(
3241 compiler->zone(),
3242 save_fpu_registers
3243 ? object_store->range_error_stub_with_fpu_regs_stub()
3244 : object_store->range_error_stub_without_fpu_regs_stub());
3245 compiler->EmitCallToStub(stub);
3246#endif
3247}
#define UNREACHABLE()
Definition: assert.h:248
static Object & ZoneHandle()
Definition: object.h:419

◆ GetNumberOfArgumentsForRuntimeCall()

virtual intptr_t dart::RangeErrorSlowPath::GetNumberOfArgumentsForRuntimeCall ( )
inlinevirtual

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 283 of file flow_graph_compiler.h.

283 {
285 return 0; // Unboxed arguments are passed through Thread.
286 }
287 return 2; // length and index
288 }

◆ name()

virtual const char * dart::RangeErrorSlowPath::name ( )
inlinevirtual

Implements dart::ThrowErrorSlowPathCode.

Definition at line 281 of file flow_graph_compiler.h.

281{ return "check bound"; }

◆ PushArgumentsForRuntimeCall()

void dart::RangeErrorSlowPath::PushArgumentsForRuntimeCall ( FlowGraphCompiler compiler)
virtual

Reimplemented from dart::ThrowErrorSlowPathCode.

Definition at line 3214 of file flow_graph_compiler.cc.

3215 {
3216 LocationSummary* locs = instruction()->locs();
3218 // Can't pass unboxed int64 value directly to runtime call, as all
3219 // arguments are expected to be tagged (boxed).
3220 // The unboxed int64 argument is passed through a dedicated slot in Thread.
3221 // TODO(dartbug.com/33549): Clean this up when unboxed values
3222 // could be passed as arguments.
3223 __ StoreToOffset(locs->in(CheckBoundBaseInstr::kLengthPos).reg(), THR,
3225 __ StoreToOffset(
3226 locs->in(CheckBoundBaseInstr::kIndexPos).reg(), THR,
3228 } else {
3229 __ PushRegisterPair(locs->in(CheckBoundBaseInstr::kIndexPos).reg(),
3230 locs->in(CheckBoundBaseInstr::kLengthPos).reg());
3231 }
3232}
LocationSummary * locs()
Definition: il.h:1192
static word unboxed_runtime_arg_offset()
#define __
const Register THR
constexpr intptr_t kInt64Size
Definition: globals.h:453

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