V8 Project
v8::internal::LChunk Class Reference

#include <lithium.h>

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

Public Member Functions

void AddInstruction (LInstruction *instruction, HBasicBlock *block)
 
LConstantOperand * DefineConstantOperand (HConstant *constant)
 
HConstant * LookupConstant (LConstantOperand *operand) const
 
Representation LookupLiteralRepresentation (LConstantOperand *operand) const
 
int ParameterAt (int index)
 
int GetParameterStackSlot (int index) const
 
int spill_slot_count () const
 
CompilationInfoinfo () const
 
HGraph * graph () const
 
Isolateisolate () const
 
const ZoneList< LInstruction * > * instructions () const
 
void AddGapMove (int index, LOperand *from, LOperand *to)
 
LGapGetGapAt (int index) const
 
bool IsGapAt (int index) const
 
int NearestGapPos (int index) const
 
void MarkEmptyBlocks ()
 
const ZoneList< LPointerMap * > * pointer_maps () const
 
LLabel * GetLabel (int block_id) const
 
int LookupDestination (int block_id) const
 
Label * GetAssemblyLabel (int block_id) const
 
const ZoneList< Handle< JSFunction > > * inlined_closures () const
 
void AddInlinedClosure (Handle< JSFunction > closure)
 
void AddDeprecationDependency (Handle< Map > map)
 
void AddStabilityDependency (Handle< Map > map)
 
Zonezone () const
 
Handle< CodeCodegen ()
 
void set_allocated_double_registers (BitVector *allocated_registers)
 
BitVectorallocated_double_registers ()
 
- 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 LChunkNewChunk (HGraph *graph)
 

Protected Member Functions

 LChunk (CompilationInfo *info, HGraph *graph)
 

Protected Attributes

int spill_slot_count_
 

Private Types

typedef std::less< Handle< Map > > MapLess
 
typedef zone_allocator< Handle< Map > > MapAllocator
 
typedef std::set< Handle< Map >, MapLess, MapAllocatorMapSet
 

Private Member Functions

void CommitDependencies (Handle< Code > code) const
 

Private Attributes

CompilationInfoinfo_
 
HGraph *const graph_
 
BitVectorallocated_double_registers_
 
ZoneList< LInstruction * > instructions_
 
ZoneList< LPointerMap * > pointer_maps_
 
ZoneList< Handle< JSFunction > > inlined_closures_
 
MapSet deprecation_dependencies_
 
MapSet stability_dependencies_
 

Detailed Description

Definition at line 619 of file lithium.h.

Member Typedef Documentation

◆ MapAllocator

Definition at line 683 of file lithium.h.

◆ MapLess

typedef std::less<Handle<Map> > v8::internal::LChunk::MapLess
private

Definition at line 682 of file lithium.h.

◆ MapSet

Definition at line 684 of file lithium.h.

Constructor & Destructor Documentation

◆ LChunk()

v8::internal::LChunk::LChunk ( CompilationInfo info,
HGraph *  graph 
)
protected

Definition at line 267 of file lithium.cc.

268  : spill_slot_count_(0),
269  info_(info),
270  graph_(graph),
271  instructions_(32, info->zone()),
272  pointer_maps_(8, info->zone()),
273  inlined_closures_(1, info->zone()),
MapSet stability_dependencies_
Definition: lithium.h:695
ZoneList< LInstruction * > instructions_
Definition: lithium.h:691
MapSet deprecation_dependencies_
Definition: lithium.h:694
ZoneList< Handle< JSFunction > > inlined_closures_
Definition: lithium.h:693
zone_allocator< Handle< Map > > MapAllocator
Definition: lithium.h:683
CompilationInfo * info() const
Definition: lithium.h:631
CompilationInfo * info_
Definition: lithium.h:688
HGraph *const graph_
Definition: lithium.h:689
ZoneList< LPointerMap * > pointer_maps_
Definition: lithium.h:692
std::less< Handle< Map > > MapLess
Definition: lithium.h:682
HGraph * graph() const
Definition: lithium.h:632

Member Function Documentation

◆ AddDeprecationDependency()

void v8::internal::LChunk::AddDeprecationDependency ( Handle< Map map)
inline

Definition at line 653 of file lithium.h.

653  {
654  DCHECK(!map->is_deprecated());
655  if (!map->CanBeDeprecated()) return;
656  DCHECK(!info_->IsStub());
658  }
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 map
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, deprecation_dependencies_, info_, v8::internal::CompilationInfo::IsStub(), and map.

+ Here is the call graph for this function:

◆ AddGapMove()

void v8::internal::LChunk::AddGapMove ( int  index,
LOperand from,
LOperand to 
)

Definition at line 396 of file lithium.cc.

396  {
398  LGap::START, zone())->AddMove(from, to, zone());
399 }
Zone * zone() const
Definition: lithium.h:667
LGap * GetGapAt(int index) const
Definition: lithium.cc:380
LParallelMove * GetOrCreateParallelMove(InnerPosition pos, Zone *zone)
Definition: lithium-arm.h:355
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file

References GetGapAt(), v8::internal::LGap::GetOrCreateParallelMove(), v8::internal::LGap::START, to(), and zone().

+ Here is the call graph for this function:

◆ AddInlinedClosure()

void v8::internal::LChunk::AddInlinedClosure ( Handle< JSFunction closure)
inline

Definition at line 649 of file lithium.h.

649  {
650  inlined_closures_.Add(closure, zone());
651  }

References inlined_closures_, and zone().

+ Here is the call graph for this function:

◆ AddInstruction()

void v8::internal::LChunk::AddInstruction ( LInstruction instruction,
HBasicBlock *  block 
)

Definition at line 335 of file lithium.cc.

335  {
336  LInstructionGap* gap = new (zone()) LInstructionGap(block);
337  gap->set_hydrogen_value(instr->hydrogen_value());
338  int index = -1;
339  if (instr->IsControl()) {
340  instructions_.Add(gap, zone());
341  index = instructions_.length();
342  instructions_.Add(instr, zone());
343  } else {
344  index = instructions_.length();
345  instructions_.Add(instr, zone());
346  instructions_.Add(gap, zone());
347  }
348  if (instr->HasPointerMap()) {
349  pointer_maps_.Add(instr->pointer_map(), zone());
350  instr->pointer_map()->set_lithium_position(index);
351  }
352 }
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
Definition: list-inl.h:17

References v8::internal::List< T, AllocationPolicy >::Add(), v8::internal::LInstruction::HasPointerMap(), v8::internal::LInstruction::hydrogen_value(), instructions_, v8::internal::LInstruction::IsControl(), v8::internal::LInstruction::pointer_map(), pointer_maps_, and zone().

+ Here is the call graph for this function:

◆ AddStabilityDependency()

void v8::internal::LChunk::AddStabilityDependency ( Handle< Map map)
inline

Definition at line 660 of file lithium.h.

660  {
661  DCHECK(map->is_stable());
662  if (!map->CanTransition()) return;
663  DCHECK(!info_->IsStub());
665  }

References DCHECK, info_, v8::internal::CompilationInfo::IsStub(), map, and stability_dependencies_.

+ Here is the call graph for this function:

◆ allocated_double_registers()

BitVector* v8::internal::LChunk::allocated_double_registers ( )
inline

Definition at line 672 of file lithium.h.

672  {
674  }
BitVector * allocated_double_registers_
Definition: lithium.h:690

References allocated_double_registers_.

Referenced by set_allocated_double_registers().

+ Here is the caller graph for this function:

◆ Codegen()

Handle< Code > v8::internal::LChunk::Codegen ( )

Definition at line 461 of file lithium.cc.

461  {
462  MacroAssembler assembler(info()->isolate(), NULL, 0);
464  CodeStartLinePosInfoRecordEvent(
465  assembler.positions_recorder()));
466  // TODO(yangguo) remove this once the code serializer handles code stubs.
467  if (info()->will_serialize()) assembler.enable_serializer();
468  LCodeGen generator(this, &assembler, info());
469 
470  MarkEmptyBlocks();
471 
472  if (generator.GenerateCode()) {
473  generator.CheckEnvironmentUsage();
474  CodeGenerator::MakeCodePrologue(info(), "optimized");
475  Code::Flags flags = info()->flags();
476  Handle<Code> code =
478  generator.FinishCode(code);
479  CommitDependencies(code);
480  code->set_is_crankshafted(true);
481  void* jit_handler_data =
482  assembler.positions_recorder()->DetachJITHandlerData();
484  CodeEndLinePosInfoRecordEvent(*code, jit_handler_data));
485 
487  DCHECK(!(info()->isolate()->serializer_enabled() &&
488  info()->GetMustNotHaveEagerFrame() &&
489  generator.NeedsEagerFrame()));
490  return code;
491  }
492  assembler.AbortedCodeGeneration();
493  return Handle<Code>::null();
494 }
static void PrintCode(Handle< Code > code, CompilationInfo *info)
Definition: codegen.cc:163
static void MakeCodePrologue(CompilationInfo *info, const char *kind)
Definition: codegen.cc:97
static Handle< Code > MakeCodeEpilogue(MacroAssembler *masm, Code::Flags flags, CompilationInfo *info)
Definition: codegen.cc:139
uint32_t Flags
Definition: objects.h:4929
Code::Flags flags() const
Definition: compiler.cc:252
static Handle< T > null()
Definition: handles.h:123
void MarkEmptyBlocks()
Definition: lithium.cc:300
void CommitDependencies(Handle< Code > code) const
Definition: lithium.cc:413
Isolate * isolate() const
Definition: lithium.h:633
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
#define LOG_CODE_EVENT(isolate, Call)
Definition: log.h:77

References v8::internal::Assembler::AbortedCodeGeneration(), CommitDependencies(), DCHECK, v8::internal::AssemblerBase::enable_serializer(), v8::internal::LCodeGen::FinishCode(), v8::internal::CompilationInfo::flags(), v8::internal::anonymous_namespace{flags.cc}::flags, v8::internal::LCodeGen::GenerateCode(), info(), isolate(), LOG_CODE_EVENT, v8::internal::CodeGenerator::MakeCodeEpilogue(), v8::internal::CodeGenerator::MakeCodePrologue(), MarkEmptyBlocks(), v8::internal::LCodeGen::NeedsEagerFrame(), NULL, v8::internal::Handle< T >::null(), v8::internal::Assembler::positions_recorder(), and v8::internal::CodeGenerator::PrintCode().

Referenced by v8::internal::DoGenerateCode(), and v8::internal::OptimizedCompileJob::GenerateCode().

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

◆ CommitDependencies()

void v8::internal::LChunk::CommitDependencies ( Handle< Code code) const
private

Definition at line 413 of file lithium.cc.

413  {
414  for (MapSet::const_iterator it = deprecation_dependencies_.begin(),
415  iend = deprecation_dependencies_.end(); it != iend; ++it) {
416  Handle<Map> map = *it;
417  DCHECK(!map->is_deprecated());
418  DCHECK(map->CanBeDeprecated());
420  }
421 
422  for (MapSet::const_iterator it = stability_dependencies_.begin(),
423  iend = stability_dependencies_.end(); it != iend; ++it) {
424  Handle<Map> map = *it;
425  DCHECK(map->is_stable());
426  DCHECK(map->CanTransition());
428  }
429 
430  info_->CommitDependencies(code);
431 }
void CommitDependencies(Handle< Code > code)
Definition: compiler.cc:199
static void AddDependentCode(Handle< Map > map, DependentCode::DependencyGroup group, Handle< Code > code)
Definition: objects.cc:11357

References v8::internal::Map::AddDependentCode(), v8::internal::CompilationInfo::CommitDependencies(), DCHECK, deprecation_dependencies_, info_, v8::internal::DependentCode::kPrototypeCheckGroup, v8::internal::DependentCode::kTransitionGroup, map, and stability_dependencies_.

Referenced by Codegen().

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

◆ DefineConstantOperand()

LConstantOperand * v8::internal::LChunk::DefineConstantOperand ( HConstant *  constant)

Definition at line 355 of file lithium.cc.

355  {
356  return LConstantOperand::Create(constant->id(), zone());
357 }

References zone().

+ Here is the call graph for this function:

◆ GetAssemblyLabel()

Label * v8::internal::LChunk::GetAssemblyLabel ( int  block_id) const

Definition at line 293 of file lithium.cc.

293  {
294  LLabel* label = GetLabel(block_id);
295  DCHECK(!label->HasReplacement());
296  return label->label();
297 }
LLabel * GetLabel(int block_id) const
Definition: lithium.cc:278

References DCHECK, and GetLabel().

Referenced by v8::internal::LControlInstruction< I, T >::FalseLabel(), and v8::internal::LControlInstruction< I, T >::TrueLabel().

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

◆ GetGapAt()

LGap * v8::internal::LChunk::GetGapAt ( int  index) const

Definition at line 380 of file lithium.cc.

380  {
381  return LGap::cast(instructions_[index]);
382 }
static LGap * cast(LInstruction *instr)
Definition: lithium-arm.h:337

References v8::internal::LGap::cast(), and instructions_.

Referenced by AddGapMove().

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

◆ GetLabel()

LLabel * v8::internal::LChunk::GetLabel ( int  block_id) const

Definition at line 278 of file lithium.cc.

278  {
279  HBasicBlock* block = graph_->blocks()->at(block_id);
280  int first_instruction = block->first_instruction_index();
281  return LLabel::cast(instructions_[first_instruction]);
282 }

References graph_, and instructions_.

Referenced by GetAssemblyLabel(), LookupDestination(), and MarkEmptyBlocks().

+ Here is the caller graph for this function:

◆ GetParameterStackSlot()

int v8::internal::LChunk::GetParameterStackSlot ( int  index) const

Definition at line 360 of file lithium.cc.

360  {
361  // The receiver is at index 0, the first parameter at index 1, so we
362  // shift all parameter indexes down by the number of parameters, and
363  // make sure they end up negative so they are distinguishable from
364  // spill slots.
365  int result = index - info()->num_parameters() - 1;
366 
367  DCHECK(result < 0);
368  return result;
369 }

References DCHECK, info(), and v8::internal::CompilationInfo::num_parameters().

+ Here is the call graph for this function:

◆ graph()

HGraph* v8::internal::LChunk::graph ( ) const
inline

Definition at line 632 of file lithium.h.

632 { return graph_; }

References graph_.

Referenced by MarkEmptyBlocks(), and NewChunk().

+ Here is the caller graph for this function:

◆ info()

CompilationInfo* v8::internal::LChunk::info ( ) const
inline

Definition at line 631 of file lithium.h.

631 { return info_; }

References info_.

Referenced by Codegen(), v8::internal::DoGenerateCode(), GetParameterStackSlot(), NewChunk(), ParameterAt(), and set_allocated_double_registers().

+ Here is the caller graph for this function:

◆ inlined_closures()

const ZoneList<Handle<JSFunction> >* v8::internal::LChunk::inlined_closures ( ) const
inline

Definition at line 645 of file lithium.h.

645  {
646  return &inlined_closures_;
647  }

References inlined_closures_.

◆ instructions()

const ZoneList<LInstruction*>* v8::internal::LChunk::instructions ( ) const
inline

Definition at line 634 of file lithium.h.

634 { return &instructions_; }

References instructions_.

Referenced by MarkEmptyBlocks().

+ Here is the caller graph for this function:

◆ IsGapAt()

bool v8::internal::LChunk::IsGapAt ( int  index) const

Definition at line 385 of file lithium.cc.

385  {
386  return instructions_[index]->IsGap();
387 }

References instructions_.

Referenced by NearestGapPos().

+ Here is the caller graph for this function:

◆ isolate()

Isolate* v8::internal::LChunk::isolate ( ) const
inline

Definition at line 633 of file lithium.h.

633 { return graph_->isolate(); }

References graph_.

Referenced by Codegen().

+ Here is the caller graph for this function:

◆ LookupConstant()

HConstant * v8::internal::LChunk::LookupConstant ( LConstantOperand *  operand) const

Definition at line 402 of file lithium.cc.

402  {
403  return HConstant::cast(graph_->LookupValue(operand->index()));
404 }

References graph_.

◆ LookupDestination()

int v8::internal::LChunk::LookupDestination ( int  block_id) const

Definition at line 285 of file lithium.cc.

285  {
286  LLabel* cur = GetLabel(block_id);
287  while (cur->replacement() != NULL) {
288  cur = cur->replacement();
289  }
290  return cur->block_id();
291 }

References GetLabel(), and NULL.

Referenced by v8::internal::LControlInstruction< I, T >::FalseDestination(), and v8::internal::LControlInstruction< I, T >::TrueDestination().

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

◆ LookupLiteralRepresentation()

Representation v8::internal::LChunk::LookupLiteralRepresentation ( LConstantOperand *  operand) const

Definition at line 407 of file lithium.cc.

408  {
409  return graph_->LookupValue(operand->index())->representation();
410 }

References graph_.

◆ MarkEmptyBlocks()

void v8::internal::LChunk::MarkEmptyBlocks ( )

Definition at line 300 of file lithium.cc.

300  {
301  LPhase phase("L_Mark empty blocks", this);
302  for (int i = 0; i < graph()->blocks()->length(); ++i) {
303  HBasicBlock* block = graph()->blocks()->at(i);
304  int first = block->first_instruction_index();
305  int last = block->last_instruction_index();
306  LInstruction* first_instr = instructions()->at(first);
307  LInstruction* last_instr = instructions()->at(last);
308 
309  LLabel* label = LLabel::cast(first_instr);
310  if (last_instr->IsGoto()) {
311  LGoto* goto_instr = LGoto::cast(last_instr);
312  if (label->IsRedundant() &&
313  !label->is_loop_header()) {
314  bool can_eliminate = true;
315  for (int i = first + 1; i < last && can_eliminate; ++i) {
316  LInstruction* cur = instructions()->at(i);
317  if (cur->IsGap()) {
318  LGap* gap = LGap::cast(cur);
319  if (!gap->IsRedundant()) {
320  can_eliminate = false;
321  }
322  } else {
323  can_eliminate = false;
324  }
325  }
326  if (can_eliminate) {
327  label->set_replacement(GetLabel(goto_instr->block_id()));
328  }
329  }
330  }
331  }
332 }
const ZoneList< LInstruction * > * instructions() const
Definition: lithium.h:634

References v8::internal::LGap::cast(), GetLabel(), graph(), instructions(), v8::internal::LInstruction::IsGap(), and v8::internal::LGap::IsRedundant().

Referenced by Codegen().

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

◆ NearestGapPos()

int v8::internal::LChunk::NearestGapPos ( int  index) const

Definition at line 390 of file lithium.cc.

390  {
391  while (!IsGapAt(index)) index--;
392  return index;
393 }
bool IsGapAt(int index) const
Definition: lithium.cc:385

References IsGapAt().

+ Here is the call graph for this function:

◆ NewChunk()

LChunk * v8::internal::LChunk::NewChunk ( HGraph *  graph)
static

Definition at line 434 of file lithium.cc.

434  {
435  DisallowHandleAllocation no_handles;
437  graph->DisallowAddingNewValues();
438  int values = graph->GetMaximumValueID();
439  CompilationInfo* info = graph->info();
440  if (values > LUnallocated::kMaxVirtualRegisters) {
441  info->AbortOptimization(kNotEnoughVirtualRegistersForValues);
442  return NULL;
443  }
444  LAllocator allocator(values, graph);
445  LChunkBuilder builder(info, graph, &allocator);
446  LChunk* chunk = builder.Build();
447  if (chunk == NULL) return NULL;
448 
449  if (!allocator.Allocate(chunk)) {
450  info->AbortOptimization(kNotEnoughVirtualRegistersRegalloc);
451  return NULL;
452  }
453 
454  chunk->set_allocated_double_registers(
455  allocator.assigned_double_registers());
456 
457  return chunk;
458 }
void AbortOptimization(BailoutReason reason)
Definition: compiler.h:330
LChunk(CompilationInfo *info, HGraph *graph)
Definition: lithium.cc:267
static const int kMaxVirtualRegisters
Definition: lithium.h:175
PerThreadAssertScopeDebugOnly< HEAP_ALLOCATION_ASSERT, false > DisallowHeapAllocation
Definition: assert-scope.h:110
PerThreadAssertScopeDebugOnly< HANDLE_ALLOCATION_ASSERT, false > DisallowHandleAllocation
Definition: assert-scope.h:102

References v8::internal::CompilationInfo::AbortOptimization(), graph(), info(), v8::internal::LUnallocated::kMaxVirtualRegisters, NULL, and set_allocated_double_registers().

Referenced by v8::internal::OptimizedCompileJob::OptimizeGraph(), and v8::internal::OptimizeGraph().

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

◆ ParameterAt()

int v8::internal::LChunk::ParameterAt ( int  index)

Definition at line 373 of file lithium.cc.

373  {
374  DCHECK(-1 <= index); // -1 is the receiver.
375  return (1 + info()->scope()->num_parameters() - index) *
376  kPointerSize;
377 }
const int kPointerSize
Definition: globals.h:129

References DCHECK, info(), and v8::internal::kPointerSize.

+ Here is the call graph for this function:

◆ pointer_maps()

const ZoneList<LPointerMap*>* v8::internal::LChunk::pointer_maps ( ) const
inline

Definition at line 640 of file lithium.h.

640 { return &pointer_maps_; }

References pointer_maps_.

◆ set_allocated_double_registers()

void v8::internal::LChunk::set_allocated_double_registers ( BitVector allocated_registers)

Definition at line 497 of file lithium.cc.

497  {
498  allocated_double_registers_ = allocated_registers;
499  BitVector* doubles = allocated_double_registers();
500  BitVector::Iterator iterator(doubles);
501  while (!iterator.Done()) {
502  if (info()->saves_caller_doubles()) {
503  if (kDoubleSize == kPointerSize * 2) {
504  spill_slot_count_ += 2;
505  } else {
507  }
508  }
509  iterator.Advance();
510  }
511 }
BitVector * allocated_double_registers()
Definition: lithium.h:672
const int kDoubleSize
Definition: globals.h:127

References allocated_double_registers(), allocated_double_registers_, info(), v8::internal::kDoubleSize, v8::internal::kPointerSize, and spill_slot_count_.

Referenced by NewChunk().

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

◆ spill_slot_count()

int v8::internal::LChunk::spill_slot_count ( ) const
inline

Definition at line 630 of file lithium.h.

630 { return spill_slot_count_; }

References spill_slot_count_.

◆ zone()

Zone* v8::internal::LChunk::zone ( ) const
inline

Definition at line 667 of file lithium.h.

667 { return info_->zone(); }

References info_, and v8::internal::CompilationInfo::zone().

Referenced by AddGapMove(), AddInlinedClosure(), AddInstruction(), and DefineConstantOperand().

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

Member Data Documentation

◆ allocated_double_registers_

BitVector* v8::internal::LChunk::allocated_double_registers_
private

Definition at line 690 of file lithium.h.

Referenced by allocated_double_registers(), and set_allocated_double_registers().

◆ deprecation_dependencies_

MapSet v8::internal::LChunk::deprecation_dependencies_
private

Definition at line 694 of file lithium.h.

Referenced by AddDeprecationDependency(), and CommitDependencies().

◆ graph_

HGraph* const v8::internal::LChunk::graph_
private

Definition at line 689 of file lithium.h.

Referenced by GetLabel(), graph(), isolate(), LookupConstant(), and LookupLiteralRepresentation().

◆ info_

CompilationInfo* v8::internal::LChunk::info_
private

◆ inlined_closures_

ZoneList<Handle<JSFunction> > v8::internal::LChunk::inlined_closures_
private

Definition at line 693 of file lithium.h.

Referenced by AddInlinedClosure(), and inlined_closures().

◆ instructions_

ZoneList<LInstruction*> v8::internal::LChunk::instructions_
private

Definition at line 691 of file lithium.h.

Referenced by AddInstruction(), GetGapAt(), GetLabel(), instructions(), and IsGapAt().

◆ pointer_maps_

ZoneList<LPointerMap*> v8::internal::LChunk::pointer_maps_
private

Definition at line 692 of file lithium.h.

Referenced by AddInstruction(), and pointer_maps().

◆ spill_slot_count_

int v8::internal::LChunk::spill_slot_count_
protected

Definition at line 679 of file lithium.h.

Referenced by set_allocated_double_registers(), and spill_slot_count().

◆ stability_dependencies_

MapSet v8::internal::LChunk::stability_dependencies_
private

Definition at line 695 of file lithium.h.

Referenced by AddStabilityDependency(), and CommitDependencies().


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