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 2819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2830 property->key()->AsLiteral()->value(), | 2830 property->key()->AsLiteral()->value(), |
2831 NOT_CONTEXTUAL); | 2831 NOT_CONTEXTUAL); |
2832 } else { | 2832 } else { |
2833 EmitKeyedCallWithIC(expr, property->key()); | 2833 EmitKeyedCallWithIC(expr, property->key()); |
2834 } | 2834 } |
2835 } else { | 2835 } else { |
2836 // Call to an arbitrary expression not handled specially above. | 2836 // Call to an arbitrary expression not handled specially above. |
2837 { PreservePositionScope scope(masm()->positions_recorder()); | 2837 { PreservePositionScope scope(masm()->positions_recorder()); |
2838 VisitForStackValue(callee); | 2838 VisitForStackValue(callee); |
2839 } | 2839 } |
2840 // Load global receiver object. | 2840 // Push the hole as receiver. |
2841 __ lw(a1, GlobalObjectOperand()); | 2841 // It will be correctly replaced in the call stub. |
2842 __ lw(a1, FieldMemOperand(a1, GlobalObject::kGlobalReceiverOffset)); | 2842 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); |
2843 __ push(a1); | 2843 __ push(a1); |
2844 // Emit function call. | 2844 // Emit function call. |
2845 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); | 2845 EmitCallWithStub(expr, RECEIVER_IS_IMPLICIT); |
2846 } | 2846 } |
2847 | 2847 |
2848 #ifdef DEBUG | 2848 #ifdef DEBUG |
2849 // RecordJSReturnSite should have been called. | 2849 // RecordJSReturnSite should have been called. |
2850 ASSERT(expr->return_is_recorded_); | 2850 ASSERT(expr->return_is_recorded_); |
2851 #endif | 2851 #endif |
2852 } | 2852 } |
2853 | 2853 |
2854 | 2854 |
2855 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 2855 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
(...skipping 2095 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4951 Assembler::target_address_at(pc_immediate_load_address)) == | 4951 Assembler::target_address_at(pc_immediate_load_address)) == |
4952 reinterpret_cast<uint32_t>( | 4952 reinterpret_cast<uint32_t>( |
4953 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4953 isolate->builtins()->OsrAfterStackCheck()->entry())); |
4954 return OSR_AFTER_STACK_CHECK; | 4954 return OSR_AFTER_STACK_CHECK; |
4955 } | 4955 } |
4956 | 4956 |
4957 | 4957 |
4958 } } // namespace v8::internal | 4958 } } // namespace v8::internal |
4959 | 4959 |
4960 #endif // V8_TARGET_ARCH_MIPS | 4960 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |