V8 Project
v8::internal::FullCodeGenerator::TestContext Class Reference
+ Inheritance diagram for v8::internal::FullCodeGenerator::TestContext:
+ Collaboration diagram for v8::internal::FullCodeGenerator::TestContext:

Public Member Functions

 TestContext (FullCodeGenerator *codegen, Expression *condition, Label *true_label, Label *false_label, Label *fall_through)
 
Expressioncondition () const
 
Label * true_label () const
 
Label * false_label () const
 
Label * fall_through () const
 
virtual void Plug (bool flag) const
 
virtual void Plug (Register reg) const
 
virtual void Plug (Label *materialize_true, Label *materialize_false) const
 
virtual void Plug (Variable *var) const
 
virtual void Plug (Handle< Object > lit) const
 
virtual void Plug (Heap::RootListIndex) const
 
virtual void PlugTOS () const
 
virtual void DropAndPlug (int count, Register reg) const
 
virtual void PrepareTest (Label *materialize_true, Label *materialize_false, Label **if_true, Label **if_false, Label **fall_through) const
 
virtual bool IsTest () const
 

Static Public Member Functions

static const TestContextcast (const ExpressionContext *context)
 

Private Attributes

Expressioncondition_
 
Label * true_label_
 
Label * false_label_
 
Label * fall_through_
 

Detailed Description

Definition at line 765 of file full-codegen.h.

Constructor & Destructor Documentation

◆ TestContext()

v8::internal::FullCodeGenerator::TestContext::TestContext ( FullCodeGenerator codegen,
Expression condition,
Label *  true_label,
Label *  false_label,
Label *  fall_through 
)
inline

Member Function Documentation

◆ cast()

static const TestContext* v8::internal::FullCodeGenerator::TestContext::cast ( const ExpressionContext context)
inlinestatic

Definition at line 778 of file full-codegen.h.

778  {
779  DCHECK(context->IsTest());
780  return reinterpret_cast<const TestContext*>(context);
781  }
TestContext(FullCodeGenerator *codegen, Expression *condition, Label *true_label, Label *false_label, Label *fall_through)
Definition: full-codegen.h:767
const ExpressionContext * context()
Definition: full-codegen.h:602
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::FullCodeGenerator::context(), and DCHECK.

Referenced by v8::internal::FullCodeGenerator::VisitInDuplicateContext(), and v8::internal::FullCodeGenerator::VisitLogicalExpression().

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

◆ condition()

Expression* v8::internal::FullCodeGenerator::TestContext::condition ( ) const
inline

Definition at line 783 of file full-codegen.h.

783 { return condition_; }

References condition_.

◆ DropAndPlug()

virtual void v8::internal::FullCodeGenerator::TestContext::DropAndPlug ( int  count,
Register  reg 
) const
virtual

◆ fall_through()

Label* v8::internal::FullCodeGenerator::TestContext::fall_through ( ) const
inline

Definition at line 786 of file full-codegen.h.

786 { return fall_through_; }

References fall_through_.

Referenced by v8::internal::FullCodeGenerator::VisitInDuplicateContext().

+ Here is the caller graph for this function:

◆ false_label()

Label* v8::internal::FullCodeGenerator::TestContext::false_label ( ) const
inline

Definition at line 785 of file full-codegen.h.

785 { return false_label_; }

References false_label_.

Referenced by v8::internal::FullCodeGenerator::VisitInDuplicateContext(), and v8::internal::FullCodeGenerator::VisitLogicalExpression().

+ Here is the caller graph for this function:

◆ IsTest()

virtual bool v8::internal::FullCodeGenerator::TestContext::IsTest ( ) const
inlinevirtual

Definition at line 801 of file full-codegen.h.

801 { return true; }

◆ Plug() [1/6]

virtual void v8::internal::FullCodeGenerator::TestContext::Plug ( bool  flag) const
virtual

◆ Plug() [2/6]

virtual void v8::internal::FullCodeGenerator::TestContext::Plug ( Handle< Object lit) const
virtual

◆ Plug() [3/6]

virtual void v8::internal::FullCodeGenerator::TestContext::Plug ( Heap::RootListIndex  ) const
virtual

◆ Plug() [4/6]

virtual void v8::internal::FullCodeGenerator::TestContext::Plug ( Label *  materialize_true,
Label *  materialize_false 
) const
virtual

◆ Plug() [5/6]

void v8::internal::FullCodeGenerator::TestContext::Plug ( Register  reg) const
virtual

Definition at line 502 of file full-codegen.cc.

502  {
503  // For simplicity we always test the accumulator register.
504  __ Move(result_register(), reg);
505  codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL);
506  codegen()->DoTest(this);
507 }
static Register result_register()
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 __

References __, NULL, and v8::internal::FullCodeGenerator::result_register().

+ Here is the call graph for this function:

◆ Plug() [6/6]

virtual void v8::internal::FullCodeGenerator::TestContext::Plug ( Variable var) const
virtual

◆ PlugTOS()

void v8::internal::FullCodeGenerator::TestContext::PlugTOS ( ) const
virtual

Definition at line 524 of file full-codegen.cc.

524  {
525  // For simplicity we always test the accumulator register.
526  __ Pop(result_register());
527  codegen()->PrepareForBailoutBeforeSplit(condition(), false, NULL, NULL);
528  codegen()->DoTest(this);
529 }

References __, NULL, and v8::internal::FullCodeGenerator::result_register().

+ Here is the call graph for this function:

◆ PrepareTest()

void v8::internal::FullCodeGenerator::TestContext::PrepareTest ( Label *  materialize_true,
Label *  materialize_false,
Label **  if_true,
Label **  if_false,
Label **  fall_through 
) const
virtual

Definition at line 566 of file full-codegen.cc.

571  {
572  *if_true = true_label_;
573  *if_false = false_label_;
575 }

◆ true_label()

Label* v8::internal::FullCodeGenerator::TestContext::true_label ( ) const
inline

Definition at line 784 of file full-codegen.h.

784 { return true_label_; }

References true_label_.

Referenced by v8::internal::FullCodeGenerator::VisitInDuplicateContext(), and v8::internal::FullCodeGenerator::VisitLogicalExpression().

+ Here is the caller graph for this function:

Member Data Documentation

◆ condition_

Expression* v8::internal::FullCodeGenerator::TestContext::condition_
private

Definition at line 804 of file full-codegen.h.

Referenced by condition().

◆ fall_through_

Label* v8::internal::FullCodeGenerator::TestContext::fall_through_
private

Definition at line 807 of file full-codegen.h.

Referenced by fall_through().

◆ false_label_

Label* v8::internal::FullCodeGenerator::TestContext::false_label_
private

Definition at line 806 of file full-codegen.h.

Referenced by false_label().

◆ true_label_

Label* v8::internal::FullCodeGenerator::TestContext::true_label_
private

Definition at line 805 of file full-codegen.h.

Referenced by true_label().


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