OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2065 | 2065 |
2066 if (var != NULL && var->is_possibly_eval()) { | 2066 if (var != NULL && var->is_possibly_eval()) { |
2067 // In a call to eval, we first call %ResolvePossiblyDirectEval to | 2067 // In a call to eval, we first call %ResolvePossiblyDirectEval to |
2068 // resolve the function we need to call and the receiver of the | 2068 // resolve the function we need to call and the receiver of the |
2069 // call. Then we call the resolved function using the given | 2069 // call. Then we call the resolved function using the given |
2070 // arguments. | 2070 // arguments. |
2071 ZoneList<Expression*>* args = expr->arguments(); | 2071 ZoneList<Expression*>* args = expr->arguments(); |
2072 int arg_count = args->length(); | 2072 int arg_count = args->length(); |
2073 { PreserveStatementPositionScope pos_scope(masm()->positions_recorder()); | 2073 { PreserveStatementPositionScope pos_scope(masm()->positions_recorder()); |
2074 VisitForStackValue(fun); | 2074 VisitForStackValue(fun); |
2075 __ push(Immediate(Factory::undefined_value())); // Reserved receiver slot
. | 2075 // Reserved receiver slot. |
| 2076 __ push(Immediate(Factory::undefined_value())); |
2076 | 2077 |
2077 // Push the arguments. | 2078 // Push the arguments. |
2078 for (int i = 0; i < arg_count; i++) { | 2079 for (int i = 0; i < arg_count; i++) { |
2079 VisitForStackValue(args->at(i)); | 2080 VisitForStackValue(args->at(i)); |
2080 } | 2081 } |
2081 | 2082 |
2082 // Push copy of the function - found below the arguments. | 2083 // Push copy of the function - found below the arguments. |
2083 __ push(Operand(esp, (arg_count + 1) * kPointerSize)); | 2084 __ push(Operand(esp, (arg_count + 1) * kPointerSize)); |
2084 | 2085 |
2085 // Push copy of the first argument or undefined if it doesn't exist. | 2086 // Push copy of the first argument or undefined if it doesn't exist. |
(...skipping 1663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3749 // And return. | 3750 // And return. |
3750 __ ret(0); | 3751 __ ret(0); |
3751 } | 3752 } |
3752 | 3753 |
3753 | 3754 |
3754 #undef __ | 3755 #undef __ |
3755 | 3756 |
3756 } } // namespace v8::internal | 3757 } } // namespace v8::internal |
3757 | 3758 |
3758 #endif // V8_TARGET_ARCH_IA32 | 3759 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |