V8 Project
v8::internal::CodeStubDescriptor Class Reference

#include <code-stubs.h>

+ Collaboration diagram for v8::internal::CodeStubDescriptor:

Public Member Functions

 CodeStubDescriptor (CodeStub *stub)
 
 CodeStubDescriptor (Isolate *isolate, uint32_t stub_key)
 
void Initialize (Address deoptimization_handler=NULL, int hint_stack_parameter_count=-1, StubFunctionMode function_mode=NOT_JS_FUNCTION_STUB_MODE)
 
void Initialize (Register stack_parameter_count, Address deoptimization_handler=NULL, int hint_stack_parameter_count=-1, StubFunctionMode function_mode=NOT_JS_FUNCTION_STUB_MODE, HandlerArgumentsMode handler_mode=DONT_PASS_ARGUMENTS)
 
void SetMissHandler (ExternalReference handler)
 
void set_call_descriptor (CallInterfaceDescriptor d)
 
CallInterfaceDescriptor call_descriptor () const
 
int GetEnvironmentParameterCount () const
 
Representation GetEnvironmentParameterRepresentation (int index) const
 
ExternalReference miss_handler () const
 
bool has_miss_handler () const
 
bool IsEnvironmentParameterCountRegister (int index) const
 
int GetHandlerParameterCount () const
 
int hint_stack_parameter_count () const
 
Register stack_parameter_count () const
 
StubFunctionMode function_mode () const
 
Address deoptimization_handler () const
 

Private Attributes

CallInterfaceDescriptor call_descriptor_
 
Register stack_parameter_count_
 
int hint_stack_parameter_count_
 
StubFunctionMode function_mode_
 
Address deoptimization_handler_
 
HandlerArgumentsMode handler_arguments_mode_
 
ExternalReference miss_handler_
 
bool has_miss_handler_
 

Detailed Description

Definition at line 354 of file code-stubs.h.

Constructor & Destructor Documentation

◆ CodeStubDescriptor() [1/2]

v8::internal::CodeStubDescriptor::CodeStubDescriptor ( CodeStub stub)
explicit

Definition at line 20 of file code-stubs.cc.

21  : call_descriptor_(stub->GetCallInterfaceDescriptor()),
27  miss_handler_(),
28  has_miss_handler_(false) {
29  stub->InitializeDescriptor(this);
30 }
StubFunctionMode function_mode_
Definition: code-stubs.h:421
CallInterfaceDescriptor call_descriptor_
Definition: code-stubs.h:416
ExternalReference miss_handler_
Definition: code-stubs.h:426
HandlerArgumentsMode handler_arguments_mode_
Definition: code-stubs.h:424
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
@ NOT_JS_FUNCTION_STUB_MODE
Definition: code-stubs.h:350
const Register no_reg
@ DONT_PASS_ARGUMENTS
Definition: code-stubs.h:351

◆ CodeStubDescriptor() [2/2]

v8::internal::CodeStubDescriptor::CodeStubDescriptor ( Isolate isolate,
uint32_t  stub_key 
)

Definition at line 33 of file code-stubs.cc.

39  miss_handler_(),
40  has_miss_handler_(false) {
41  CodeStub::InitializeDescriptor(isolate, stub_key, this);
42 }

Member Function Documentation

◆ call_descriptor()

CallInterfaceDescriptor v8::internal::CodeStubDescriptor::call_descriptor ( ) const
inline

Definition at line 378 of file code-stubs.h.

378 { return call_descriptor_; }

References call_descriptor_.

Referenced by GetEnvironmentParameterCount(), GetEnvironmentParameterRepresentation(), GetHandlerParameterCount(), and IsEnvironmentParameterCountRegister().

+ Here is the caller graph for this function:

◆ deoptimization_handler()

Address v8::internal::CodeStubDescriptor::deoptimization_handler ( ) const
inline

Definition at line 413 of file code-stubs.h.

413 { return deoptimization_handler_; }

References deoptimization_handler_.

Referenced by Initialize(), and v8::internal::Deoptimizer::SetPlatformCompiledStubRegisters().

+ Here is the caller graph for this function:

◆ function_mode()

StubFunctionMode v8::internal::CodeStubDescriptor::function_mode ( ) const
inline

Definition at line 412 of file code-stubs.h.

412 { return function_mode_; }

References function_mode_.

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), and Initialize().

+ Here is the caller graph for this function:

◆ GetEnvironmentParameterCount()

int v8::internal::CodeStubDescriptor::GetEnvironmentParameterCount ( ) const
inline

Definition at line 380 of file code-stubs.h.

380  {
382  }
CallInterfaceDescriptor call_descriptor() const
Definition: code-stubs.h:378

References call_descriptor(), and v8::internal::CallInterfaceDescriptor::GetEnvironmentParameterCount().

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), v8::internal::CodeStubGraphBuilderBase::CodeStubGraphBuilderBase(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), and v8::internal::CodeStubGraphBuilderBase::GetParameter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetEnvironmentParameterRepresentation()

Representation v8::internal::CodeStubDescriptor::GetEnvironmentParameterRepresentation ( int  index) const
inline

Definition at line 384 of file code-stubs.h.

384  {
386  }
Representation GetEnvironmentParameterRepresentation(int index) const

References call_descriptor(), and v8::internal::CallInterfaceDescriptor::GetEnvironmentParameterRepresentation().

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHandlerParameterCount()

int v8::internal::CodeStubDescriptor::GetHandlerParameterCount ( ) const
inline

Definition at line 402 of file code-stubs.h.

402  {
405  params += 1;
406  }
407  return params;
408  }

References call_descriptor(), v8::internal::CallInterfaceDescriptor::GetEnvironmentParameterCount(), handler_arguments_mode_, and v8::internal::PASS_ARGUMENTS.

Referenced by v8::internal::Deoptimizer::SetPlatformCompiledStubRegisters().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ has_miss_handler()

bool v8::internal::CodeStubDescriptor::has_miss_handler ( ) const
inline

Definition at line 393 of file code-stubs.h.

393  {
394  return has_miss_handler_;
395  }

References has_miss_handler_.

Referenced by v8::internal::DoGenerateCode().

+ Here is the caller graph for this function:

◆ hint_stack_parameter_count()

int v8::internal::CodeStubDescriptor::hint_stack_parameter_count ( ) const
inline

Definition at line 410 of file code-stubs.h.

410 { return hint_stack_parameter_count_; }

References hint_stack_parameter_count_.

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), and Initialize().

+ Here is the caller graph for this function:

◆ Initialize() [1/2]

void v8::internal::CodeStubDescriptor::Initialize ( Address  deoptimization_handler = NULL,
int  hint_stack_parameter_count = -1,
StubFunctionMode  function_mode = NOT_JS_FUNCTION_STUB_MODE 
)

Definition at line 45 of file code-stubs.cc.

References deoptimization_handler(), deoptimization_handler_, function_mode(), function_mode_, hint_stack_parameter_count(), and hint_stack_parameter_count_.

Referenced by Initialize(), v8::internal::HandlerStub::InitializeDescriptor(), and v8::internal::InitializeVectorLoadStub().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Initialize() [2/2]

void v8::internal::CodeStubDescriptor::Initialize ( Register  stack_parameter_count,
Address  deoptimization_handler = NULL,
int  hint_stack_parameter_count = -1,
StubFunctionMode  function_mode = NOT_JS_FUNCTION_STUB_MODE,
HandlerArgumentsMode  handler_mode = DONT_PASS_ARGUMENTS 
)

Definition at line 54 of file code-stubs.cc.

58  {
61  handler_arguments_mode_ = handler_mode;
62 }
void Initialize(Address deoptimization_handler=NULL, int hint_stack_parameter_count=-1, StubFunctionMode function_mode=NOT_JS_FUNCTION_STUB_MODE)
Definition: code-stubs.cc:45
Register stack_parameter_count() const
Definition: code-stubs.h:411

References deoptimization_handler(), function_mode(), handler_arguments_mode_, hint_stack_parameter_count(), Initialize(), stack_parameter_count(), and stack_parameter_count_.

+ Here is the call graph for this function:

◆ IsEnvironmentParameterCountRegister()

bool v8::internal::CodeStubDescriptor::IsEnvironmentParameterCountRegister ( int  index) const
inline

Definition at line 397 of file code-stubs.h.

397  {
400  }
Register GetEnvironmentParameterRegister(int index) const
bool is(Register reg) const

References call_descriptor(), v8::internal::CallInterfaceDescriptor::GetEnvironmentParameterRegister(), v8::internal::Register::is(), and stack_parameter_count_.

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), and v8::internal::Deoptimizer::DoComputeCompiledStubFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ miss_handler()

ExternalReference v8::internal::CodeStubDescriptor::miss_handler ( ) const
inline

Definition at line 388 of file code-stubs.h.

388  {
390  return miss_handler_;
391  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, has_miss_handler_, and miss_handler_.

Referenced by v8::internal::DoGenerateCode().

+ Here is the caller graph for this function:

◆ set_call_descriptor()

void v8::internal::CodeStubDescriptor::set_call_descriptor ( CallInterfaceDescriptor  d)
inline

Definition at line 377 of file code-stubs.h.

377 { call_descriptor_ = d; }

References call_descriptor_.

Referenced by v8::internal::InitializeDescriptorDispatchedCall().

+ Here is the caller graph for this function:

◆ SetMissHandler()

void v8::internal::CodeStubDescriptor::SetMissHandler ( ExternalReference  handler)
inline

Definition at line 369 of file code-stubs.h.

369  {
370  miss_handler_ = handler;
371  has_miss_handler_ = true;
372  // Our miss handler infrastructure doesn't currently support
373  // variable stack parameter counts.
375  }

References DCHECK, has_miss_handler_, v8::internal::Register::is_valid(), miss_handler_, and stack_parameter_count_.

+ Here is the call graph for this function:

◆ stack_parameter_count()

Register v8::internal::CodeStubDescriptor::stack_parameter_count ( ) const
inline

Definition at line 411 of file code-stubs.h.

411 { return stack_parameter_count_; }

References stack_parameter_count_.

Referenced by v8::internal::CodeStubGraphBuilderBase::BuildGraph(), v8::internal::Deoptimizer::DoComputeCompiledStubFrame(), v8::internal::DoGenerateCode(), and Initialize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ call_descriptor_

CallInterfaceDescriptor v8::internal::CodeStubDescriptor::call_descriptor_
private

Definition at line 416 of file code-stubs.h.

Referenced by call_descriptor(), and set_call_descriptor().

◆ deoptimization_handler_

Address v8::internal::CodeStubDescriptor::deoptimization_handler_
private

Definition at line 423 of file code-stubs.h.

Referenced by deoptimization_handler(), and Initialize().

◆ function_mode_

StubFunctionMode v8::internal::CodeStubDescriptor::function_mode_
private

Definition at line 421 of file code-stubs.h.

Referenced by function_mode(), and Initialize().

◆ handler_arguments_mode_

HandlerArgumentsMode v8::internal::CodeStubDescriptor::handler_arguments_mode_
private

Definition at line 424 of file code-stubs.h.

Referenced by GetHandlerParameterCount(), and Initialize().

◆ has_miss_handler_

bool v8::internal::CodeStubDescriptor::has_miss_handler_
private

Definition at line 427 of file code-stubs.h.

Referenced by has_miss_handler(), miss_handler(), and SetMissHandler().

◆ hint_stack_parameter_count_

int v8::internal::CodeStubDescriptor::hint_stack_parameter_count_
private

Definition at line 420 of file code-stubs.h.

Referenced by hint_stack_parameter_count(), and Initialize().

◆ miss_handler_

ExternalReference v8::internal::CodeStubDescriptor::miss_handler_
private

Definition at line 426 of file code-stubs.h.

Referenced by miss_handler(), and SetMissHandler().

◆ stack_parameter_count_

Register v8::internal::CodeStubDescriptor::stack_parameter_count_
private

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