Improved printing of jump tables.

Review URL: https://codereview.chromium.org/12093016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13531 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c643d9c1
......@@ -330,9 +330,18 @@ bool LCodeGen::GenerateDeoptJumpTable() {
for (int i = 0; i < deopt_jump_table_.length(); i++) {
__ bind(&deopt_jump_table_[i].label);
Address entry = deopt_jump_table_[i].address;
bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt;
Deoptimizer::BailoutType type =
is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
int id = Deoptimizer::GetDeoptimizationId(entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
if (deopt_jump_table_[i].needs_frame) {
__ mov(ip, Operand(ExternalReference::ForDeoptEntry(entry)));
if (deopt_jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
if (needs_frame_is_call.is_bound()) {
__ b(&needs_frame_is_call);
} else {
......@@ -365,7 +374,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
}
}
} else {
if (deopt_jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
__ mov(lr, Operand(pc), LeaveCC, al);
__ mov(pc, Operand(ExternalReference::ForDeoptEntry(entry)));
} else {
......
......@@ -349,9 +349,18 @@ bool LCodeGen::GenerateJumpTable() {
for (int i = 0; i < jump_table_.length(); i++) {
__ bind(&jump_table_[i].label);
Address entry = jump_table_[i].address;
bool is_lazy_deopt = jump_table_[i].is_lazy_deopt;
Deoptimizer::BailoutType type =
is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
int id = Deoptimizer::GetDeoptimizationId(entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
if (jump_table_[i].needs_frame) {
__ push(Immediate(ExternalReference::ForDeoptEntry(entry)));
if (jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
if (needs_frame_is_call.is_bound()) {
__ jmp(&needs_frame_is_call);
} else {
......@@ -396,7 +405,7 @@ bool LCodeGen::GenerateJumpTable() {
}
}
} else {
if (jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
__ call(entry, RelocInfo::RUNTIME_ENTRY);
} else {
__ jmp(entry, RelocInfo::RUNTIME_ENTRY);
......
......@@ -326,9 +326,18 @@ bool LCodeGen::GenerateDeoptJumpTable() {
for (int i = 0; i < deopt_jump_table_.length(); i++) {
__ bind(&deopt_jump_table_[i].label);
Address entry = deopt_jump_table_[i].address;
bool is_lazy_deopt = deopt_jump_table_[i].is_lazy_deopt;
Deoptimizer::BailoutType type =
is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
int id = Deoptimizer::GetDeoptimizationId(entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
__ li(t9, Operand(ExternalReference::ForDeoptEntry(entry)));
if (deopt_jump_table_[i].needs_frame) {
if (deopt_jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
if (needs_frame_is_call.is_bound()) {
__ Branch(&needs_frame_is_call);
} else {
......@@ -360,7 +369,7 @@ bool LCodeGen::GenerateDeoptJumpTable() {
}
}
} else {
if (deopt_jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
__ Call(t9);
} else {
__ Jump(t9);
......
......@@ -281,9 +281,18 @@ bool LCodeGen::GenerateJumpTable() {
for (int i = 0; i < jump_table_.length(); i++) {
__ bind(&jump_table_[i].label);
Address entry = jump_table_[i].address;
bool is_lazy_deopt = jump_table_[i].is_lazy_deopt;
Deoptimizer::BailoutType type =
is_lazy_deopt ? Deoptimizer::LAZY : Deoptimizer::EAGER;
int id = Deoptimizer::GetDeoptimizationId(entry, type);
if (id == Deoptimizer::kNotDeoptimizationEntry) {
Comment(";;; jump table entry %d.", i);
} else {
Comment(";;; jump table entry %d: deoptimization bailout %d.", i, id);
}
if (jump_table_[i].needs_frame) {
__ movq(kScratchRegister, ExternalReference::ForDeoptEntry(entry));
if (jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
if (needs_frame_is_call.is_bound()) {
__ jmp(&needs_frame_is_call);
} else {
......@@ -319,7 +328,7 @@ bool LCodeGen::GenerateJumpTable() {
}
}
} else {
if (jump_table_[i].is_lazy_deopt) {
if (is_lazy_deopt) {
__ Call(entry, RelocInfo::RUNTIME_ENTRY);
} else {
__ Jump(entry, RelocInfo::RUNTIME_ENTRY);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment