Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: src/mips/full-codegen-mips.cc

Issue 133293003: MIPS: Remove flags argument from EmitCallWithStub. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2675 matching lines...) Expand 10 before | Expand all | Expand 10 after
2686 isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count); 2686 isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count);
2687 __ lw(a2, MemOperand(sp, (arg_count + 1) * kPointerSize)); // Key. 2687 __ lw(a2, MemOperand(sp, (arg_count + 1) * kPointerSize)); // Key.
2688 CallIC(ic, NOT_CONTEXTUAL, expr->CallFeedbackId()); 2688 CallIC(ic, NOT_CONTEXTUAL, expr->CallFeedbackId());
2689 RecordJSReturnSite(expr); 2689 RecordJSReturnSite(expr);
2690 // Restore context register. 2690 // Restore context register.
2691 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2691 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2692 context()->DropAndPlug(1, v0); // Drop the key still on the stack. 2692 context()->DropAndPlug(1, v0); // Drop the key still on the stack.
2693 } 2693 }
2694 2694
2695 2695
2696 void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) { 2696 void FullCodeGenerator::EmitCallWithStub(Call* expr) {
2697 // Code common for calls using the call stub. 2697 // Code common for calls using the call stub.
2698 ZoneList<Expression*>* args = expr->arguments(); 2698 ZoneList<Expression*>* args = expr->arguments();
2699 int arg_count = args->length(); 2699 int arg_count = args->length();
2700 { PreservePositionScope scope(masm()->positions_recorder()); 2700 { PreservePositionScope scope(masm()->positions_recorder());
2701 for (int i = 0; i < arg_count; i++) { 2701 for (int i = 0; i < arg_count; i++) {
2702 VisitForStackValue(args->at(i)); 2702 VisitForStackValue(args->at(i));
2703 } 2703 }
2704 } 2704 }
2705 // Record source position for debugger. 2705 // Record source position for debugger.
2706 SetSourcePosition(expr->position()); 2706 SetSourcePosition(expr->position());
2707 2707
2708 // Record call targets.
2709 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
2710 Handle<Object> uninitialized = 2708 Handle<Object> uninitialized =
2711 TypeFeedbackCells::UninitializedSentinel(isolate()); 2709 TypeFeedbackCells::UninitializedSentinel(isolate());
2712 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized); 2710 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
2713 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell); 2711 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
2714 __ li(a2, Operand(cell)); 2712 __ li(a2, Operand(cell));
2715 2713
2716 CallFunctionStub stub(arg_count, flags); 2714 // Record call targets in unoptimized code.
2715 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
2717 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2716 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2718 __ CallStub(&stub, expr->CallFeedbackId()); 2717 __ CallStub(&stub, expr->CallFeedbackId());
2719 RecordJSReturnSite(expr); 2718 RecordJSReturnSite(expr);
2720 // Restore context register. 2719 // Restore context register.
2721 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2720 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2722 context()->DropAndPlug(1, v0); 2721 context()->DropAndPlug(1, v0);
2723 } 2722 }
2724 2723
2725 2724
2726 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { 2725 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 __ push(v0); 2831 __ push(v0);
2833 // The receiver is implicitly the global receiver. Indicate this 2832 // The receiver is implicitly the global receiver. Indicate this
2834 // by passing the hole to the call function stub. 2833 // by passing the hole to the call function stub.
2835 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex); 2834 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex);
2836 __ push(a1); 2835 __ push(a1);
2837 __ bind(&call); 2836 __ bind(&call);
2838 } 2837 }
2839 2838
2840 // The receiver is either the global receiver or an object found 2839 // The receiver is either the global receiver or an object found
2841 // by LoadContextSlot. 2840 // by LoadContextSlot.
2842 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); 2841 EmitCallWithStub(expr);
2843 } else if (property != NULL) { 2842 } else if (property != NULL) {
2844 { PreservePositionScope scope(masm()->positions_recorder()); 2843 { PreservePositionScope scope(masm()->positions_recorder());
2845 VisitForStackValue(property->obj()); 2844 VisitForStackValue(property->obj());
2846 } 2845 }
2847 if (property->key()->IsPropertyName()) { 2846 if (property->key()->IsPropertyName()) {
2848 EmitCallWithIC(expr, 2847 EmitCallWithIC(expr,
2849 property->key()->AsLiteral()->value(), 2848 property->key()->AsLiteral()->value(),
2850 NOT_CONTEXTUAL); 2849 NOT_CONTEXTUAL);
2851 } else { 2850 } else {
2852 EmitKeyedCallWithIC(expr, property->key()); 2851 EmitKeyedCallWithIC(expr, property->key());
2853 } 2852 }
2854 } else { 2853 } else {
2855 // Call to an arbitrary expression not handled specially above. 2854 // Call to an arbitrary expression not handled specially above.
2856 { PreservePositionScope scope(masm()->positions_recorder()); 2855 { PreservePositionScope scope(masm()->positions_recorder());
2857 VisitForStackValue(callee); 2856 VisitForStackValue(callee);
2858 } 2857 }
2859 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex); 2858 __ LoadRoot(a1, Heap::kUndefinedValueRootIndex);
2860 __ push(a1); 2859 __ push(a1);
2861 // Emit function call. 2860 // Emit function call.
2862 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); 2861 EmitCallWithStub(expr);
2863 } 2862 }
2864 2863
2865 #ifdef DEBUG 2864 #ifdef DEBUG
2866 // RecordJSReturnSite should have been called. 2865 // RecordJSReturnSite should have been called.
2867 ASSERT(expr->return_is_recorded_); 2866 ASSERT(expr->return_is_recorded_);
2868 #endif 2867 #endif
2869 } 2868 }
2870 2869
2871 2870
2872 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2871 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
(...skipping 2092 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 Assembler::target_address_at(pc_immediate_load_address)) == 4964 Assembler::target_address_at(pc_immediate_load_address)) ==
4966 reinterpret_cast<uint32_t>( 4965 reinterpret_cast<uint32_t>(
4967 isolate->builtins()->OsrAfterStackCheck()->entry())); 4966 isolate->builtins()->OsrAfterStackCheck()->entry()));
4968 return OSR_AFTER_STACK_CHECK; 4967 return OSR_AFTER_STACK_CHECK;
4969 } 4968 }
4970 4969
4971 4970
4972 } } // namespace v8::internal 4971 } } // namespace v8::internal
4973 4972
4974 #endif // V8_TARGET_ARCH_MIPS 4973 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698