OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3096 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; | 3096 RelocInfo::Mode mode = RelocInfo::CODE_TARGET; |
3097 Handle<Code> ic = | 3097 Handle<Code> ic = |
3098 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3098 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
3099 __ mov(ecx, instr->name()); | 3099 __ mov(ecx, instr->name()); |
3100 CallCode(ic, mode, instr); | 3100 CallCode(ic, mode, instr); |
3101 } | 3101 } |
3102 | 3102 |
3103 | 3103 |
3104 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3104 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
3105 ASSERT(ToRegister(instr->context()).is(esi)); | 3105 ASSERT(ToRegister(instr->context()).is(esi)); |
| 3106 ASSERT(ToRegister(instr->function()).is(edi)); |
3106 ASSERT(ToRegister(instr->result()).is(eax)); | 3107 ASSERT(ToRegister(instr->result()).is(eax)); |
3107 | 3108 |
3108 int arity = instr->arity(); | 3109 int arity = instr->arity(); |
3109 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3110 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
3110 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3111 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
3111 __ Drop(1); | |
3112 } | 3112 } |
3113 | 3113 |
3114 | 3114 |
3115 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3115 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
3116 ASSERT(ToRegister(instr->context()).is(esi)); | 3116 ASSERT(ToRegister(instr->context()).is(esi)); |
3117 ASSERT(ToRegister(instr->result()).is(eax)); | 3117 ASSERT(ToRegister(instr->result()).is(eax)); |
3118 | 3118 |
3119 int arity = instr->arity(); | 3119 int arity = instr->arity(); |
3120 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; | 3120 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; |
3121 Handle<Code> ic = | 3121 Handle<Code> ic = |
(...skipping 1398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4520 env->deoptimization_index()); | 4520 env->deoptimization_index()); |
4521 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4521 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
4522 } | 4522 } |
4523 | 4523 |
4524 | 4524 |
4525 #undef __ | 4525 #undef __ |
4526 | 4526 |
4527 } } // namespace v8::internal | 4527 } } // namespace v8::internal |
4528 | 4528 |
4529 #endif // V8_TARGET_ARCH_IA32 | 4529 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |