V8 Project
v8::internal::compiler::AddressingModeUnitTest Class Reference
+ Inheritance diagram for v8::internal::compiler::AddressingModeUnitTest:
+ Collaboration diagram for v8::internal::compiler::AddressingModeUnitTest:

Public Member Functions

 AddressingModeUnitTest ()
 
 ~AddressingModeUnitTest ()
 
void Run (Node *base, Node *index, AddressingMode mode)
 
void Reset ()
 
 AddressingModeUnitTest ()
 
 ~AddressingModeUnitTest ()
 
void Run (Node *base, Node *index, AddressingMode mode)
 
void Reset ()
 
- Public Member Functions inherited from v8::internal::compiler::InstructionSelectorTest
 InstructionSelectorTest ()
 
virtual ~InstructionSelectorTest ()
 
base::RandomNumberGenerator * rng ()
 
- Public Member Functions inherited from v8::TestWithContext
 TestWithContext ()
 
virtual ~TestWithContext ()
 
const Local< Context > & context () const
 
- Public Member Functions inherited from v8::TestWithIsolate
 TestWithIsolate ()
 
Isolateisolate () const
 
- Public Member Functions inherited from v8::internal::TestWithZone
 TestWithZone ()
 
virtual ~TestWithZone ()
 
Zonezone ()
 
- Public Member Functions inherited from v8::internal::TestWithIsolate
 TestWithIsolate ()
 
virtual ~TestWithIsolate ()
 
Factory * factory () const
 
Isolateisolate () const
 

Public Attributes

Node * zero
 
Node * null_ptr
 
Node * non_zero
 
Node * base_reg
 
Node * index_reg
 
Node * scales [4]
 
StreamBuilder * m
 
- Public Attributes inherited from v8::internal::compiler::InstructionSelectorTest
base::RandomNumberGenerator rng_
 

Additional Inherited Members

- Public Types inherited from v8::internal::compiler::InstructionSelectorTest
enum  StreamBuilderMode { kAllInstructions , kTargetInstructions , kAllExceptNopInstructions }
 
- Static Public Member Functions inherited from v8::TestWithIsolate
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 

Detailed Description

Definition at line 288 of file instruction-selector-ia32-unittest.cc.

Constructor & Destructor Documentation

◆ AddressingModeUnitTest() [1/2]

v8::internal::compiler::AddressingModeUnitTest::AddressingModeUnitTest ( )
inline

Definition at line 290 of file instruction-selector-ia32-unittest.cc.

290 : m(NULL) { Reset(); }
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 Reset().

+ Here is the call graph for this function:

◆ ~AddressingModeUnitTest() [1/2]

v8::internal::compiler::AddressingModeUnitTest::~AddressingModeUnitTest ( )
inline

Definition at line 291 of file instruction-selector-ia32-unittest.cc.

291 { delete m; }

References m.

◆ AddressingModeUnitTest() [2/2]

v8::internal::compiler::AddressingModeUnitTest::AddressingModeUnitTest ( )
inline

Definition at line 169 of file instruction-selector-x64-unittest.cc.

169 : m(NULL) { Reset(); }

References Reset().

+ Here is the call graph for this function:

◆ ~AddressingModeUnitTest() [2/2]

v8::internal::compiler::AddressingModeUnitTest::~AddressingModeUnitTest ( )
inline

Definition at line 170 of file instruction-selector-x64-unittest.cc.

170 { delete m; }

References m.

Member Function Documentation

◆ Reset() [1/2]

void v8::internal::compiler::AddressingModeUnitTest::Reset ( )
inline

Definition at line 311 of file instruction-selector-ia32-unittest.cc.

311  {
312  delete m;
313  m = new StreamBuilder(this, kMachInt32, kMachInt32, kMachInt32);
314  zero = m->Int32Constant(0);
315  null_ptr = m->Int32Constant(0);
316  non_zero = m->Int32Constant(127);
317  base_reg = m->Parameter(0);
318  index_reg = m->Parameter(0);
319 
320  scales[0] = m->Int32Constant(1);
321  scales[1] = m->Int32Constant(2);
322  scales[2] = m->Int32Constant(4);
323  scales[3] = m->Int32Constant(8);
324  }

References base_reg, index_reg, v8::internal::compiler::kMachInt32, m, non_zero, null_ptr, scales, and zero.

Referenced by AddressingModeUnitTest().

+ Here is the caller graph for this function:

◆ Reset() [2/2]

void v8::internal::compiler::AddressingModeUnitTest::Reset ( )
inline

Definition at line 190 of file instruction-selector-x64-unittest.cc.

190  {
191  delete m;
192  m = new StreamBuilder(this, kMachInt32, kMachInt32, kMachInt32);
193  zero = m->Int32Constant(0);
194  null_ptr = m->Int64Constant(0);
195  non_zero = m->Int32Constant(127);
196  base_reg = m->Parameter(0);
197  index_reg = m->Parameter(0);
198 
199  scales[0] = m->Int32Constant(1);
200  scales[1] = m->Int32Constant(2);
201  scales[2] = m->Int32Constant(4);
202  scales[3] = m->Int32Constant(8);
203  }

References base_reg, index_reg, v8::internal::compiler::kMachInt32, m, non_zero, null_ptr, scales, and zero.

◆ Run() [1/2]

void v8::internal::compiler::AddressingModeUnitTest::Run ( Node *  base,
Node *  index,
AddressingMode  mode 
)
inline

Definition at line 293 of file instruction-selector-ia32-unittest.cc.

293  {
294  Node* load = m->Load(kMachInt32, base, index);
295  m->Store(kMachInt32, base, index, load);
296  m->Return(m->Int32Constant(0));
297  Stream s = m->Build();
298  ASSERT_EQ(2U, s.size());
299  EXPECT_EQ(mode, s[0]->addressing_mode());
300  EXPECT_EQ(mode, s[1]->addressing_mode());
301  }
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 mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp

References v8::internal::compiler::kMachInt32, m, and mode().

+ Here is the call graph for this function:

◆ Run() [2/2]

void v8::internal::compiler::AddressingModeUnitTest::Run ( Node *  base,
Node *  index,
AddressingMode  mode 
)
inline

Definition at line 172 of file instruction-selector-x64-unittest.cc.

172  {
173  Node* load = m->Load(kMachInt32, base, index);
174  m->Store(kMachInt32, base, index, load);
175  m->Return(m->Int32Constant(0));
176  Stream s = m->Build();
177  ASSERT_EQ(2U, s.size());
178  EXPECT_EQ(mode, s[0]->addressing_mode());
179  EXPECT_EQ(mode, s[1]->addressing_mode());
180  }

References v8::internal::compiler::kMachInt32, m, and mode().

+ Here is the call graph for this function:

Member Data Documentation

◆ base_reg

Node * v8::internal::compiler::AddressingModeUnitTest::base_reg

Definition at line 306 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().

◆ index_reg

Node * v8::internal::compiler::AddressingModeUnitTest::index_reg

Definition at line 307 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().

◆ m

StreamBuilder * v8::internal::compiler::AddressingModeUnitTest::m

Definition at line 309 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset(), Run(), and ~AddressingModeUnitTest().

◆ non_zero

Node * v8::internal::compiler::AddressingModeUnitTest::non_zero

Definition at line 305 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().

◆ null_ptr

Node * v8::internal::compiler::AddressingModeUnitTest::null_ptr

Definition at line 304 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().

◆ scales

Node * v8::internal::compiler::AddressingModeUnitTest::scales

Definition at line 308 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().

◆ zero

Node * v8::internal::compiler::AddressingModeUnitTest::zero

Definition at line 303 of file instruction-selector-ia32-unittest.cc.

Referenced by Reset().


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