mirror of
https://github.com/corda/corda.git
synced 2025-01-08 14:03:06 +00:00
rename x86 Offset for consistency with arm and powerpc OffsetPromise
This commit is contained in:
parent
d2caf50772
commit
82eec28856
@ -33,15 +33,15 @@ ResolvedPromise* resolvedPromise(Context* c, int64_t value) {
|
|||||||
return new(c->zone) ResolvedPromise(value);
|
return new(c->zone) ResolvedPromise(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Offset::Offset(Context* c, MyBlock* block, unsigned offset, AlignmentPadding* limit):
|
OffsetPromise::OffsetPromise(Context* c, MyBlock* block, unsigned offset, AlignmentPadding* limit):
|
||||||
c(c), block(block), offset(offset), limit(limit), value_(-1)
|
c(c), block(block), offset(offset), limit(limit), value_(-1)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool Offset::resolved() {
|
bool OffsetPromise::resolved() {
|
||||||
return block->start != static_cast<unsigned>(~0);
|
return block->start != static_cast<unsigned>(~0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t Offset::value() {
|
int64_t OffsetPromise::value() {
|
||||||
assert(c, resolved());
|
assert(c, resolved());
|
||||||
|
|
||||||
if (value_ == -1) {
|
if (value_ == -1) {
|
||||||
@ -52,7 +52,7 @@ int64_t Offset::value() {
|
|||||||
return value_;
|
return value_;
|
||||||
}
|
}
|
||||||
Promise* offsetPromise(Context* c) {
|
Promise* offsetPromise(Context* c) {
|
||||||
return new(c->zone) Offset(c, c->lastBlock, c->code.length(), c->lastBlock->lastPadding);
|
return new(c->zone) OffsetPromise(c, c->lastBlock, c->code.length(), c->lastBlock->lastPadding);
|
||||||
}
|
}
|
||||||
|
|
||||||
void*
|
void*
|
||||||
|
@ -29,9 +29,18 @@ class AlignmentPadding;
|
|||||||
|
|
||||||
ResolvedPromise* resolvedPromise(Context* c, int64_t value);
|
ResolvedPromise* resolvedPromise(Context* c, int64_t value);
|
||||||
|
|
||||||
class Offset: public Promise {
|
class Task {
|
||||||
public:
|
public:
|
||||||
Offset(Context* c, MyBlock* block, unsigned offset, AlignmentPadding* limit);
|
Task(Task* next): next(next) { }
|
||||||
|
|
||||||
|
virtual void run(Context* c) = 0;
|
||||||
|
|
||||||
|
Task* next;
|
||||||
|
};
|
||||||
|
|
||||||
|
class OffsetPromise: public Promise {
|
||||||
|
public:
|
||||||
|
OffsetPromise(Context* c, MyBlock* block, unsigned offset, AlignmentPadding* limit);
|
||||||
|
|
||||||
virtual bool resolved();
|
virtual bool resolved();
|
||||||
|
|
||||||
@ -46,16 +55,6 @@ class Offset: public Promise {
|
|||||||
|
|
||||||
Promise* offsetPromise(Context* c);
|
Promise* offsetPromise(Context* c);
|
||||||
|
|
||||||
|
|
||||||
class Task {
|
|
||||||
public:
|
|
||||||
Task(Task* next): next(next) { }
|
|
||||||
|
|
||||||
virtual void run(Context* c) = 0;
|
|
||||||
|
|
||||||
Task* next;
|
|
||||||
};
|
|
||||||
|
|
||||||
void* resolveOffset(vm::System* s, uint8_t* instruction, unsigned instructionSize, int64_t value);
|
void* resolveOffset(vm::System* s, uint8_t* instruction, unsigned instructionSize, int64_t value);
|
||||||
|
|
||||||
class OffsetListener: public Promise::Listener {
|
class OffsetListener: public Promise::Listener {
|
||||||
|
Loading…
Reference in New Issue
Block a user