| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 for (int i = 0; i < num_parameters; i++) { | 196 for (int i = 0; i < num_parameters; i++) { |
| 197 Variable* var = scope()->parameter(i); | 197 Variable* var = scope()->parameter(i); |
| 198 if (var->IsContextSlot()) { | 198 if (var->IsContextSlot()) { |
| 199 int parameter_offset = StandardFrameConstants::kCallerSPOffset + | 199 int parameter_offset = StandardFrameConstants::kCallerSPOffset + |
| 200 (num_parameters - 1 - i) * kPointerSize; | 200 (num_parameters - 1 - i) * kPointerSize; |
| 201 // Load parameter from stack. | 201 // Load parameter from stack. |
| 202 __ mov(eax, Operand(ebp, parameter_offset)); | 202 __ mov(eax, Operand(ebp, parameter_offset)); |
| 203 // Store it in the context. | 203 // Store it in the context. |
| 204 int context_offset = Context::SlotOffset(var->index()); | 204 int context_offset = Context::SlotOffset(var->index()); |
| 205 __ mov(Operand(esi, context_offset), eax); | 205 __ mov(Operand(esi, context_offset), eax); |
| 206 // Update the write barrier. This clobbers all involved | 206 // Update the write barrier. |
| 207 // registers, so we have to use a third register to avoid | 207 __ RecordWrite(esi, context_offset, eax, ebx); |
| 208 // clobbering esi. | |
| 209 __ mov(ecx, esi); | |
| 210 __ RecordWrite(ecx, context_offset, eax, ebx); | |
| 211 } | 208 } |
| 212 } | 209 } |
| 213 Comment(";;; End allocate local context"); | 210 Comment(";;; End allocate local context"); |
| 214 } | 211 } |
| 215 | 212 |
| 216 // Trace the call. | 213 // Trace the call. |
| 217 if (FLAG_trace) { | 214 if (FLAG_trace) { |
| 218 // We have not executed any compiled code yet, so esi still holds the | 215 // We have not executed any compiled code yet, so esi still holds the |
| 219 // incoming context. | 216 // incoming context. |
| 220 __ CallRuntime(Runtime::kTraceEnter, 0); | 217 __ CallRuntime(Runtime::kTraceEnter, 0); |
| (...skipping 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4377 env->deoptimization_index()); | 4374 env->deoptimization_index()); |
| 4378 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); | 4375 __ InvokeBuiltin(Builtins::IN, CALL_FUNCTION, safepoint_generator); |
| 4379 } | 4376 } |
| 4380 | 4377 |
| 4381 | 4378 |
| 4382 #undef __ | 4379 #undef __ |
| 4383 | 4380 |
| 4384 } } // namespace v8::internal | 4381 } } // namespace v8::internal |
| 4385 | 4382 |
| 4386 #endif // V8_TARGET_ARCH_IA32 | 4383 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |