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

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

Issue 135653003: 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 | 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, CallFunctionFlags flags) { 2662 void FullCodeGenerator::EmitCallWithStub(Call* expr) {
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);
2676 Handle<Object> uninitialized = 2674 Handle<Object> uninitialized =
2677 TypeFeedbackCells::UninitializedSentinel(isolate()); 2675 TypeFeedbackCells::UninitializedSentinel(isolate());
2678 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized); 2676 Handle<Cell> cell = isolate()->factory()->NewCell(uninitialized);
2679 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell); 2677 RecordTypeFeedbackCell(expr->CallFeedbackId(), cell);
2680 __ mov(r2, Operand(cell)); 2678 __ mov(r2, Operand(cell));
2681 2679
2682 CallFunctionStub stub(arg_count, flags); 2680 // Record call targets in unoptimized code.
2681 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
2683 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2682 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2684 __ CallStub(&stub, expr->CallFeedbackId()); 2683 __ CallStub(&stub, expr->CallFeedbackId());
2685 RecordJSReturnSite(expr); 2684 RecordJSReturnSite(expr);
2686 // Restore context register. 2685 // Restore context register.
2687 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2686 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
2688 context()->DropAndPlug(1, r0); 2687 context()->DropAndPlug(1, r0);
2689 } 2688 }
2690 2689
2691 2690
2692 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) { 2691 void FullCodeGenerator::EmitResolvePossiblyDirectEval(int arg_count) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2799 __ push(r0); 2798 __ push(r0);
2800 // The receiver is implicitly the global receiver. Indicate this 2799 // The receiver is implicitly the global receiver. Indicate this
2801 // by passing the hole to the call function stub. 2800 // by passing the hole to the call function stub.
2802 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 2801 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
2803 __ push(r1); 2802 __ push(r1);
2804 __ bind(&call); 2803 __ bind(&call);
2805 } 2804 }
2806 2805
2807 // The receiver is either the global receiver or an object found 2806 // The receiver is either the global receiver or an object found
2808 // by LoadContextSlot. 2807 // by LoadContextSlot.
2809 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); 2808 EmitCallWithStub(expr);
2810 } else if (property != NULL) { 2809 } else if (property != NULL) {
2811 { PreservePositionScope scope(masm()->positions_recorder()); 2810 { PreservePositionScope scope(masm()->positions_recorder());
2812 VisitForStackValue(property->obj()); 2811 VisitForStackValue(property->obj());
2813 } 2812 }
2814 if (property->key()->IsPropertyName()) { 2813 if (property->key()->IsPropertyName()) {
2815 EmitCallWithIC(expr, 2814 EmitCallWithIC(expr,
2816 property->key()->AsLiteral()->value(), 2815 property->key()->AsLiteral()->value(),
2817 NOT_CONTEXTUAL); 2816 NOT_CONTEXTUAL);
2818 } else { 2817 } else {
2819 EmitKeyedCallWithIC(expr, property->key()); 2818 EmitKeyedCallWithIC(expr, property->key());
2820 } 2819 }
2821 } else { 2820 } else {
2822 // Call to an arbitrary expression not handled specially above. 2821 // Call to an arbitrary expression not handled specially above.
2823 { PreservePositionScope scope(masm()->positions_recorder()); 2822 { PreservePositionScope scope(masm()->positions_recorder());
2824 VisitForStackValue(callee); 2823 VisitForStackValue(callee);
2825 } 2824 }
2826 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex); 2825 __ LoadRoot(r1, Heap::kUndefinedValueRootIndex);
2827 __ push(r1); 2826 __ push(r1);
2828 // Emit function call. 2827 // Emit function call.
2829 EmitCallWithStub(expr, NO_CALL_FUNCTION_FLAGS); 2828 EmitCallWithStub(expr);
2830 } 2829 }
2831 2830
2832 #ifdef DEBUG 2831 #ifdef DEBUG
2833 // RecordJSReturnSite should have been called. 2832 // RecordJSReturnSite should have been called.
2834 ASSERT(expr->return_is_recorded_); 2833 ASSERT(expr->return_is_recorded_);
2835 #endif 2834 #endif
2836 } 2835 }
2837 2836
2838 2837
2839 void FullCodeGenerator::VisitCallNew(CallNew* expr) { 2838 void FullCodeGenerator::VisitCallNew(CallNew* expr) {
(...skipping 2070 matching lines...) Expand 10 before | Expand all | Expand 10 after
4910 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4909 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4911 reinterpret_cast<uint32_t>( 4910 reinterpret_cast<uint32_t>(
4912 isolate->builtins()->OsrAfterStackCheck()->entry())); 4911 isolate->builtins()->OsrAfterStackCheck()->entry()));
4913 return OSR_AFTER_STACK_CHECK; 4912 return OSR_AFTER_STACK_CHECK;
4914 } 4913 }
4915 4914
4916 4915
4917 } } // namespace v8::internal 4916 } } // namespace v8::internal
4918 4917
4919 #endif // V8_TARGET_ARCH_ARM 4918 #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