V8 Project
v8::internal::LCodeGen::X87Stack Class Reference
+ Inheritance diagram for v8::internal::LCodeGen::X87Stack:
+ Collaboration diagram for v8::internal::LCodeGen::X87Stack:

Public Member Functions

 X87Stack (MacroAssembler *masm)
 
 X87Stack (const X87Stack &other)
 
bool operator== (const X87Stack &other) const
 
X87Stackoperator= (const X87Stack &other)
 
bool Contains (X87Register reg)
 
void Fxch (X87Register reg, int other_slot=0)
 
void Free (X87Register reg)
 
void PrepareToWrite (X87Register reg)
 
void CommitWrite (X87Register reg)
 
void FlushIfNecessary (LInstruction *instr, LCodeGen *cgen)
 
void LeavingBlock (int current_block_id, LGoto *goto_instr, LCodeGen *cgen)
 
int depth () const
 
int GetLayout ()
 
int st (X87Register reg)
 
void pop ()
 
void push (X87Register reg)
 
MacroAssemblermasm () const
 
Isolateisolate () const
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Private Member Functions

int ArrayIndex (X87Register reg)
 
int st2idx (int pos)
 

Private Attributes

X87Register stack_ [X87Register::kMaxNumAllocatableRegisters]
 
int stack_depth_
 
bool is_mutable_
 
MacroAssemblermasm_
 

Detailed Description

Definition at line 380 of file lithium-codegen-x87.h.

Constructor & Destructor Documentation

◆ X87Stack() [1/2]

v8::internal::LCodeGen::X87Stack::X87Stack ( MacroAssembler masm)
inlineexplicit

◆ X87Stack() [2/2]

v8::internal::LCodeGen::X87Stack::X87Stack ( const X87Stack other)
inlineexplicit

Definition at line 384 of file lithium-codegen-x87.h.

385  : stack_depth_(other.stack_depth_), is_mutable_(false), masm_(masm()) {
386  for (int i = 0; i < stack_depth_; i++) {
387  stack_[i] = other.stack_[i];
388  }
389  }
X87Register stack_[X87Register::kMaxNumAllocatableRegisters]

References stack_, and stack_depth_.

Member Function Documentation

◆ ArrayIndex()

int v8::internal::LCodeGen::X87Stack::ArrayIndex ( X87Register  reg)
private

Referenced by st().

+ Here is the caller graph for this function:

◆ CommitWrite()

void v8::internal::LCodeGen::X87Stack::CommitWrite ( X87Register  reg)

Referenced by v8::internal::LCodeGen::X87CommitWrite().

+ Here is the caller graph for this function:

◆ Contains()

bool v8::internal::LCodeGen::X87Stack::Contains ( X87Register  reg)

◆ depth()

int v8::internal::LCodeGen::X87Stack::depth ( ) const
inline

Definition at line 411 of file lithium-codegen-x87.h.

411 { return stack_depth_; }

References stack_depth_.

Referenced by v8::internal::LCodeGen::X87StackEmpty().

+ Here is the caller graph for this function:

◆ FlushIfNecessary()

void v8::internal::LCodeGen::X87Stack::FlushIfNecessary ( LInstruction instr,
LCodeGen cgen 
)

Referenced by v8::internal::LCodeGen::FlushX87StackIfNecessary().

+ Here is the caller graph for this function:

◆ Free()

void v8::internal::LCodeGen::X87Stack::Free ( X87Register  reg)

Referenced by v8::internal::LCodeGen::X87Free().

+ Here is the caller graph for this function:

◆ Fxch()

void v8::internal::LCodeGen::X87Stack::Fxch ( X87Register  reg,
int  other_slot = 0 
)

Referenced by v8::internal::LCodeGen::X87Fxch().

+ Here is the caller graph for this function:

◆ GetLayout()

int v8::internal::LCodeGen::X87Stack::GetLayout ( )

◆ isolate()

Isolate* v8::internal::LCodeGen::X87Stack::isolate ( ) const
inline

Definition at line 426 of file lithium-codegen-x87.h.

426 { return masm_->isolate(); }
Isolate * isolate() const
Definition: assembler.h:62

References v8::internal::AssemblerBase::isolate(), and masm_.

+ Here is the call graph for this function:

◆ LeavingBlock()

void v8::internal::LCodeGen::X87Stack::LeavingBlock ( int  current_block_id,
LGoto *  goto_instr,
LCodeGen cgen 
)

◆ masm()

MacroAssembler* v8::internal::LCodeGen::X87Stack::masm ( ) const
inline

Definition at line 425 of file lithium-codegen-x87.h.

425 { return masm_; }

References masm_.

◆ operator=()

X87Stack& v8::internal::LCodeGen::X87Stack::operator= ( const X87Stack other)
inline

Definition at line 397 of file lithium-codegen-x87.h.

397  {
398  stack_depth_ = other.stack_depth_;
399  for (int i = 0; i < stack_depth_; i++) {
400  stack_[i] = other.stack_[i];
401  }
402  return *this;
403  }

References stack_, and stack_depth_.

◆ operator==()

bool v8::internal::LCodeGen::X87Stack::operator== ( const X87Stack other) const
inline

Definition at line 390 of file lithium-codegen-x87.h.

390  {
391  if (stack_depth_ != other.stack_depth_) return false;
392  for (int i = 0; i < stack_depth_; i++) {
393  if (!stack_[i].is(other.stack_[i])) return false;
394  }
395  return true;
396  }

References stack_, and stack_depth_.

◆ pop()

void v8::internal::LCodeGen::X87Stack::pop ( )
inline

Definition at line 414 of file lithium-codegen-x87.h.

414  {
416  stack_depth_--;
417  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, is_mutable_, and stack_depth_.

◆ PrepareToWrite()

void v8::internal::LCodeGen::X87Stack::PrepareToWrite ( X87Register  reg)

Referenced by v8::internal::LCodeGen::X87PrepareToWrite().

+ Here is the caller graph for this function:

◆ push()

void v8::internal::LCodeGen::X87Stack::push ( X87Register  reg)
inline

◆ st()

int v8::internal::LCodeGen::X87Stack::st ( X87Register  reg)
inline

Definition at line 413 of file lithium-codegen-x87.h.

413 { return st2idx(ArrayIndex(reg)); }
int ArrayIndex(X87Register reg)

References ArrayIndex(), and st2idx().

+ Here is the call graph for this function:

◆ st2idx()

int v8::internal::LCodeGen::X87Stack::st2idx ( int  pos)
private

Referenced by st().

+ Here is the caller graph for this function:

Member Data Documentation

◆ is_mutable_

bool v8::internal::LCodeGen::X87Stack::is_mutable_
private

Definition at line 434 of file lithium-codegen-x87.h.

Referenced by pop(), and push().

◆ masm_

MacroAssembler* v8::internal::LCodeGen::X87Stack::masm_
private

Definition at line 435 of file lithium-codegen-x87.h.

Referenced by isolate(), and masm().

◆ stack_

X87Register v8::internal::LCodeGen::X87Stack::stack_[X87Register::kMaxNumAllocatableRegisters]
private

Definition at line 432 of file lithium-codegen-x87.h.

Referenced by operator=(), operator==(), push(), and X87Stack().

◆ stack_depth_

int v8::internal::LCodeGen::X87Stack::stack_depth_
private

Definition at line 433 of file lithium-codegen-x87.h.

Referenced by depth(), operator=(), operator==(), pop(), push(), and X87Stack().


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