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

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

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