Index: src/builtins/mips64/builtins-mips64.cc |
diff --git a/src/builtins/mips64/builtins-mips64.cc b/src/builtins/mips64/builtins-mips64.cc |
index c4c19890f6ac7a1512635e975dc48e67eeb7fb9c..cec78ce13acd91ee3c144b3a5e650336fad0072d 100644 |
--- a/src/builtins/mips64/builtins-mips64.cc |
+++ b/src/builtins/mips64/builtins-mips64.cc |
@@ -2101,39 +2101,17 @@ void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) { |
// -- sp[0] : receiver (undefined) |
// ----------------------------------- |
- // 2. Make sure the target is actually a constructor. |
- Label target_not_constructor; |
- __ JumpIfSmi(target, &target_not_constructor); |
- __ Ld(a4, FieldMemOperand(target, HeapObject::kMapOffset)); |
- __ Lbu(a4, FieldMemOperand(a4, Map::kBitFieldOffset)); |
- __ And(a4, a4, Operand(1 << Map::kIsConstructor)); |
- __ Branch(&target_not_constructor, eq, a4, Operand(zero_reg)); |
- |
- // 3. Make sure the target is actually a constructor. |
- Label new_target_not_constructor; |
- __ JumpIfSmi(new_target, &new_target_not_constructor); |
- __ Ld(a4, FieldMemOperand(new_target, HeapObject::kMapOffset)); |
- __ Lbu(a4, FieldMemOperand(a4, Map::kBitFieldOffset)); |
- __ And(a4, a4, Operand(1 << Map::kIsConstructor)); |
- __ Branch(&new_target_not_constructor, eq, a4, Operand(zero_reg)); |
- |
- // 4a. Construct the target with the given new.target and argumentsList. |
- __ Jump(masm->isolate()->builtins()->ConstructWithArrayLike(), |
- RelocInfo::CODE_TARGET); |
+ // 2. We don't need to check explicitly for constructor target here, |
+ // since that's the first thing the Construct/ConstructWithArrayLike |
+ // builtins will do. |
- // 4b. The target is not a constructor, throw an appropriate TypeError. |
- __ bind(&target_not_constructor); |
- { |
- __ Sd(target, MemOperand(sp)); |
- __ TailCallRuntime(Runtime::kThrowNotConstructor); |
- } |
+ // 3. We don't need to check explicitly for constructor new.target here, |
+ // since that's the second thing the Construct/ConstructWithArrayLike |
+ // builtins will do. |
- // 4c. The new.target is not a constructor, throw an appropriate TypeError. |
- __ bind(&new_target_not_constructor); |
- { |
- __ Sd(new_target, MemOperand(sp)); |
- __ TailCallRuntime(Runtime::kThrowNotConstructor); |
- } |
+ // 4. Construct the target with the given new.target and argumentsList. |
+ __ Jump(masm->isolate()->builtins()->ConstructWithArrayLike(), |
+ RelocInfo::CODE_TARGET); |
} |
static void EnterArgumentsAdaptorFrame(MacroAssembler* masm) { |