Clean up fixups of calls to builtins. Fix lint error.
Review URL: http://codereview.chromium.org/259057 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3022 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cc0c626d70
commit
d9dd84d5e4
@ -1051,7 +1051,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
|||||||
int argc = Builtins::GetArgumentsCount(id);
|
int argc = Builtins::GetArgumentsCount(id);
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(true) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
||||||
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
||||||
unresolved_.Add(entry);
|
unresolved_.Add(entry);
|
||||||
@ -1069,7 +1068,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
|
|||||||
int argc = Builtins::GetArgumentsCount(id);
|
int argc = Builtins::GetArgumentsCount(id);
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(true) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
||||||
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
Unresolved entry = { pc_offset() - kInstrSize, flags, name };
|
||||||
unresolved_.Add(entry);
|
unresolved_.Add(entry);
|
||||||
|
@ -201,20 +201,13 @@ bool PendingFixups::Process(Handle<JSBuiltinsObject> builtins) {
|
|||||||
}
|
}
|
||||||
Code* code = Code::cast(code_[i]);
|
Code* code = Code::cast(code_[i]);
|
||||||
Address pc = code->instruction_start() + pc_[i];
|
Address pc = code->instruction_start() + pc_[i];
|
||||||
bool is_pc_relative = Bootstrapper::FixupFlagsIsPCRelative::decode(flags);
|
RelocInfo target(pc, RelocInfo::CODE_TARGET, 0);
|
||||||
bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags);
|
bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags);
|
||||||
|
|
||||||
if (use_code_object) {
|
if (use_code_object) {
|
||||||
if (is_pc_relative) {
|
target.set_target_object(f->code());
|
||||||
Assembler::set_target_address_at(
|
|
||||||
pc, reinterpret_cast<Address>(f->code()));
|
|
||||||
} else {
|
|
||||||
*reinterpret_cast<Object**>(pc) = f->code();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Assembler::set_target_address_at(pc, f->code()->instruction_start());
|
target.set_target_address(f->code()->instruction_start());
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(StringEvent("resolved", name));
|
LOG(StringEvent("resolved", name));
|
||||||
}
|
}
|
||||||
Clear();
|
Clear();
|
||||||
|
@ -66,9 +66,8 @@ class Bootstrapper : public AllStatic {
|
|||||||
static bool IsActive();
|
static bool IsActive();
|
||||||
|
|
||||||
// Encoding/decoding support for fixup flags.
|
// Encoding/decoding support for fixup flags.
|
||||||
class FixupFlagsIsPCRelative: public BitField<bool, 0, 1> {};
|
class FixupFlagsUseCodeObject: public BitField<bool, 0, 1> {};
|
||||||
class FixupFlagsUseCodeObject: public BitField<bool, 1, 1> {};
|
class FixupFlagsArgumentsCount: public BitField<uint32_t, 1, 32-1> {};
|
||||||
class FixupFlagsArgumentsCount: public BitField<uint32_t, 2, 32-2> {};
|
|
||||||
|
|
||||||
// Support for thread preemption.
|
// Support for thread preemption.
|
||||||
static int ArchiveSpacePerThread();
|
static int ArchiveSpacePerThread();
|
||||||
|
@ -1049,7 +1049,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) {
|
|||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(true) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
||||||
Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name };
|
Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name };
|
||||||
unresolved_.Add(entry);
|
unresolved_.Add(entry);
|
||||||
@ -1068,7 +1067,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
|
|||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(false) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
||||||
Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name };
|
Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name };
|
||||||
unresolved_.Add(entry);
|
unresolved_.Add(entry);
|
||||||
|
@ -947,7 +947,7 @@ class ReferenceUpdater: public ObjectVisitor {
|
|||||||
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(encoded_target));
|
static_cast<uint32_t>(reinterpret_cast<uintptr_t>(encoded_target));
|
||||||
ASSERT(reinterpret_cast<uintptr_t>(encoded_target) == small_target);
|
ASSERT(reinterpret_cast<uintptr_t>(encoded_target) == small_target);
|
||||||
data_32_bit_.Add(small_target);
|
data_32_bit_.Add(small_target);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual void VisitExternalReferences(Address* start, Address* end) {
|
virtual void VisitExternalReferences(Address* start, Address* end) {
|
||||||
|
@ -363,7 +363,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) {
|
|||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(false) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(true);
|
||||||
Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name };
|
Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name };
|
||||||
unresolved_.Add(entry);
|
unresolved_.Add(entry);
|
||||||
@ -1556,7 +1555,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) {
|
|||||||
if (!resolved) {
|
if (!resolved) {
|
||||||
uint32_t flags =
|
uint32_t flags =
|
||||||
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
Bootstrapper::FixupFlagsArgumentsCount::encode(argc) |
|
||||||
Bootstrapper::FixupFlagsIsPCRelative::encode(true) |
|
|
||||||
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
Bootstrapper::FixupFlagsUseCodeObject::encode(false);
|
||||||
Unresolved entry =
|
Unresolved entry =
|
||||||
{ pc_offset() - kCallTargetAddressOffset, flags, name };
|
{ pc_offset() - kCallTargetAddressOffset, flags, name };
|
||||||
|
Loading…
Reference in New Issue
Block a user