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 3153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3164 Handle<Code> ic = | 3164 Handle<Code> ic = |
3165 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); | 3165 isolate()->stub_cache()->ComputeCallInitialize(arity, mode); |
3166 __ li(a2, Operand(instr->name())); | 3166 __ li(a2, Operand(instr->name())); |
3167 CallCode(ic, mode, instr); | 3167 CallCode(ic, mode, instr); |
3168 // Restore context register. | 3168 // Restore context register. |
3169 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3169 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3170 } | 3170 } |
3171 | 3171 |
3172 | 3172 |
3173 void LCodeGen::DoCallFunction(LCallFunction* instr) { | 3173 void LCodeGen::DoCallFunction(LCallFunction* instr) { |
| 3174 ASSERT(ToRegister(instr->function()).is(a1)); |
3174 ASSERT(ToRegister(instr->result()).is(v0)); | 3175 ASSERT(ToRegister(instr->result()).is(v0)); |
3175 | 3176 |
3176 int arity = instr->arity(); | 3177 int arity = instr->arity(); |
3177 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); | 3178 CallFunctionStub stub(arity, NO_CALL_FUNCTION_FLAGS); |
3178 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | 3179 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); |
3179 __ Drop(1); | |
3180 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 3180 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
3181 } | 3181 } |
3182 | 3182 |
3183 | 3183 |
3184 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { | 3184 void LCodeGen::DoCallGlobal(LCallGlobal* instr) { |
3185 ASSERT(ToRegister(instr->result()).is(v0)); | 3185 ASSERT(ToRegister(instr->result()).is(v0)); |
3186 | 3186 |
3187 int arity = instr->arity(); | 3187 int arity = instr->arity(); |
3188 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; | 3188 RelocInfo::Mode mode = RelocInfo::CODE_TARGET_CONTEXT; |
3189 Handle<Code> ic = | 3189 Handle<Code> ic = |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4619 ASSERT(!environment->HasBeenRegistered()); | 4619 ASSERT(!environment->HasBeenRegistered()); |
4620 RegisterEnvironmentForDeoptimization(environment); | 4620 RegisterEnvironmentForDeoptimization(environment); |
4621 ASSERT(osr_pc_offset_ == -1); | 4621 ASSERT(osr_pc_offset_ == -1); |
4622 osr_pc_offset_ = masm()->pc_offset(); | 4622 osr_pc_offset_ = masm()->pc_offset(); |
4623 } | 4623 } |
4624 | 4624 |
4625 | 4625 |
4626 #undef __ | 4626 #undef __ |
4627 | 4627 |
4628 } } // namespace v8::internal | 4628 } } // namespace v8::internal |
OLD | NEW |