Commit 0c7e1bef authored by ziyang's avatar ziyang Committed by Commit bot

PPC/s390: Remove unnecessary duplication of FunctionKind enums in CompilerHints

Port 7a82be3d

Original commit message:

    The duplicated enum values are only used by the FastNewClosureStub,
    so inline them there, with the help of one new constant (kFunctionKindShift)
    in SharedFunctionInfo.

R=adamk@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, bjaideep@ca.ibm.com, michael_dawson@ca.ibm.com, mbrandy@us.ibm.com
BUG=

Review-Url: https://codereview.chromium.org/2391343003
Cr-Commit-Position: refs/heads/master@{#40017}
parent 6ea067a4
......@@ -2452,7 +2452,9 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
Label class_constructor;
__ LoadP(r5, FieldMemOperand(r4, JSFunction::kSharedFunctionInfoOffset));
__ lwz(r6, FieldMemOperand(r5, SharedFunctionInfo::kCompilerHintsOffset));
__ TestBitMask(r6, SharedFunctionInfo::kClassConstructorBits, r0);
__ TestBitMask(r6, FunctionKind::kClassConstructor
<< SharedFunctionInfo::kFunctionKindShift,
r0);
__ bne(&class_constructor, cr0);
// Enter the context of the function; ToObject has to run in the function
......
......@@ -2461,7 +2461,9 @@ void Builtins::Generate_CallFunction(MacroAssembler* masm,
Label class_constructor;
__ LoadP(r4, FieldMemOperand(r3, JSFunction::kSharedFunctionInfoOffset));
__ LoadlW(r5, FieldMemOperand(r4, SharedFunctionInfo::kCompilerHintsOffset));
__ TestBitMask(r5, SharedFunctionInfo::kClassConstructorBits, r0);
__ TestBitMask(r5, FunctionKind::kClassConstructor
<< SharedFunctionInfo::kFunctionKindShift,
r0);
__ bne(&class_constructor);
// Enter the context of the function; ToObject has to run in the function
......
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