V8 Project
v8::internal::compiler::GapInstruction Class Reference

#include <instruction.h>

+ Inheritance diagram for v8::internal::compiler::GapInstruction:
+ Collaboration diagram for v8::internal::compiler::GapInstruction:

Public Types

enum  InnerPosition {
  BEFORE , START , END , AFTER ,
  FIRST_INNER_POSITION = BEFORE , LAST_INNER_POSITION = AFTER
}
 

Public Member Functions

ParallelMove * GetOrCreateParallelMove (InnerPosition pos, Zone *zone)
 
ParallelMove * GetParallelMove (InnerPosition pos)
 
- Public Member Functions inherited from v8::internal::compiler::Instruction
size_t OutputCount () const
 
InstructionOperandOutputAt (size_t i) const
 
bool HasOutput () const
 
InstructionOperandOutput () const
 
size_t InputCount () const
 
InstructionOperandInputAt (size_t i) const
 
size_t TempCount () const
 
InstructionOperandTempAt (size_t i) const
 
InstructionCode opcode () const
 
ArchOpcode arch_opcode () const
 
AddressingMode addressing_mode () const
 
FlagsMode flags_mode () const
 
FlagsCondition flags_condition () const
 
InstructionMarkAsControl ()
 
InstructionMarkAsCall ()
 
bool IsControl () const
 
bool IsCall () const
 
bool NeedsPointerMap () const
 
bool HasPointerMap () const
 
bool IsGapMoves () const
 
bool IsBlockStart () const
 
bool IsSourcePosition () const
 
bool ClobbersRegisters () const
 
bool ClobbersTemps () const
 
bool ClobbersDoubleRegisters () const
 
PointerMap * pointer_map () const
 
void set_pointer_map (PointerMap *map)
 
void * operator new (size_t, void *location)
 
void operator delete (void *pointer, void *location)
 
- 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)
 

Static Public Member Functions

static GapInstructionNew (Zone *zone)
 
static GapInstructioncast (Instruction *instr)
 
static const GapInstructioncast (const Instruction *instr)
 
- Static Public Member Functions inherited from v8::internal::compiler::Instruction
static InstructionNew (Zone *zone, InstructionCode opcode)
 
static InstructionNew (Zone *zone, InstructionCode opcode, size_t output_count, InstructionOperand **outputs, size_t input_count, InstructionOperand **inputs, size_t temp_count, InstructionOperand **temps)
 

Protected Member Functions

 GapInstruction (InstructionCode opcode)
 
- Protected Member Functions inherited from v8::internal::compiler::Instruction
 Instruction (InstructionCode opcode)
 
 Instruction (InstructionCode opcode, size_t output_count, InstructionOperand **outputs, size_t input_count, InstructionOperand **inputs, size_t temp_count, InstructionOperand **temps)
 

Private Attributes

ParallelMove * parallel_moves_ [LAST_INNER_POSITION+1]
 

Friends

OStreamoperator<< (OStream &os, const Instruction &instr)
 

Additional Inherited Members

- Protected Types inherited from v8::internal::compiler::Instruction
typedef BitField< size_t, 0, 8 > OutputCountField
 
typedef BitField< size_t, 8, 16 > InputCountField
 
typedef BitField< size_t, 24, 6 > TempCountField
 
typedef BitField< bool, 30, 1 > IsCallField
 
typedef BitField< bool, 31, 1 > IsControlField
 
- Protected Attributes inherited from v8::internal::compiler::Instruction
InstructionCode opcode_
 
uint32_t bit_field_
 
PointerMap * pointer_map_
 
InstructionOperandoperands_ [1]
 

Detailed Description

Definition at line 546 of file instruction.h.

Member Enumeration Documentation

◆ InnerPosition

Constructor & Destructor Documentation

◆ GapInstruction()

v8::internal::compiler::GapInstruction::GapInstruction ( InstructionCode  opcode)
inlineexplicitprotected

Definition at line 584 of file instruction.h.

584  : Instruction(opcode) {
589  }
ParallelMove * parallel_moves_[LAST_INNER_POSITION+1]
Definition: instruction.h:593
InstructionCode opcode() const
Definition: instruction.h:427
Instruction(InstructionCode opcode)
Definition: instruction.h:500
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

References AFTER, BEFORE, END, NULL, parallel_moves_, and START.

Referenced by New().

+ Here is the caller graph for this function:

Member Function Documentation

◆ cast() [1/2]

static const GapInstruction* v8::internal::compiler::GapInstruction::cast ( const Instruction instr)
inlinestatic

Definition at line 578 of file instruction.h.

578  {
579  DCHECK(instr->IsGapMoves());
580  return static_cast<const GapInstruction*>(instr);
581  }
GapInstruction(InstructionCode opcode)
Definition: instruction.h:584
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, and v8::internal::compiler::Instruction::IsGapMoves().

+ Here is the call graph for this function:

◆ cast() [2/2]

static GapInstruction* v8::internal::compiler::GapInstruction::cast ( Instruction instr)
inlinestatic

Definition at line 573 of file instruction.h.

573  {
574  DCHECK(instr->IsGapMoves());
575  return static_cast<GapInstruction*>(instr);
576  }

References DCHECK, and v8::internal::compiler::Instruction::IsGapMoves().

Referenced by v8::internal::compiler::FINAL< kOperandKind, kNumCachedOperands >::GapAt().

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

◆ GetOrCreateParallelMove()

ParallelMove* v8::internal::compiler::GapInstruction::GetOrCreateParallelMove ( InnerPosition  pos,
Zone zone 
)
inline

Definition at line 557 of file instruction.h.

557  {
558  if (parallel_moves_[pos] == NULL) {
559  parallel_moves_[pos] = new (zone) ParallelMove(zone);
560  }
561  return parallel_moves_[pos];
562  }

References NULL, and parallel_moves_.

◆ GetParallelMove()

ParallelMove* v8::internal::compiler::GapInstruction::GetParallelMove ( InnerPosition  pos)
inline

Definition at line 564 of file instruction.h.

564  {
565  return parallel_moves_[pos];
566  }

References parallel_moves_.

◆ New()

static GapInstruction* v8::internal::compiler::GapInstruction::New ( Zone zone)
inlinestatic

Definition at line 568 of file instruction.h.

568  {
569  void* buffer = zone->New(sizeof(GapInstruction));
570  return new (buffer) GapInstruction(kGapInstruction);
571  }
const InstructionCode kGapInstruction
Definition: instruction.h:34

References GapInstruction(), v8::internal::compiler::kGapInstruction, and v8::internal::Zone::New().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

OStream& operator<< ( OStream os,
const Instruction instr 
)
friend

Definition at line 253 of file instruction.cc.

253  {
254  if (instr.OutputCount() > 1) os << "(";
255  for (size_t i = 0; i < instr.OutputCount(); i++) {
256  if (i > 0) os << ", ";
257  os << *instr.OutputAt(i);
258  }
259 
260  if (instr.OutputCount() > 1) os << ") = ";
261  if (instr.OutputCount() == 1) os << " = ";
262 
263  if (instr.IsGapMoves()) {
264  const GapInstruction* gap = GapInstruction::cast(&instr);
265  os << (instr.IsBlockStart() ? " block-start" : "gap ");
268  os << "(";
269  if (gap->parallel_moves_[i] != NULL) os << *gap->parallel_moves_[i];
270  os << ") ";
271  }
272  } else if (instr.IsSourcePosition()) {
273  const SourcePositionInstruction* pos =
274  SourcePositionInstruction::cast(&instr);
275  os << "position (" << pos->source_position().raw() << ")";
276  } else {
277  os << ArchOpcodeField::decode(instr.opcode());
278  AddressingMode am = AddressingModeField::decode(instr.opcode());
279  if (am != kMode_None) {
280  os << " : " << AddressingModeField::decode(instr.opcode());
281  }
282  FlagsMode fm = FlagsModeField::decode(instr.opcode());
283  if (fm != kFlags_none) {
284  os << " && " << fm << " if "
285  << FlagsConditionField::decode(instr.opcode());
286  }
287  }
288  if (instr.InputCount() > 0) {
289  for (size_t i = 0; i < instr.InputCount(); i++) {
290  os << " " << *instr.InputAt(i);
291  }
292  }
293  return os << "\n";
294 }
static GapInstruction * cast(Instruction *instr)
Definition: instruction.h:573

Member Data Documentation

◆ parallel_moves_

ParallelMove* v8::internal::compiler::GapInstruction::parallel_moves_[LAST_INNER_POSITION+1]
private

Definition at line 593 of file instruction.h.

Referenced by GapInstruction(), GetOrCreateParallelMove(), and GetParallelMove().


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