V8 Project
v8::internal::Assembler::Trampoline Class Reference
+ Collaboration diagram for v8::internal::Assembler::Trampoline:

Public Member Functions

 Trampoline ()
 
 Trampoline (int start, int slot_count)
 
int start ()
 
int end ()
 
int take_slot ()
 
 Trampoline ()
 
 Trampoline (int start, int slot_count)
 
int start ()
 
int end ()
 
int take_slot ()
 

Private Attributes

int start_
 
int end_
 
int next_slot_
 
int free_slot_count_
 

Detailed Description

Definition at line 1305 of file assembler-mips.h.

Constructor & Destructor Documentation

◆ Trampoline() [1/4]

v8::internal::Assembler::Trampoline::Trampoline ( )
inline

◆ Trampoline() [2/4]

v8::internal::Assembler::Trampoline::Trampoline ( int  start,
int  slot_count 
)
inline

Definition at line 1313 of file assembler-mips.h.

1313  {
1314  start_ = start;
1315  next_slot_ = start;
1316  free_slot_count_ = slot_count;
1317  end_ = start + slot_count * kTrampolineSlotsSize;
1318  }
static const int kTrampolineSlotsSize

References end_, free_slot_count_, v8::internal::Assembler::kTrampolineSlotsSize, next_slot_, start(), and start_.

+ Here is the call graph for this function:

◆ Trampoline() [3/4]

v8::internal::Assembler::Trampoline::Trampoline ( )
inline

Definition at line 1344 of file assembler-mips64.h.

1344  {
1345  start_ = 0;
1346  next_slot_ = 0;
1347  free_slot_count_ = 0;
1348  end_ = 0;
1349  }

References end_, free_slot_count_, next_slot_, and start_.

◆ Trampoline() [4/4]

v8::internal::Assembler::Trampoline::Trampoline ( int  start,
int  slot_count 
)
inline

Definition at line 1350 of file assembler-mips64.h.

1350  {
1351  start_ = start;
1352  next_slot_ = start;
1353  free_slot_count_ = slot_count;
1354  end_ = start + slot_count * kTrampolineSlotsSize;
1355  }

References end_, free_slot_count_, v8::internal::Assembler::kTrampolineSlotsSize, next_slot_, start(), and start_.

+ Here is the call graph for this function:

Member Function Documentation

◆ end() [1/2]

int v8::internal::Assembler::Trampoline::end ( )
inline

Definition at line 1322 of file assembler-mips.h.

1322  {
1323  return end_;
1324  }

References end_.

◆ end() [2/2]

int v8::internal::Assembler::Trampoline::end ( )
inline

Definition at line 1359 of file assembler-mips64.h.

1359  {
1360  return end_;
1361  }

References end_.

◆ start() [1/2]

int v8::internal::Assembler::Trampoline::start ( )
inline

Definition at line 1319 of file assembler-mips.h.

1319  {
1320  return start_;
1321  }

References start_.

Referenced by Trampoline().

+ Here is the caller graph for this function:

◆ start() [2/2]

int v8::internal::Assembler::Trampoline::start ( )
inline

Definition at line 1356 of file assembler-mips64.h.

1356  {
1357  return start_;
1358  }

References start_.

◆ take_slot() [1/2]

int v8::internal::Assembler::Trampoline::take_slot ( )
inline

Definition at line 1325 of file assembler-mips.h.

1325  {
1326  int trampoline_slot = kInvalidSlotPos;
1327  if (free_slot_count_ <= 0) {
1328  // We have run out of space on trampolines.
1329  // Make sure we fail in debug mode, so we become aware of each case
1330  // when this happens.
1331  DCHECK(0);
1332  // Internal exception will be caught.
1333  } else {
1334  trampoline_slot = next_slot_;
1335  free_slot_count_--;
1337  }
1338  return trampoline_slot;
1339  }
static const int kInvalidSlotPos
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, free_slot_count_, v8::internal::Assembler::kInvalidSlotPos, v8::internal::Assembler::kTrampolineSlotsSize, and next_slot_.

◆ take_slot() [2/2]

int v8::internal::Assembler::Trampoline::take_slot ( )
inline

Definition at line 1362 of file assembler-mips64.h.

1362  {
1363  int trampoline_slot = kInvalidSlotPos;
1364  if (free_slot_count_ <= 0) {
1365  // We have run out of space on trampolines.
1366  // Make sure we fail in debug mode, so we become aware of each case
1367  // when this happens.
1368  DCHECK(0);
1369  // Internal exception will be caught.
1370  } else {
1371  trampoline_slot = next_slot_;
1372  free_slot_count_--;
1374  }
1375  return trampoline_slot;
1376  }

References DCHECK, free_slot_count_, v8::internal::Assembler::kInvalidSlotPos, v8::internal::Assembler::kTrampolineSlotsSize, and next_slot_.

Member Data Documentation

◆ end_

int v8::internal::Assembler::Trampoline::end_
private

Definition at line 1343 of file assembler-mips.h.

Referenced by end(), and Trampoline().

◆ free_slot_count_

int v8::internal::Assembler::Trampoline::free_slot_count_
private

Definition at line 1345 of file assembler-mips.h.

Referenced by take_slot(), and Trampoline().

◆ next_slot_

int v8::internal::Assembler::Trampoline::next_slot_
private

Definition at line 1344 of file assembler-mips.h.

Referenced by take_slot(), and Trampoline().

◆ start_

int v8::internal::Assembler::Trampoline::start_
private

Definition at line 1342 of file assembler-mips.h.

Referenced by start(), and Trampoline().


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