Commit 15a39131 authored by palfia@homejinni.com's avatar palfia@homejinni.com

MIPS: Small refactoring of r14058.

BUG=

Review URL: https://codereview.chromium.org/12703030
Patch from Balazs Kilvady <kilvadyb@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14084 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 754c32ec
...@@ -5828,17 +5828,15 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label, ...@@ -5828,17 +5828,15 @@ Condition LCodeGen::EmitTypeofIs(Label* true_label,
__ LoadRoot(at, Heap::kNullValueRootIndex); __ LoadRoot(at, Heap::kNullValueRootIndex);
__ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input));
} }
// input is an object, it is safe to use GetObjectType in the delay slot. Register map = input;
__ GetObjectType(input, input, scratch); __ GetObjectType(input, map, scratch);
__ Branch(USE_DELAY_SLOT, false_label, __ Branch(false_label,
lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
// Still an object, so the InstanceType can be loaded.
__ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset));
__ Branch(USE_DELAY_SLOT, false_label, __ Branch(USE_DELAY_SLOT, false_label,
gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE));
// Still an object, so the BitField can be loaded. // map is still valid, so the BitField can be loaded in delay slot.
// Check for undetectable objects => false. // Check for undetectable objects => false.
__ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); __ lbu(at, FieldMemOperand(map, Map::kBitFieldOffset));
__ And(at, at, 1 << Map::kIsUndetectable); __ And(at, at, 1 << Map::kIsUndetectable);
cmp1 = at; cmp1 = at;
cmp2 = Operand(zero_reg); cmp2 = Operand(zero_reg);
......
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