Chromium Code Reviews| Index: src/ia32/codegen-ia32.cc |
| =================================================================== |
| --- src/ia32/codegen-ia32.cc (revision 5833) |
| +++ src/ia32/codegen-ia32.cc (working copy) |
| @@ -6294,6 +6294,19 @@ |
| // Push the receiver onto the frame. |
| Load(property->obj()); |
| + // Load the name of the function. |
| + Load(property->key()); |
| + |
| + // Swap the name of the function and the receiver on the stack to have |
| + // a stack image common for calls using an IC (receiver followed by |
| + // arguments). |
| + Result tmp1 = frame_->Pop(); |
|
Mads Ager (chromium)
2010/11/17 13:11:37
Use names like 'key' and 'receiver' instead of tmp
Søren Thygesen Gjesse
2010/11/18 08:48:57
Done.
|
| + Result tmp2 = frame_->Pop(); |
| + frame_->Push(&tmp1); |
| + frame_->Push(&tmp2); |
| + tmp1.Unuse(); |
| + tmp2.Unuse(); |
| + |
| // Load the arguments. |
| int arg_count = args->length(); |
| for (int i = 0; i < arg_count; i++) { |
| @@ -6301,15 +6314,14 @@ |
| frame_->SpillTop(); |
| } |
| - // Load the name of the function. |
| - Load(property->key()); |
| - |
| - // Call the IC initialization code. |
| + // Place the key on top of stack and call the IC initialization code. |
| + frame_->PushElementAt(arg_count + 1); |
| CodeForSourcePosition(node->position()); |
| Result result = |
| frame_->CallKeyedCallIC(RelocInfo::CODE_TARGET, |
| arg_count, |
| loop_nesting()); |
| + frame_->Drop(); // Drop the key still on the stack. |
| frame_->RestoreContextRegister(); |
| frame_->Push(&result); |
| } |