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

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