| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 | 1042 |
| 1043 void FastCodeGenerator::EmitCallWithStub(Call* expr) { | 1043 void FastCodeGenerator::EmitCallWithStub(Call* expr) { |
| 1044 // Code common for calls using the call stub. | 1044 // Code common for calls using the call stub. |
| 1045 ZoneList<Expression*>* args = expr->arguments(); | 1045 ZoneList<Expression*>* args = expr->arguments(); |
| 1046 int arg_count = args->length(); | 1046 int arg_count = args->length(); |
| 1047 for (int i = 0; i < arg_count; i++) { | 1047 for (int i = 0; i < arg_count; i++) { |
| 1048 Visit(args->at(i)); | 1048 Visit(args->at(i)); |
| 1049 } | 1049 } |
| 1050 // Record source position for debugger. | 1050 // Record source position for debugger. |
| 1051 SetSourcePosition(expr->position()); | 1051 SetSourcePosition(expr->position()); |
| 1052 CallFunctionStub stub(arg_count, NOT_IN_LOOP); | 1052 CallFunctionStub stub(arg_count, NOT_IN_LOOP, RECEIVER_MIGHT_BE_VALUE); |
| 1053 __ CallStub(&stub); | 1053 __ CallStub(&stub); |
| 1054 // Restore context register. | 1054 // Restore context register. |
| 1055 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); | 1055 __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
| 1056 DropAndApply(1, expr->context(), eax); | 1056 DropAndApply(1, expr->context(), eax); |
| 1057 } | 1057 } |
| 1058 | 1058 |
| 1059 | 1059 |
| 1060 void FastCodeGenerator::VisitCall(Call* expr) { | 1060 void FastCodeGenerator::VisitCall(Call* expr) { |
| 1061 Comment cmnt(masm_, "[ Call"); | 1061 Comment cmnt(masm_, "[ Call"); |
| 1062 Expression* fun = expr->expression(); | 1062 Expression* fun = expr->expression(); |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1692 __ add(Operand(edx), Immediate(masm_->CodeObject())); | 1692 __ add(Operand(edx), Immediate(masm_->CodeObject())); |
| 1693 __ mov(Operand(esp, 0), edx); | 1693 __ mov(Operand(esp, 0), edx); |
| 1694 // And return. | 1694 // And return. |
| 1695 __ ret(0); | 1695 __ ret(0); |
| 1696 } | 1696 } |
| 1697 | 1697 |
| 1698 | 1698 |
| 1699 #undef __ | 1699 #undef __ |
| 1700 | 1700 |
| 1701 } } // namespace v8::internal | 1701 } } // namespace v8::internal |
| OLD | NEW |