Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 3894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3905 } else { | 3905 } else { |
| 3906 // ------------------------------------------- | 3906 // ------------------------------------------- |
| 3907 // JavaScript example: 'array[index](1, 2, 3)' | 3907 // JavaScript example: 'array[index](1, 2, 3)' |
| 3908 // ------------------------------------------- | 3908 // ------------------------------------------- |
| 3909 | 3909 |
| 3910 // Load the function to call from the property through a reference. | 3910 // Load the function to call from the property through a reference. |
| 3911 Reference ref(this, property); | 3911 Reference ref(this, property); |
| 3912 ref.GetValue(NOT_INSIDE_TYPEOF); | 3912 ref.GetValue(NOT_INSIDE_TYPEOF); |
| 3913 | 3913 |
| 3914 // Pass receiver to called function. | 3914 // Pass receiver to called function. |
| 3915 // The reference's size is non-negative. | 3915 if (property->is_synthetic()) { |
| 3916 frame_->SpillAll(); | 3916 // Use global object as receiver. |
| 3917 frame_->EmitPush(frame_->ElementAt(ref.size())); | 3917 LoadGlobalReceiver(); |
| 3918 } else { | |
| 3919 // The reference's size is non-negative. | |
| 3920 frame_->SpillAll(); | |
|
Kevin Millikin (Chromium)
2009/03/10 12:10:10
I know it's not your code, but you could try getti
Lasse Reichstein
2009/03/10 12:21:08
Done.
| |
| 3921 frame_->EmitPush(frame_->ElementAt(ref.size())); | |
| 3922 } | |
| 3918 | 3923 |
| 3919 // Call the function. | 3924 // Call the function. |
| 3920 CallWithArguments(args, node->position()); | 3925 CallWithArguments(args, node->position()); |
| 3921 } | 3926 } |
| 3922 | 3927 |
| 3923 } else { | 3928 } else { |
| 3924 // ---------------------------------- | 3929 // ---------------------------------- |
| 3925 // JavaScript example: 'foo(1, 2, 3)' // foo is not global | 3930 // JavaScript example: 'foo(1, 2, 3)' // foo is not global |
| 3926 // ---------------------------------- | 3931 // ---------------------------------- |
| 3927 | 3932 |
| (...skipping 3008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6936 | 6941 |
| 6937 // Slow-case: Go through the JavaScript implementation. | 6942 // Slow-case: Go through the JavaScript implementation. |
| 6938 __ bind(&slow); | 6943 __ bind(&slow); |
| 6939 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); | 6944 __ InvokeBuiltin(Builtins::INSTANCE_OF, JUMP_FUNCTION); |
| 6940 } | 6945 } |
| 6941 | 6946 |
| 6942 | 6947 |
| 6943 #undef __ | 6948 #undef __ |
| 6944 | 6949 |
| 6945 } } // namespace v8::internal | 6950 } } // namespace v8::internal |
| OLD | NEW |