Commit 78d8ce1b authored by ivica.bogosavljevic's avatar ivica.bogosavljevic Committed by Commit bot

MIPS: Fix [es6] Introduce spec compliant IsConstructor.

In Builtins::Generate_Construct, the system was trying to
call ConstructProxy on a Proxy object without a constructor
because it was checking the wrong bit in the Proxy object's
supported operation mask.

TEST=test262/built-ins/Proxy/create-target-is-not-constructor
BUG=

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

Cr-Commit-Position: refs/heads/master@{#33036}
parent e1bb354b
......@@ -2038,7 +2038,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
// Check if target has a [[Construct]] internal method.
__ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset));
__ And(t3, t3, Operand(1 << Map::kIsCallable));
__ And(t3, t3, Operand(1 << Map::kIsConstructor));
__ Branch(&non_constructor, eq, t3, Operand(zero_reg));
// Only dispatch to proxies after checking whether they are constructors.
......
......@@ -2028,7 +2028,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
// Check if target has a [[Construct]] internal method.
__ lbu(t3, FieldMemOperand(t1, Map::kBitFieldOffset));
__ And(t3, t3, Operand(1 << Map::kIsCallable));
__ And(t3, t3, Operand(1 << Map::kIsConstructor));
__ Branch(&non_constructor, eq, t3, Operand(zero_reg));
// Only dispatch to proxies after checking whether they are constructors.
......
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