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

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

Issue 199973004: Continued fix for 351257. Reusing the feedback vector is too complex. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE. Created 6 years, 9 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 | « src/a64/full-codegen-a64.cc ('k') | src/compiler.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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 // o sp: stack pointer 124 // o sp: stack pointer
125 // o lr: return address 125 // o lr: return address
126 // 126 //
127 // The function builds a JS frame. Please see JavaScriptFrameConstants in 127 // The function builds a JS frame. Please see JavaScriptFrameConstants in
128 // frames-arm.h for its layout. 128 // frames-arm.h for its layout.
129 void FullCodeGenerator::Generate() { 129 void FullCodeGenerator::Generate() {
130 CompilationInfo* info = info_; 130 CompilationInfo* info = info_;
131 handler_table_ = 131 handler_table_ =
132 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); 132 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED);
133 133
134 InitializeFeedbackVector();
135
136 profiling_counter_ = isolate()->factory()->NewCell( 134 profiling_counter_ = isolate()->factory()->NewCell(
137 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); 135 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
138 SetFunctionPosition(function()); 136 SetFunctionPosition(function());
139 Comment cmnt(masm_, "[ function compiled by full code generator"); 137 Comment cmnt(masm_, "[ function compiled by full code generator");
140 138
141 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 139 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
142 140
143 #ifdef DEBUG 141 #ifdef DEBUG
144 if (strlen(FLAG_stop_at) > 0 && 142 if (strlen(FLAG_stop_at) > 0 &&
145 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 143 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 __ jmp(&loop); 1157 __ jmp(&loop);
1160 1158
1161 __ bind(&no_descriptors); 1159 __ bind(&no_descriptors);
1162 __ Drop(1); 1160 __ Drop(1);
1163 __ jmp(&exit); 1161 __ jmp(&exit);
1164 1162
1165 // We got a fixed array in register r0. Iterate through that. 1163 // We got a fixed array in register r0. Iterate through that.
1166 Label non_proxy; 1164 Label non_proxy;
1167 __ bind(&fixed_array); 1165 __ bind(&fixed_array);
1168 1166
1169 Handle<Object> feedback = Handle<Object>(
1170 Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker),
1171 isolate());
1172 StoreFeedbackVectorSlot(slot, feedback);
1173 __ Move(r1, FeedbackVector()); 1167 __ Move(r1, FeedbackVector());
1174 __ mov(r2, Operand(Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker))); 1168 __ mov(r2, Operand(TypeFeedbackInfo::MegamorphicSentinel(isolate())));
1175 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot))); 1169 __ str(r2, FieldMemOperand(r1, FixedArray::OffsetOfElementAt(slot)));
1176 1170
1177 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1171 __ mov(r1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1178 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1172 __ ldr(r2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1179 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1173 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1180 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE); 1174 __ CompareObjectType(r2, r3, r3, LAST_JS_PROXY_TYPE);
1181 __ b(gt, &non_proxy); 1175 __ b(gt, &non_proxy);
1182 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1176 __ mov(r1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1183 __ bind(&non_proxy); 1177 __ bind(&non_proxy);
1184 __ Push(r1, r0); // Smi and array 1178 __ Push(r1, r0); // Smi and array
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
2704 ZoneList<Expression*>* args = expr->arguments(); 2698 ZoneList<Expression*>* args = expr->arguments();
2705 int arg_count = args->length(); 2699 int arg_count = args->length();
2706 { PreservePositionScope scope(masm()->positions_recorder()); 2700 { PreservePositionScope scope(masm()->positions_recorder());
2707 for (int i = 0; i < arg_count; i++) { 2701 for (int i = 0; i < arg_count; i++) {
2708 VisitForStackValue(args->at(i)); 2702 VisitForStackValue(args->at(i));
2709 } 2703 }
2710 } 2704 }
2711 // Record source position for debugger. 2705 // Record source position for debugger.
2712 SetSourcePosition(expr->position()); 2706 SetSourcePosition(expr->position());
2713 2707
2714 Handle<Object> uninitialized =
2715 TypeFeedbackInfo::UninitializedSentinel(isolate());
2716 StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized);
2717 __ Move(r2, FeedbackVector()); 2708 __ Move(r2, FeedbackVector());
2718 __ mov(r3, Operand(Smi::FromInt(expr->CallFeedbackSlot()))); 2709 __ mov(r3, Operand(Smi::FromInt(expr->CallFeedbackSlot())));
2719 2710
2720 // Record call targets in unoptimized code. 2711 // Record call targets in unoptimized code.
2721 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET); 2712 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
2722 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2713 __ ldr(r1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2723 __ CallStub(&stub); 2714 __ CallStub(&stub);
2724 RecordJSReturnSite(expr); 2715 RecordJSReturnSite(expr);
2725 // Restore context register. 2716 // Restore context register.
2726 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2717 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
2893 2884
2894 // Call the construct call builtin that handles allocation and 2885 // Call the construct call builtin that handles allocation and
2895 // constructor invocation. 2886 // constructor invocation.
2896 SetSourcePosition(expr->position()); 2887 SetSourcePosition(expr->position());
2897 2888
2898 // Load function and argument count into r1 and r0. 2889 // Load function and argument count into r1 and r0.
2899 __ mov(r0, Operand(arg_count)); 2890 __ mov(r0, Operand(arg_count));
2900 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize)); 2891 __ ldr(r1, MemOperand(sp, arg_count * kPointerSize));
2901 2892
2902 // Record call targets in unoptimized code. 2893 // Record call targets in unoptimized code.
2903 Handle<Object> uninitialized =
2904 TypeFeedbackInfo::UninitializedSentinel(isolate());
2905 StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized);
2906 __ Move(r2, FeedbackVector()); 2894 __ Move(r2, FeedbackVector());
2907 __ mov(r3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); 2895 __ mov(r3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
2908 2896
2909 CallConstructStub stub(RECORD_CALL_TARGET); 2897 CallConstructStub stub(RECORD_CALL_TARGET);
2910 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); 2898 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL);
2911 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2899 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2912 context()->Plug(r0); 2900 context()->Plug(r0);
2913 } 2901 }
2914 2902
2915 2903
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
4912 ASSERT(Memory::uint32_at(interrupt_address_pointer) == 4900 ASSERT(Memory::uint32_at(interrupt_address_pointer) ==
4913 reinterpret_cast<uint32_t>( 4901 reinterpret_cast<uint32_t>(
4914 isolate->builtins()->OsrAfterStackCheck()->entry())); 4902 isolate->builtins()->OsrAfterStackCheck()->entry()));
4915 return OSR_AFTER_STACK_CHECK; 4903 return OSR_AFTER_STACK_CHECK;
4916 } 4904 }
4917 4905
4918 4906
4919 } } // namespace v8::internal 4907 } } // namespace v8::internal
4920 4908
4921 #endif // V8_TARGET_ARCH_ARM 4909 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/a64/full-codegen-a64.cc ('k') | src/compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698