V8 Project
v8::internal::ArrayConstructorStub Class Reference

#include <code-stubs.h>

+ Inheritance diagram for v8::internal::ArrayConstructorStub:
+ Collaboration diagram for v8::internal::ArrayConstructorStub:

Classes

class  ArgumentCountBits
 

Public Types

enum  ArgumentCountKey { ANY , NONE , ONE , MORE_THAN_ONE }
 

Public Member Functions

 ArrayConstructorStub (Isolate *isolate, int argument_count)
 
 ArrayConstructorStub (Isolate *isolate)
 
- Public Member Functions inherited from v8::internal::PlatformCodeStub
virtual Handle< CodeGenerateCode () OVERRIDE
 
virtual Code::Kind GetCodeKind () const
 

Private Member Functions

ArgumentCountKey argument_count () const
 
void GenerateDispatchToArrayStub (MacroAssembler *masm, AllocationSiteOverrideMode mode)
 
virtual void PrintName (OStream &os) const OVERRIDE
 
 DEFINE_CALL_INTERFACE_DESCRIPTOR (ArrayConstructor)
 
 DEFINE_PLATFORM_CODE_STUB (ArrayConstructor, PlatformCodeStub)
 

Additional Inherited Members

- Protected Member Functions inherited from v8::internal::PlatformCodeStub
 PlatformCodeStub (Isolate *isolate)
 
virtual void Generate (MacroAssembler *masm)=0
 
 DEFINE_CODE_STUB_BASE (PlatformCodeStub, CodeStub)
 

Detailed Description

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

Member Enumeration Documentation

◆ ArgumentCountKey

Constructor & Destructor Documentation

◆ ArrayConstructorStub() [1/2]

v8::internal::ArrayConstructorStub::ArrayConstructorStub ( Isolate isolate,
int  argument_count 
)

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

943  : PlatformCodeStub(isolate) {
944  if (argument_count == 0) {
945  minor_key_ = ArgumentCountBits::encode(NONE);
946  } else if (argument_count == 1) {
947  minor_key_ = ArgumentCountBits::encode(ONE);
948  } else if (argument_count >= 2) {
950  } else {
951  UNREACHABLE();
952  }
954 }
static void GenerateStubsAheadOfTime(Isolate *isolate)
ArgumentCountKey argument_count() const
Definition: code-stubs.h:732
static U encode(T value)
Definition: utils.h:217
PlatformCodeStub(Isolate *isolate)
Definition: code-stubs.h:341
#define UNREACHABLE()
Definition: logging.h:30

References argument_count(), v8::internal::BitFieldBase< T, shift, size, U >::encode(), v8::internal::ArrayConstructorStubBase::GenerateStubsAheadOfTime(), MORE_THAN_ONE, NONE, ONE, and UNREACHABLE.

+ Here is the call graph for this function:

◆ ArrayConstructorStub() [2/2]

v8::internal::ArrayConstructorStub::ArrayConstructorStub ( Isolate isolate)
explicit

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

935  : PlatformCodeStub(isolate) {
936  minor_key_ = ArgumentCountBits::encode(ANY);
938 }

References ANY, v8::internal::BitFieldBase< T, shift, size, U >::encode(), and v8::internal::ArrayConstructorStubBase::GenerateStubsAheadOfTime().

+ Here is the call graph for this function:

Member Function Documentation

◆ argument_count()

ArgumentCountKey v8::internal::ArrayConstructorStub::argument_count ( ) const
inlineprivate

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

732  {
733  return ArgumentCountBits::decode(minor_key_);
734  }
static T decode(U value)
Definition: utils.h:228

References v8::internal::BitFieldBase< T, shift, size, U >::decode().

Referenced by ArrayConstructorStub(), and PrintName().

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

◆ DEFINE_CALL_INTERFACE_DESCRIPTOR()

v8::internal::ArrayConstructorStub::DEFINE_CALL_INTERFACE_DESCRIPTOR ( ArrayConstructor  )
private

◆ DEFINE_PLATFORM_CODE_STUB()

v8::internal::ArrayConstructorStub::DEFINE_PLATFORM_CODE_STUB ( ArrayConstructor  ,
PlatformCodeStub   
)
private

◆ GenerateDispatchToArrayStub()

void v8::internal::ArrayConstructorStub::GenerateDispatchToArrayStub ( MacroAssembler masm,
AllocationSiteOverrideMode  mode 
)
private

◆ PrintName()

void v8::internal::ArrayConstructorStub::PrintName ( OStream os) const
privatevirtual

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

806  { // NOLINT
807  os << "ArrayConstructorStub";
808  switch (argument_count()) {
809  case ANY:
810  os << "_Any";
811  break;
812  case NONE:
813  os << "_None";
814  break;
815  case ONE:
816  os << "_One";
817  break;
818  case MORE_THAN_ONE:
819  os << "_More_Than_One";
820  break;
821  }
822  return;
823 }

References ANY, argument_count(), MORE_THAN_ONE, NONE, and ONE.

+ Here is the call graph for this function:

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