Chromium Code Reviews| Index: src/x64/code-stubs-x64.cc |
| diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
| index 481e100c77361db3b333794d1e82e34e5f19aa32..2e2095f145d0539aa2996a66b02b619197178dda 100644 |
| --- a/src/x64/code-stubs-x64.cc |
| +++ b/src/x64/code-stubs-x64.cc |
| @@ -2108,6 +2108,20 @@ void CallICStub::Generate(MacroAssembler* masm) { |
| __ bind(&cont); |
| } |
| + { |
|
Benedikt Meurer
2015/10/22 11:08:05
You need to do the same in the CallFunctionStub.
|
| + Label non_classConstructor; |
| + __ movp(rdx, FieldOperand(rdi, JSFunction::kSharedFunctionInfoOffset)); |
| + // Check whether the current function is a classConstructor |
| + __ testb(FieldOperand(rdx, SharedFunctionInfo::kIsArrowByteOffset), |
| + Immediate(FunctionKind::kClassConstructor)); |
| + __ j(zero, &non_classConstructor); |
|
Benedikt Meurer
2015/10/22 11:08:05
You can use Label::kNear here.
Camillo Bruni
2015/11/03 16:05:27
done
|
| + // In the case of a classConstructor, let the CallFunction builtin handle |
| + // throwing a TypeError. |
| + __ Jump(masm->isolate()->builtins()->CallFunction(), |
| + RelocInfo::CODE_TARGET); |
| + __ bind(&non_classConstructor); |
| + } |
| + |
| __ InvokeFunction(rdi, actual, JUMP_FUNCTION, NullCallWrapper()); |
|
Benedikt Meurer
2015/10/22 11:08:05
Please check if it's viable to use __Jump(builtin-
|
| __ bind(&slow); |