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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/objects.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // o sp: stack pointer 132 // o sp: stack pointer
133 // o ra: return address 133 // o ra: return address
134 // 134 //
135 // The function builds a JS frame. Please see JavaScriptFrameConstants in 135 // The function builds a JS frame. Please see JavaScriptFrameConstants in
136 // frames-mips.h for its layout. 136 // frames-mips.h for its layout.
137 void FullCodeGenerator::Generate() { 137 void FullCodeGenerator::Generate() {
138 CompilationInfo* info = info_; 138 CompilationInfo* info = info_;
139 handler_table_ = 139 handler_table_ =
140 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED); 140 isolate()->factory()->NewFixedArray(function()->handler_count(), TENURED);
141 141
142 InitializeFeedbackVector();
143
142 profiling_counter_ = isolate()->factory()->NewCell( 144 profiling_counter_ = isolate()->factory()->NewCell(
143 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate())); 145 Handle<Smi>(Smi::FromInt(FLAG_interrupt_budget), isolate()));
144 SetFunctionPosition(function()); 146 SetFunctionPosition(function());
145 Comment cmnt(masm_, "[ function compiled by full code generator"); 147 Comment cmnt(masm_, "[ function compiled by full code generator");
146 148
147 ProfileEntryHookStub::MaybeCallEntryHook(masm_); 149 ProfileEntryHookStub::MaybeCallEntryHook(masm_);
148 150
149 #ifdef DEBUG 151 #ifdef DEBUG
150 if (strlen(FLAG_stop_at) > 0 && 152 if (strlen(FLAG_stop_at) > 0 &&
151 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) { 153 info->function()->name()->IsUtf8EqualTo(CStrVector(FLAG_stop_at))) {
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 __ jmp(&loop); 1169 __ jmp(&loop);
1168 1170
1169 __ bind(&no_descriptors); 1171 __ bind(&no_descriptors);
1170 __ Drop(1); 1172 __ Drop(1);
1171 __ jmp(&exit); 1173 __ jmp(&exit);
1172 1174
1173 // We got a fixed array in register v0. Iterate through that. 1175 // We got a fixed array in register v0. Iterate through that.
1174 Label non_proxy; 1176 Label non_proxy;
1175 __ bind(&fixed_array); 1177 __ bind(&fixed_array);
1176 1178
1179 Handle<Object> feedback = Handle<Object>(
1180 Smi::FromInt(TypeFeedbackInfo::kForInFastCaseMarker),
1181 isolate());
1182 StoreFeedbackVectorSlot(slot, feedback);
1177 __ li(a1, FeedbackVector()); 1183 __ li(a1, FeedbackVector());
1178 __ li(a2, Operand(TypeFeedbackInfo::MegamorphicSentinel(isolate()))); 1184 __ li(a2, Operand(Smi::FromInt(TypeFeedbackInfo::kForInSlowCaseMarker)));
1179 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot))); 1185 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(slot)));
1180 1186
1181 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1187 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1182 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1188 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1183 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1189 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1184 __ GetObjectType(a2, a3, a3); 1190 __ GetObjectType(a2, a3, a3);
1185 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); 1191 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE));
1186 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1192 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1187 __ bind(&non_proxy); 1193 __ bind(&non_proxy);
1188 __ Push(a1, v0); // Smi and array 1194 __ Push(a1, v0); // Smi and array
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 ZoneList<Expression*>* args = expr->arguments(); 2728 ZoneList<Expression*>* args = expr->arguments();
2723 int arg_count = args->length(); 2729 int arg_count = args->length();
2724 { PreservePositionScope scope(masm()->positions_recorder()); 2730 { PreservePositionScope scope(masm()->positions_recorder());
2725 for (int i = 0; i < arg_count; i++) { 2731 for (int i = 0; i < arg_count; i++) {
2726 VisitForStackValue(args->at(i)); 2732 VisitForStackValue(args->at(i));
2727 } 2733 }
2728 } 2734 }
2729 // Record source position for debugger. 2735 // Record source position for debugger.
2730 SetSourcePosition(expr->position()); 2736 SetSourcePosition(expr->position());
2731 2737
2738 Handle<Object> uninitialized =
2739 TypeFeedbackInfo::UninitializedSentinel(isolate());
2740 StoreFeedbackVectorSlot(expr->CallFeedbackSlot(), uninitialized);
2732 __ li(a2, FeedbackVector()); 2741 __ li(a2, FeedbackVector());
2733 __ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot()))); 2742 __ li(a3, Operand(Smi::FromInt(expr->CallFeedbackSlot())));
2734 2743
2735 // Record call targets in unoptimized code. 2744 // Record call targets in unoptimized code.
2736 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET); 2745 CallFunctionStub stub(arg_count, RECORD_CALL_TARGET);
2737 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); 2746 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize));
2738 __ CallStub(&stub); 2747 __ CallStub(&stub);
2739 RecordJSReturnSite(expr); 2748 RecordJSReturnSite(expr);
2740 // Restore context register. 2749 // Restore context register.
2741 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 2750 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
2906 2915
2907 // Call the construct call builtin that handles allocation and 2916 // Call the construct call builtin that handles allocation and
2908 // constructor invocation. 2917 // constructor invocation.
2909 SetSourcePosition(expr->position()); 2918 SetSourcePosition(expr->position());
2910 2919
2911 // Load function and argument count into a1 and a0. 2920 // Load function and argument count into a1 and a0.
2912 __ li(a0, Operand(arg_count)); 2921 __ li(a0, Operand(arg_count));
2913 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); 2922 __ lw(a1, MemOperand(sp, arg_count * kPointerSize));
2914 2923
2915 // Record call targets in unoptimized code. 2924 // Record call targets in unoptimized code.
2925 Handle<Object> uninitialized =
2926 TypeFeedbackInfo::UninitializedSentinel(isolate());
2927 StoreFeedbackVectorSlot(expr->CallNewFeedbackSlot(), uninitialized);
2916 __ li(a2, FeedbackVector()); 2928 __ li(a2, FeedbackVector());
2917 __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot()))); 2929 __ li(a3, Operand(Smi::FromInt(expr->CallNewFeedbackSlot())));
2918 2930
2919 CallConstructStub stub(RECORD_CALL_TARGET); 2931 CallConstructStub stub(RECORD_CALL_TARGET);
2920 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); 2932 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL);
2921 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2933 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
2922 context()->Plug(v0); 2934 context()->Plug(v0);
2923 } 2935 }
2924 2936
2925 2937
(...skipping 2024 matching lines...) Expand 10 before | Expand all | Expand 10 after
4950 Assembler::target_address_at(pc_immediate_load_address)) == 4962 Assembler::target_address_at(pc_immediate_load_address)) ==
4951 reinterpret_cast<uint32_t>( 4963 reinterpret_cast<uint32_t>(
4952 isolate->builtins()->OsrAfterStackCheck()->entry())); 4964 isolate->builtins()->OsrAfterStackCheck()->entry()));
4953 return OSR_AFTER_STACK_CHECK; 4965 return OSR_AFTER_STACK_CHECK;
4954 } 4966 }
4955 4967
4956 4968
4957 } } // namespace v8::internal 4969 } } // namespace v8::internal
4958 4970
4959 #endif // V8_TARGET_ARCH_MIPS 4971 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698