OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 RelocInfo::CODE_TARGET); | 2762 RelocInfo::CODE_TARGET); |
2763 } else { | 2763 } else { |
2764 EmitKeyedCallWithIC(expr, property->key()); | 2764 EmitKeyedCallWithIC(expr, property->key()); |
2765 } | 2765 } |
2766 | 2766 |
2767 } else { | 2767 } else { |
2768 // Call to an arbitrary expression not handled specially above. | 2768 // Call to an arbitrary expression not handled specially above. |
2769 { PreservePositionScope scope(masm()->positions_recorder()); | 2769 { PreservePositionScope scope(masm()->positions_recorder()); |
2770 VisitForStackValue(callee); | 2770 VisitForStackValue(callee); |
2771 } | 2771 } |
2772 // Load global receiver object. | 2772 // Push the hole as receiver. |
2773 __ mov(ebx, GlobalObjectOperand()); | 2773 // It will be correctly replaced in the call stub. |
2774 __ push(FieldOperand(ebx, GlobalObject::kGlobalReceiverOffset)); | 2774 __ push(Immediate(isolate()->factory()->the_hole_value())); |
2775 // Emit function call. | 2775 // Emit function call. |
2776 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); | 2776 EmitCallWithStub(expr, RECEIVER_IS_IMPLICIT); |
2777 } | 2777 } |
2778 | 2778 |
2779 #ifdef DEBUG | 2779 #ifdef DEBUG |
2780 // RecordJSReturnSite should have been called. | 2780 // RecordJSReturnSite should have been called. |
2781 ASSERT(expr->return_is_recorded_); | 2781 ASSERT(expr->return_is_recorded_); |
2782 #endif | 2782 #endif |
2783 } | 2783 } |
2784 | 2784 |
2785 | 2785 |
2786 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 2786 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
(...skipping 2122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4909 | 4909 |
4910 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4910 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4911 Assembler::target_address_at(call_target_address)); | 4911 Assembler::target_address_at(call_target_address)); |
4912 return OSR_AFTER_STACK_CHECK; | 4912 return OSR_AFTER_STACK_CHECK; |
4913 } | 4913 } |
4914 | 4914 |
4915 | 4915 |
4916 } } // namespace v8::internal | 4916 } } // namespace v8::internal |
4917 | 4917 |
4918 #endif // V8_TARGET_ARCH_IA32 | 4918 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |