v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::torque::TorqueCodeGenerator Class Referenceabstract

#include <torque-code-generator.h>

Inheritance diagram for v8::internal::torque::TorqueCodeGenerator:
Collaboration diagram for v8::internal::torque::TorqueCodeGenerator:

Public Member Functions

 TorqueCodeGenerator (const ControlFlowGraph &cfg, std::ostream &out)
 

Protected Member Functions

std::string DefinitionToVariable (const DefinitionLocation &location)
 
void SetDefinitionVariable (const DefinitionLocation &definition, const std::string &str)
 
std::ostream & out ()
 
std::ostream & decls ()
 
virtual void EmitSourcePosition (SourcePosition pos, bool always_emit=false)=0
 
std::string FreshNodeName ()
 
std::string FreshCatchName ()
 
std::string FreshLabelName ()
 
std::string BlockName (const Block *block)
 
void EmitInstruction (const Instruction &instruction, Stack< std::string > *stack)
 
template<typename T >
void EmitIRAnnotation (const T &instruction, Stack< std::string > *stack)
 

Static Protected Member Functions

static bool IsEmptyInstruction (const Instruction &instruction)
 

Protected Attributes

const ControlFlowGraphcfg_
 
std::ostream * out_
 
std::ostream * out_decls_
 
size_t fresh_id_ = 0
 
SourcePosition previous_position_
 
std::map< DefinitionLocation, std::string > location_map_
 

Detailed Description

Definition at line 17 of file torque-code-generator.h.

Constructor & Destructor Documentation

◆ TorqueCodeGenerator()

v8::internal::torque::TorqueCodeGenerator::TorqueCodeGenerator ( const ControlFlowGraph & cfg,
std::ostream & out )
inline

Definition at line 19 of file torque-code-generator.h.

Member Function Documentation

◆ BlockName()

std::string v8::internal::torque::TorqueCodeGenerator::BlockName ( const Block * block)
inlineprotected

Definition at line 70 of file torque-code-generator.h.

Here is the caller graph for this function:

◆ decls()

std::ostream & v8::internal::torque::TorqueCodeGenerator::decls ( )
inlineprotected

Definition at line 61 of file torque-code-generator.h.

Here is the caller graph for this function:

◆ DefinitionToVariable()

std::string v8::internal::torque::TorqueCodeGenerator::DefinitionToVariable ( const DefinitionLocation & location)
inlineprotected

Definition at line 33 of file torque-code-generator.h.

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

◆ EmitInstruction()

void v8::internal::torque::TorqueCodeGenerator::EmitInstruction ( const Instruction & instruction,
Stack< std::string > * stack )
protected

Definition at line 27 of file torque-code-generator.cc.

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

◆ EmitIRAnnotation()

template<typename T >
void v8::internal::torque::TorqueCodeGenerator::EmitIRAnnotation ( const T & instruction,
Stack< std::string > * stack )
inlineprotected

Definition at line 78 of file torque-code-generator.h.

Here is the call graph for this function:

◆ EmitSourcePosition()

virtual void v8::internal::torque::TorqueCodeGenerator::EmitSourcePosition ( SourcePosition pos,
bool always_emit = false )
protectedpure virtual

Implemented in v8::internal::torque::CCGenerator, and v8::internal::torque::CSAGenerator.

Here is the caller graph for this function:

◆ FreshCatchName()

std::string v8::internal::torque::TorqueCodeGenerator::FreshCatchName ( )
inlineprotected

Definition at line 68 of file torque-code-generator.h.

Here is the caller graph for this function:

◆ FreshLabelName()

std::string v8::internal::torque::TorqueCodeGenerator::FreshLabelName ( )
inlineprotected

Definition at line 69 of file torque-code-generator.h.

◆ FreshNodeName()

std::string v8::internal::torque::TorqueCodeGenerator::FreshNodeName ( )
inlineprotected

Definition at line 67 of file torque-code-generator.h.

Here is the caller graph for this function:

◆ IsEmptyInstruction()

bool v8::internal::torque::TorqueCodeGenerator::IsEmptyInstruction ( const Instruction & instruction)
staticprotected

Definition at line 13 of file torque-code-generator.cc.

Here is the caller graph for this function:

◆ out()

std::ostream & v8::internal::torque::TorqueCodeGenerator::out ( )
inlineprotected

Definition at line 60 of file torque-code-generator.h.

Here is the caller graph for this function:

◆ SetDefinitionVariable()

void v8::internal::torque::TorqueCodeGenerator::SetDefinitionVariable ( const DefinitionLocation & definition,
const std::string & str )
inlineprotected

Definition at line 54 of file torque-code-generator.h.

Here is the caller graph for this function:

Member Data Documentation

◆ cfg_

const ControlFlowGraph& v8::internal::torque::TorqueCodeGenerator::cfg_
protected

Definition at line 26 of file torque-code-generator.h.

◆ fresh_id_

size_t v8::internal::torque::TorqueCodeGenerator::fresh_id_ = 0
protected

Definition at line 29 of file torque-code-generator.h.

◆ location_map_

std::map<DefinitionLocation, std::string> v8::internal::torque::TorqueCodeGenerator::location_map_
protected

Definition at line 31 of file torque-code-generator.h.

◆ out_

std::ostream* v8::internal::torque::TorqueCodeGenerator::out_
protected

Definition at line 27 of file torque-code-generator.h.

◆ out_decls_

std::ostream* v8::internal::torque::TorqueCodeGenerator::out_decls_
protected

Definition at line 28 of file torque-code-generator.h.

◆ previous_position_

SourcePosition v8::internal::torque::TorqueCodeGenerator::previous_position_
protected

Definition at line 30 of file torque-code-generator.h.


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