OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4222 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); | 4222 isolate()->stub_cache()->ComputeKeyedCallInitialize(arity); |
4223 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4223 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4224 } | 4224 } |
4225 | 4225 |
4226 | 4226 |
4227 void LCodeGen::DoCallNamed(LCallNamed* instr) { | 4227 void LCodeGen::DoCallNamed(LCallNamed* instr) { |
4228 ASSERT(ToRegister(instr->context()).is(esi)); | 4228 ASSERT(ToRegister(instr->context()).is(esi)); |
4229 ASSERT(ToRegister(instr->result()).is(eax)); | 4229 ASSERT(ToRegister(instr->result()).is(eax)); |
4230 | 4230 |
4231 int arity = instr->arity(); | 4231 int arity = instr->arity(); |
4232 Handle<Code> ic = | 4232 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
4233 isolate()->stub_cache()->ComputeCallInitialize(arity, NOT_CONTEXTUAL); | |
4234 __ mov(ecx, instr->name()); | 4233 __ mov(ecx, instr->name()); |
4235 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4234 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4236 } | 4235 } |
4237 | 4236 |
4238 | 4237 |
4239 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 4238 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
4240 ASSERT(ToRegister(instr->context()).is(esi)); | 4239 ASSERT(ToRegister(instr->context()).is(esi)); |
4241 ASSERT(ToRegister(instr->function()).is(edi)); | 4240 ASSERT(ToRegister(instr->function()).is(edi)); |
4242 ASSERT(ToRegister(instr->result()).is(eax)); | 4241 ASSERT(ToRegister(instr->result()).is(eax)); |
4243 | 4242 |
4244 int arity = instr->arity(); | 4243 int arity = instr->arity(); |
4245 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 4244 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
4246 if (instr->hydrogen()->IsTailCall()) { | 4245 if (instr->hydrogen()->IsTailCall()) { |
4247 if (NeedsEagerFrame()) __ leave(); | 4246 if (NeedsEagerFrame()) __ leave(); |
4248 __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); | 4247 __ jmp(stub.GetCode(isolate()), RelocInfo::CODE_TARGET); |
4249 } else { | 4248 } else { |
4250 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 4249 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |
4251 } | 4250 } |
4252 } | 4251 } |
4253 | 4252 |
4254 | 4253 |
4255 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 4254 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
4256 ASSERT(ToRegister(instr->context()).is(esi)); | 4255 ASSERT(ToRegister(instr->context()).is(esi)); |
4257 ASSERT(ToRegister(instr->result()).is(eax)); | 4256 ASSERT(ToRegister(instr->result()).is(eax)); |
4258 | 4257 |
4259 int arity = instr->arity(); | 4258 int arity = instr->arity(); |
4260 Handle<Code> ic = | 4259 Handle<Code> ic = isolate()->stub_cache()->ComputeCallInitialize(arity); |
4261 isolate()->stub_cache()->ComputeCallInitialize(arity, CONTEXTUAL); | |
4262 __ mov(ecx, instr->name()); | 4260 __ mov(ecx, instr->name()); |
4263 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4261 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4264 } | 4262 } |
4265 | 4263 |
4266 | 4264 |
4267 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { | 4265 void LCodeGen::DoCallKnownGlobal(LCallKnownGlobal* instr) { |
4268 ASSERT(ToRegister(instr->result()).is(eax)); | 4266 ASSERT(ToRegister(instr->result()).is(eax)); |
4269 CallKnownFunction(instr->hydrogen()->target(), | 4267 CallKnownFunction(instr->hydrogen()->target(), |
4270 instr->hydrogen()->formal_parameter_count(), | 4268 instr->hydrogen()->formal_parameter_count(), |
4271 instr->arity(), | 4269 instr->arity(), |
(...skipping 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6356 FixedArray::kHeaderSize - kPointerSize)); | 6354 FixedArray::kHeaderSize - kPointerSize)); |
6357 __ bind(&done); | 6355 __ bind(&done); |
6358 } | 6356 } |
6359 | 6357 |
6360 | 6358 |
6361 #undef __ | 6359 #undef __ |
6362 | 6360 |
6363 } } // namespace v8::internal | 6361 } } // namespace v8::internal |
6364 | 6362 |
6365 #endif // V8_TARGET_ARCH_IA32 | 6363 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |