V8 Project
v8::internal::AssemblerBase Class Reference

#include <assembler.h>

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

Public Member Functions

 AssemblerBase (Isolate *isolate, void *buffer, int buffer_size)
 
virtual ~AssemblerBase ()
 
Isolateisolate () const
 
int jit_cookie () const
 
bool emit_debug_code () const
 
void set_emit_debug_code (bool value)
 
bool serializer_enabled () const
 
void enable_serializer ()
 
bool predictable_code_size () const
 
void set_predictable_code_size (bool value)
 
uint64_t enabled_cpu_features () const
 
void set_enabled_cpu_features (uint64_t features)
 
bool IsEnabled (CpuFeature f)
 
int pc_offset () const
 
virtual void AbortedCodeGeneration ()
 
- Public Member Functions inherited from v8::internal::Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Static Public Member Functions

static void QuietNaN (HeapObject *nan)
 
- Static Public Member Functions inherited from v8::internal::Malloced
static void FatalProcessOutOfMemory ()
 
static void * New (size_t size)
 
static void Delete (void *p)
 

Static Public Attributes

static const int kMinimalBufferSize = 4*KB
 

Protected Attributes

bytebuffer_
 
int buffer_size_
 
bool own_buffer_
 
bytepc_
 

Private Attributes

Isolateisolate_
 
int jit_cookie_
 
uint64_t enabled_cpu_features_
 
bool emit_debug_code_
 
bool predictable_code_size_
 
bool serializer_enabled_
 

Detailed Description

Definition at line 57 of file assembler.h.

Constructor & Destructor Documentation

◆ AssemblerBase()

v8::internal::AssemblerBase::AssemblerBase ( Isolate isolate,
void *  buffer,
int  buffer_size 
)

Definition at line 126 of file assembler.cc.

127  : isolate_(isolate),
128  jit_cookie_(0),
130  emit_debug_code_(FLAG_debug_code),
131  predictable_code_size_(false),
132  // We may use the assembler without an isolate.
134  if (FLAG_mask_constants_with_cookie && isolate != NULL) {
136  }
137  own_buffer_ = buffer == NULL;
138  if (buffer_size == 0) buffer_size = kMinimalBufferSize;
139  DCHECK(buffer_size > 0);
140  if (own_buffer_) buffer = NewArray<byte>(buffer_size);
141  buffer_ = static_cast<byte*>(buffer);
142  buffer_size_ = buffer_size;
143 
144  pc_ = buffer_;
145 }
Isolate * isolate() const
Definition: assembler.h:62
static const int kMinimalBufferSize
Definition: assembler.h:92
bool serializer_enabled() const
Definition: isolate.h:1007
base::RandomNumberGenerator * random_number_generator()
Definition: isolate-inl.h:33
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 DCHECK(condition)
Definition: logging.h:205

References buffer_, buffer_size_, DCHECK, isolate(), jit_cookie_, kMinimalBufferSize, NULL, own_buffer_, pc_, and v8::internal::Isolate::random_number_generator().

+ Here is the call graph for this function:

◆ ~AssemblerBase()

v8::internal::AssemblerBase::~AssemblerBase ( )
virtual

Definition at line 148 of file assembler.cc.

148  {
150 }
void DeleteArray(T *array)
Definition: allocation.h:68

References buffer_, v8::internal::DeleteArray(), and own_buffer_.

+ Here is the call graph for this function:

Member Function Documentation

◆ AbortedCodeGeneration()

virtual void v8::internal::AssemblerBase::AbortedCodeGeneration ( )
inlinevirtual

Reimplemented in v8::internal::Assembler.

Definition at line 90 of file assembler.h.

90 { }

◆ emit_debug_code()

bool v8::internal::AssemblerBase::emit_debug_code ( ) const
inline

Definition at line 65 of file assembler.h.

65 { return emit_debug_code_; }

References emit_debug_code_.

Referenced by v8::internal::MacroAssembler::Drop(), v8::internal::MacroAssembler::DropBySMI(), v8::internal::MacroAssembler::ObjectTag(), v8::internal::MacroAssembler::ObjectUntag(), and v8::internal::MacroAssembler::SyncSystemStackPointer().

+ Here is the caller graph for this function:

◆ enable_serializer()

void v8::internal::AssemblerBase::enable_serializer ( )
inline

Definition at line 69 of file assembler.h.

69 { serializer_enabled_ = true; }

References serializer_enabled_.

Referenced by v8::internal::LChunk::Codegen(), v8::internal::PlatformCodeStub::GenerateCode(), and v8::internal::FullCodeGenerator::MakeCode().

+ Here is the caller graph for this function:

◆ enabled_cpu_features()

uint64_t v8::internal::AssemblerBase::enabled_cpu_features ( ) const
inline

Definition at line 74 of file assembler.h.

74 { return enabled_cpu_features_; }

References enabled_cpu_features_.

◆ IsEnabled()

bool v8::internal::AssemblerBase::IsEnabled ( CpuFeature  f)
inline

Definition at line 78 of file assembler.h.

78  {
79  return (enabled_cpu_features_ & (static_cast<uint64_t>(1) << f)) != 0;
80  }

References enabled_cpu_features_.

◆ isolate()

◆ jit_cookie()

int v8::internal::AssemblerBase::jit_cookie ( ) const
inline

Definition at line 63 of file assembler.h.

63 { return jit_cookie_; }

References jit_cookie_.

◆ pc_offset()

◆ predictable_code_size()

bool v8::internal::AssemblerBase::predictable_code_size ( ) const
inline

Definition at line 71 of file assembler.h.

71 { return predictable_code_size_; }

References predictable_code_size_.

◆ QuietNaN()

static void v8::internal::AssemblerBase::QuietNaN ( HeapObject nan)
inlinestatic

Definition at line 84 of file assembler.h.

84 { }

◆ serializer_enabled()

bool v8::internal::AssemblerBase::serializer_enabled ( ) const
inline

Definition at line 68 of file assembler.h.

68 { return serializer_enabled_; }

References serializer_enabled_.

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

+ Here is the caller graph for this function:

◆ set_emit_debug_code()

void v8::internal::AssemblerBase::set_emit_debug_code ( bool  value)
inline

Definition at line 66 of file assembler.h.

66 { emit_debug_code_ = value; }

References emit_debug_code_.

Referenced by v8::internal::Deoptimizer::EnsureCodeForDeoptimizationEntry(), and v8::internal::FullCodeGenerator::Initialize().

+ Here is the caller graph for this function:

◆ set_enabled_cpu_features()

void v8::internal::AssemblerBase::set_enabled_cpu_features ( uint64_t  features)
inline

Definition at line 75 of file assembler.h.

75  {
76  enabled_cpu_features_ = features;
77  }

References enabled_cpu_features_.

◆ set_predictable_code_size()

void v8::internal::AssemblerBase::set_predictable_code_size ( bool  value)
inline

Definition at line 72 of file assembler.h.

72 { predictable_code_size_ = value; }

References predictable_code_size_.

Referenced by v8::internal::FullCodeGenerator::Initialize(), v8::internal::PredictableCodeSizeScope::PredictableCodeSizeScope(), and v8::internal::PredictableCodeSizeScope::~PredictableCodeSizeScope().

+ Here is the caller graph for this function:

Member Data Documentation

◆ buffer_

◆ buffer_size_

◆ emit_debug_code_

bool v8::internal::AssemblerBase::emit_debug_code_
private

Definition at line 108 of file assembler.h.

Referenced by emit_debug_code(), and set_emit_debug_code().

◆ enabled_cpu_features_

uint64_t v8::internal::AssemblerBase::enabled_cpu_features_
private

Definition at line 107 of file assembler.h.

Referenced by enabled_cpu_features(), IsEnabled(), and set_enabled_cpu_features().

◆ isolate_

Isolate* v8::internal::AssemblerBase::isolate_
private

Definition at line 105 of file assembler.h.

Referenced by isolate().

◆ jit_cookie_

int v8::internal::AssemblerBase::jit_cookie_
private

Definition at line 106 of file assembler.h.

Referenced by AssemblerBase(), and jit_cookie().

◆ kMinimalBufferSize

const int v8::internal::AssemblerBase::kMinimalBufferSize = 4*KB
static

Definition at line 92 of file assembler.h.

Referenced by AssemblerBase().

◆ own_buffer_

bool v8::internal::AssemblerBase::own_buffer_
protected

Definition at line 99 of file assembler.h.

Referenced by AssemblerBase(), and ~AssemblerBase().

◆ pc_

◆ predictable_code_size_

bool v8::internal::AssemblerBase::predictable_code_size_
private

Definition at line 109 of file assembler.h.

Referenced by predictable_code_size(), and set_predictable_code_size().

◆ serializer_enabled_

bool v8::internal::AssemblerBase::serializer_enabled_
private

Definition at line 110 of file assembler.h.

Referenced by enable_serializer(), and serializer_enabled().


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