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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1789 Variable* var = fun->AsVariableProxy()->AsVariable(); | 1789 Variable* var = fun->AsVariableProxy()->AsVariable(); |
1790 | 1790 |
1791 if (var != NULL && var->is_possibly_eval()) { | 1791 if (var != NULL && var->is_possibly_eval()) { |
1792 // In a call to eval, we first call %ResolvePossiblyDirectEval to | 1792 // In a call to eval, we first call %ResolvePossiblyDirectEval to |
1793 // resolve the function we need to call and the receiver of the | 1793 // resolve the function we need to call and the receiver of the |
1794 // call. The we call the resolved function using the given | 1794 // call. The we call the resolved function using the given |
1795 // arguments. | 1795 // arguments. |
1796 ZoneList<Expression*>* args = expr->arguments(); | 1796 ZoneList<Expression*>* args = expr->arguments(); |
1797 int arg_count = args->length(); | 1797 int arg_count = args->length(); |
1798 { PreserveStatementPositionScope pos_scope(masm()->positions_recorder()); | 1798 { PreserveStatementPositionScope pos_scope(masm()->positions_recorder()); |
1799 | |
1800 VisitForStackValue(fun); | 1799 VisitForStackValue(fun); |
1801 __ PushRoot(Heap::kUndefinedValueRootIndex); // Reserved receiver slot. | 1800 __ PushRoot(Heap::kUndefinedValueRootIndex); // Reserved receiver slot. |
1802 | 1801 |
1803 // Push the arguments. | 1802 // Push the arguments. |
1804 for (int i = 0; i < arg_count; i++) { | 1803 for (int i = 0; i < arg_count; i++) { |
1805 VisitForStackValue(args->at(i)); | 1804 VisitForStackValue(args->at(i)); |
1806 } | 1805 } |
1807 | 1806 |
1808 // Push copy of the function - found below the arguments. | 1807 // Push copy of the function - found below the arguments. |
1809 __ push(Operand(rsp, (arg_count + 1) * kPointerSize)); | 1808 __ push(Operand(rsp, (arg_count + 1) * kPointerSize)); |
(...skipping 1644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3454 __ ret(0); | 3453 __ ret(0); |
3455 } | 3454 } |
3456 | 3455 |
3457 | 3456 |
3458 #undef __ | 3457 #undef __ |
3459 | 3458 |
3460 | 3459 |
3461 } } // namespace v8::internal | 3460 } } // namespace v8::internal |
3462 | 3461 |
3463 #endif // V8_TARGET_ARCH_X64 | 3462 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |