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 2252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2263 | 2263 |
2264 // Push copy of the first argument or undefined if it doesn't exist. | 2264 // Push copy of the first argument or undefined if it doesn't exist. |
2265 if (arg_count > 0) { | 2265 if (arg_count > 0) { |
2266 __ push(Operand(esp, arg_count * kPointerSize)); | 2266 __ push(Operand(esp, arg_count * kPointerSize)); |
2267 } else { | 2267 } else { |
2268 __ push(Immediate(Factory::undefined_value())); | 2268 __ push(Immediate(Factory::undefined_value())); |
2269 } | 2269 } |
2270 | 2270 |
2271 // Push the receiver of the enclosing function and do runtime call. | 2271 // Push the receiver of the enclosing function and do runtime call. |
2272 __ push(Operand(ebp, (2 + scope()->num_parameters()) * kPointerSize)); | 2272 __ push(Operand(ebp, (2 + scope()->num_parameters()) * kPointerSize)); |
2273 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 3); | 2273 // Push the strict mode flag. |
| 2274 __ push(Immediate(Smi::FromInt(strict_mode_flag()))); |
| 2275 __ CallRuntime(Runtime::kResolvePossiblyDirectEval, 4); |
2274 | 2276 |
2275 // The runtime call returns a pair of values in eax (function) and | 2277 // The runtime call returns a pair of values in eax (function) and |
2276 // edx (receiver). Touch up the stack with the right values. | 2278 // edx (receiver). Touch up the stack with the right values. |
2277 __ mov(Operand(esp, (arg_count + 0) * kPointerSize), edx); | 2279 __ mov(Operand(esp, (arg_count + 0) * kPointerSize), edx); |
2278 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); | 2280 __ mov(Operand(esp, (arg_count + 1) * kPointerSize), eax); |
2279 } | 2281 } |
2280 // Record source position for debugger. | 2282 // Record source position for debugger. |
2281 SetSourcePosition(expr->position()); | 2283 SetSourcePosition(expr->position()); |
2282 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP; | 2284 InLoopFlag in_loop = (loop_depth() > 0) ? IN_LOOP : NOT_IN_LOOP; |
2283 CallFunctionStub stub(arg_count, in_loop, RECEIVER_MIGHT_BE_VALUE); | 2285 CallFunctionStub stub(arg_count, in_loop, RECEIVER_MIGHT_BE_VALUE); |
(...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4366 // And return. | 4368 // And return. |
4367 __ ret(0); | 4369 __ ret(0); |
4368 } | 4370 } |
4369 | 4371 |
4370 | 4372 |
4371 #undef __ | 4373 #undef __ |
4372 | 4374 |
4373 } } // namespace v8::internal | 4375 } } // namespace v8::internal |
4374 | 4376 |
4375 #endif // V8_TARGET_ARCH_IA32 | 4377 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |