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

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

Issue 133393003: Revert "Remove flags argument from EmitCallWithStub" and corresponding MIPS CL (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 | src/full-codegen.h » ('j') | 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 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count); 2652 isolate()->stub_cache()->ComputeKeyedCallInitialize(arg_count);
2653 __ ldr(r2, MemOperand(sp, (arg_count + 1) * kPointerSize)); // Key. 2653 __ ldr(r2, MemOperand(sp, (arg_count + 1) * kPointerSize)); // Key.
2654 CallIC(ic, NOT_CONTEXTUAL, expr->CallFeedbackId()); 2654 CallIC(ic, NOT_CONTEXTUAL, expr->CallFeedbackId());
2655 RecordJSReturnSite(expr); 2655 RecordJSReturnSite(expr);
2656 // Restore context register. 2656 // Restore context register.
2657 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2657 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2658 context()->DropAndPlug(1, r0); // Drop the key still on the stack. 2658 context()->DropAndPlug(1, r0); // Drop the key still on the stack.
2659 } 2659 }
2660 2660
2661 2661
2662 void FullCodeGenerator::EmitCallWithStub(Call* expr) { 2662 void FullCodeGenerator::EmitCallWithStub(Call* expr, CallFunctionFlags flags) {
2663 // Code common for calls using the call stub. 2663 // Code common for calls using the call stub.
2664 ZoneList<Expression*>* args = expr->arguments(); 2664 ZoneList<Expression*>* args = expr->arguments();
2665 int arg_count = args->length(); 2665 int arg_count = args->length();
2666 { PreservePositionScope scope(masm()->positions_recorder()); 2666 { PreservePositionScope scope(masm()->positions_recorder());
2667 for (int i = 0; i < arg_count; i++) { 2667 for (int i = 0; i < arg_count; i++) {
2668 VisitForStackValue(args->at(i)); 2668 VisitForStackValue(args->at(i));
2669 } 2669 }
2670 } 2670 }
2671 // Record source position for debugger. 2671 // Record source position for debugger.
2672 SetSourcePosition(expr->position()); 2672 SetSourcePosition(expr->position());
2673 2673
2674 // Record call targets in unoptimized code.
2675 flags = static_cast<CallFunctionFlags>(flags | RECORD_CALL_TARGET);
2674 Handle<Object> uninitialized = 2676 Handle<Object> uninitialized =
2675 TypeFeedbackCells::UninitializedSentinel(isolate()); 2677 TypeFeedbackCells::UninitializedSentinel(isolate());
2676 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized); 2678 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
2677 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell); 2679 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
2678 __ mov(r2, Operand(cell)); 2680 __ mov(r2, Operand(cell));
2679 2681
2680 // Record call targets in unoptimized code. 2682 CallFunctionStub stub(arg_count, flags);
2681 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
2682 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2683 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2683 __ CallStub(&stub, expr->CallFeedbackId()); 2684 __ CallStub(&stub, expr->CallFeedbackId());
2684 RecordJSReturnSite(expr); 2685 RecordJSReturnSite(expr);
2685 // Restore context register. 2686 // Restore context register.
2686 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2687 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2687 context()->DropAndPlug(1, r0); 2688 context()->DropAndPlug(1, r0);
2688 } 2689 }
2689 2690
2690 2691
2691 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { 2692 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2798 __ push(r0); 2799 __ push(r0);
2799 // The receiver is implicitly the global receiver. Indicate this 2800 // The receiver is implicitly the global receiver. Indicate this
2800 // by passing the hole to the call function stub. 2801 // by passing the hole to the call function stub.
2801 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 2802 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
2802 __ push(r1); 2803 __ push(r1);
2803 __ bind(&call); 2804 __ bind(&call);
2804 } 2805 }
2805 2806
2806 // The receiver is either the global receiver or an object found 2807 // The receiver is either the global receiver or an object found
2807 // by LoadContextSlot. 2808 // by LoadContextSlot.
2808 EmitCallWithStub(expr); 2809 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
2809 } else if (property != NULL) { 2810 } else if (property != NULL) {
2810 { PreservePositionScope scope(masm()->positions_recorder()); 2811 { PreservePositionScope scope(masm()->positions_recorder());
2811 VisitForStackValue(property->obj()); 2812 VisitForStackValue(property->obj());
2812 } 2813 }
2813 if (property->key()->IsPropertyName()) { 2814 if (property->key()->IsPropertyName()) {
2814 EmitCallWithIC(expr, 2815 EmitCallWithIC(expr,
2815 property->key()->AsLiteral()->value(), 2816 property->key()->AsLiteral()->value(),
2816 NOT_CONTEXTUAL); 2817 NOT_CONTEXTUAL);
2817 } else { 2818 } else {
2818 EmitKeyedCallWithIC(expr, property->key()); 2819 EmitKeyedCallWithIC(expr, property->key());
2819 } 2820 }
2820 } else { 2821 } else {
2821 // Call to an arbitrary expression not handled specially above. 2822 // Call to an arbitrary expression not handled specially above.
2822 { PreservePositionScope scope(masm()->positions_recorder()); 2823 { PreservePositionScope scope(masm()->positions_recorder());
2823 VisitForStackValue(callee); 2824 VisitForStackValue(callee);
2824 } 2825 }
2825 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 2826 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
2826 __ push(r1); 2827 __ push(r1);
2827 // Emit function call. 2828 // Emit function call.
2828 EmitCallWithStub(expr); 2829 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS);
2829 } 2830 }
2830 2831
2831 #ifdef DEBUG 2832 #ifdef DEBUG
2832 // RecordJSReturnSite should have been called. 2833 // RecordJSReturnSite should have been called.
2833 ASSERT(expr->return_is_recorded_); 2834 ASSERT(expr->return_is_recorded_);
2834 #endif 2835 #endif
2835 } 2836 }
2836 2837
2837 2838
2838 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2839 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
4909 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4910 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4910 reinterpret_cast<uint32_t>( 4911 reinterpret_cast<uint32_t>(
4911 isolate->builtins()->OsrAfterStackCheck()->entry())); 4912 isolate->builtins()->OsrAfterStackCheck()->entry()));
4912 return OSR_AFTER_STACK_CHECK; 4913 return OSR_AFTER_STACK_CHECK;
4913 } 4914 }
4914 4915
4915 4916
4916 } } // namespace v8::internal 4917 } } // namespace v8::internal
4917 4918
4918 #endif // V8_TARGET_ARCH_ARM 4919 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698