Index: src/x87/macro-assembler-x87.cc |
diff --git a/src/x87/macro-assembler-x87.cc b/src/x87/macro-assembler-x87.cc |
index 1fab3aa7a3bcb754757f48f1ac389e2a4a05457b..afd983fbd2b1b817c7620cc0b57e552e0ed008b9 100644 |
--- a/src/x87/macro-assembler-x87.cc |
+++ b/src/x87/macro-assembler-x87.cc |
@@ -1761,33 +1761,8 @@ void MacroAssembler::GetMapConstructor(Register result, Register map, |
} |
-void MacroAssembler::TryGetFunctionPrototype(Register function, |
- Register result, |
- Register scratch, |
- Label* miss, |
- bool miss_on_bound_function) { |
- Label non_instance; |
- if (miss_on_bound_function) { |
- // Check that the receiver isn't a smi. |
- JumpIfSmi(function, miss); |
- |
- // Check that the function really is a function. |
- CmpObjectType(function, JS_FUNCTION_TYPE, result); |
- j(not_equal, miss); |
- |
- // If a bound function, go to miss label. |
- mov(scratch, |
- FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
- BooleanBitTest(scratch, SharedFunctionInfo::kCompilerHintsOffset, |
- SharedFunctionInfo::kBoundFunction); |
- j(not_zero, miss); |
- |
- // Make sure that the function has an instance prototype. |
- movzx_b(scratch, FieldOperand(result, Map::kBitFieldOffset)); |
- test(scratch, Immediate(1 << Map::kHasNonInstancePrototype)); |
- j(not_zero, &non_instance); |
- } |
- |
+void MacroAssembler::TryGetFunctionPrototype(Register function, Register result, |
+ Register scratch, Label* miss) { |
// Get the prototype or initial map from the function. |
mov(result, |
FieldOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
@@ -1801,20 +1776,11 @@ void MacroAssembler::TryGetFunctionPrototype(Register function, |
// If the function does not have an initial map, we're done. |
Label done; |
CmpObjectType(result, MAP_TYPE, scratch); |
- j(not_equal, &done); |
+ j(not_equal, &done, Label::kNear); |
// Get the prototype from the initial map. |
mov(result, FieldOperand(result, Map::kPrototypeOffset)); |
- if (miss_on_bound_function) { |
- jmp(&done); |
- |
- // Non-instance prototype: Fetch prototype from constructor field |
- // in initial map. |
- bind(&non_instance); |
- GetMapConstructor(result, result, scratch); |
- } |
- |
// All done. |
bind(&done); |
} |