Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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 void EmitCodeAtSlowPathEntry (FlowGraphCompiler *compiler)
 
virtual void AddMetadataForRuntimeCall (FlowGraphCompiler *compiler)
 
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:10810
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 3223 of file flow_graph_compiler.cc.

3224 {
3225#if defined(TARGET_ARCH_IA32)
3226 UNREACHABLE();
3227#else
3228 auto object_store = compiler->isolate_group()->object_store();
3229 const auto& stub = Code::ZoneHandle(
3230 compiler->zone(),
3231 save_fpu_registers
3232 ? object_store->range_error_stub_with_fpu_regs_stub()
3233 : object_store->range_error_stub_without_fpu_regs_stub());
3234 compiler->EmitCallToStub(stub);
3235#endif
3236}
#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 3203 of file flow_graph_compiler.cc.

3204 {
3205 LocationSummary* locs = instruction()->locs();
3207 // Can't pass unboxed int64 value directly to runtime call, as all
3208 // arguments are expected to be tagged (boxed).
3209 // The unboxed int64 argument is passed through a dedicated slot in Thread.
3210 // TODO(dartbug.com/33549): Clean this up when unboxed values
3211 // could be passed as arguments.
3212 __ StoreToOffset(locs->in(CheckBoundBaseInstr::kLengthPos).reg(), THR,
3213 compiler::target::Thread::unboxed_runtime_arg_offset());
3214 __ StoreToOffset(
3215 locs->in(CheckBoundBaseInstr::kIndexPos).reg(), THR,
3216 compiler::target::Thread::unboxed_runtime_arg_offset() + kInt64Size);
3217 } else {
3218 __ PushRegisterPair(locs->in(CheckBoundBaseInstr::kIndexPos).reg(),
3219 locs->in(CheckBoundBaseInstr::kLengthPos).reg());
3220 }
3221}
#define __
LocationSummary * locs()
Definition il.h:1186
const Register THR
constexpr intptr_t kInt64Size
Definition globals.h:453

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