| Index: src/ia32/macro-assembler-ia32.cc
|
| diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
|
| index fcae7a2fcf78c1a4c73efc80998531309cb8bf09..8540d168ea7c96703a6dab2b453c00b220348b1f 100644
|
| --- a/src/ia32/macro-assembler-ia32.cc
|
| +++ b/src/ia32/macro-assembler-ia32.cc
|
| @@ -2034,6 +2034,45 @@ void MacroAssembler::InvokeFunction(Handle<JSFunction> function,
|
| }
|
|
|
|
|
| +void MacroAssembler::InvokeConstruct(Register fun,
|
| + const ParameterCount& actual) {
|
| + // Load argument count into eax.
|
| + if (actual.is_immediate()) {
|
| + SafeSet(eax, Immediate(actual.immediate()));
|
| + } else {
|
| + ASSERT(actual.reg().is(eax));
|
| + }
|
| +
|
| + // Dispatch to the function-specific construct stub.
|
| + ASSERT(fun.is(edi));
|
| + mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
|
| + mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kConstructStubOffset));
|
| + lea(ebx, FieldOperand(ebx, Code::kHeaderSize));
|
| + jmp(ebx);
|
| +}
|
| +
|
| +
|
| +void MacroAssembler::InvokeConstruct(Handle<JSFunction> function,
|
| + const ParameterCount& actual) {
|
| + // Get the function and setup the context.
|
| + mov(edi, Immediate(function));
|
| + mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
|
| +
|
| + // Load argument count into eax.
|
| + if (actual.is_immediate()) {
|
| + SafeSet(eax, Immediate(actual.immediate()));
|
| + } else {
|
| + ASSERT(actual.reg().is(eax));
|
| + }
|
| +
|
| + // Dispatch to the function-specific construct stub.
|
| + mov(ebx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset));
|
| + mov(ebx, FieldOperand(ebx, SharedFunctionInfo::kConstructStubOffset));
|
| + lea(ebx, FieldOperand(ebx, Code::kHeaderSize));
|
| + jmp(ebx);
|
| +}
|
| +
|
| +
|
| void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
| InvokeFlag flag,
|
| const CallWrapper& call_wrapper) {
|
|
|