| Index: src/ia32/builtins-ia32.cc
|
| diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
|
| index c661f38f67380e7d9e00336a484029bae4336444..15094859e52e1b1a1a5a1585e5505235780021fa 100644
|
| --- a/src/ia32/builtins-ia32.cc
|
| +++ b/src/ia32/builtins-ia32.cc
|
| @@ -1142,6 +1142,30 @@ void Builtins::Generate_ReflectApply(MacroAssembler* masm) {
|
| }
|
| }
|
|
|
| +void Builtins::Generate_FunctionHasInstance(MacroAssembler* masm) {
|
| + // Stack Layout:
|
| + // esp[0] : Return address
|
| + // esp[8] : Argument n
|
| + // esp[16] : Argument n-1
|
| + // ...
|
| + // esp[8 * n] : Argument 1
|
| + // esp[8 * (n + 1)] : Receiver (callable to call)
|
| + //
|
| + // eax contains the number of arguments, n, not counting the receiver.
|
| + //
|
| + {
|
| + FrameScope scope(masm, StackFrame::INTERNAL);
|
| + __ push(esi);
|
| + __ push(edi);
|
| + __ mov(edx, Operand(ebp, 2 * kPointerSize)); // load arg.
|
| + __ mov(eax, Operand(ebp, 3 * kPointerSize)); // load receiver.
|
| + InstanceOfStub stub(masm->isolate(), true);
|
| + __ CallStub(&stub);
|
| + }
|
| +
|
| + // Pop the argument and the receiver.
|
| + __ ret(2 * kPointerSize);
|
| +}
|
|
|
| void Builtins::Generate_ReflectConstruct(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
|
|