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 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2022 __ push(Operand(rsp, arg_count * kPointerSize)); | 2022 __ push(Operand(rsp, arg_count * kPointerSize)); |
2023 } else { | 2023 } else { |
2024 __ PushRoot(Heap::kUndefinedValueRootIndex); | 2024 __ PushRoot(Heap::kUndefinedValueRootIndex); |
2025 } | 2025 } |
2026 | 2026 |
2027 // Push the receiver of the enclosing function and do runtime call. | 2027 // Push the receiver of the enclosing function and do runtime call. |
2028 __ push(Operand(rbp, (2 + info_->scope()->num_parameters()) * kPointerSize)); | 2028 __ push(Operand(rbp, (2 + info_->scope()->num_parameters()) * kPointerSize)); |
2029 | 2029 |
2030 // Push the strict mode flag. In harmony mode every eval call | 2030 // Push the strict mode flag. In harmony mode every eval call |
2031 // is a strict mode eval call. | 2031 // is a strict mode eval call. |
2032 StrictModeFlag strict_mode = strict_mode_flag(); | 2032 StrictModeFlag strict_mode = |
2033 if (FLAG_harmony_block_scoping) { | 2033 FLAG_harmony_scoping ? kStrictMode : strict_mode_flag(); |
2034 strict_mode = kStrictMode; | |
2035 } | |
2036 __ Push(Smi::FromInt(strict_mode)); | 2034 __ Push(Smi::FromInt(strict_mode)); |
2037 | 2035 |
2038 __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP | 2036 __ CallRuntime(flag == SKIP_CONTEXT_LOOKUP |
2039 ? Runtime::kResolvePossiblyDirectEvalNoLookup | 2037 ? Runtime::kResolvePossiblyDirectEvalNoLookup |
2040 : Runtime::kResolvePossiblyDirectEval, 4); | 2038 : Runtime::kResolvePossiblyDirectEval, 4); |
2041 } | 2039 } |
2042 | 2040 |
2043 | 2041 |
2044 void FullCodeGenerator::VisitCall(Call* expr) { | 2042 void FullCodeGenerator::VisitCall(Call* expr) { |
2045 #ifdef DEBUG | 2043 #ifdef DEBUG |
(...skipping 2151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4197 *context_length = 0; | 4195 *context_length = 0; |
4198 return previous_; | 4196 return previous_; |
4199 } | 4197 } |
4200 | 4198 |
4201 | 4199 |
4202 #undef __ | 4200 #undef __ |
4203 | 4201 |
4204 } } // namespace v8::internal | 4202 } } // namespace v8::internal |
4205 | 4203 |
4206 #endif // V8_TARGET_ARCH_X64 | 4204 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |