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

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

Issue 1364373003: Full code shouldn't embed the type feedback vector. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 5 years, 2 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 __ jmp(&loop); 1117 __ jmp(&loop);
1118 1118
1119 __ bind(&no_descriptors); 1119 __ bind(&no_descriptors);
1120 __ Drop(1); 1120 __ Drop(1);
1121 __ jmp(&exit); 1121 __ jmp(&exit);
1122 1122
1123 // We got a fixed array in register v0. Iterate through that. 1123 // We got a fixed array in register v0. Iterate through that.
1124 Label non_proxy; 1124 Label non_proxy;
1125 __ bind(&fixed_array); 1125 __ bind(&fixed_array);
1126 1126
1127 __ li(a1, FeedbackVector()); 1127 __ EmitLoadTypeFeedbackVector(a1);
1128 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1128 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1129 int vector_index = FeedbackVector()->GetIndex(slot); 1129 int vector_index = SmiFromSlot(slot)->value();
1130 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); 1130 __ sw(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index)));
1131 1131
1132 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1132 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1133 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1133 __ lw(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1134 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1134 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1135 __ GetObjectType(a2, a3, a3); 1135 __ GetObjectType(a2, a3, a3);
1136 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); 1136 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE));
1137 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1137 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1138 __ bind(&non_proxy); 1138 __ bind(&non_proxy);
1139 __ Push(a1, v0); // Smi and array 1139 __ Push(a1, v0); // Smi and array
(...skipping 2030 matching lines...) Expand 10 before | Expand all | Expand 10 after
3170 3170
3171 // Call the construct call builtin that handles allocation and 3171 // Call the construct call builtin that handles allocation and
3172 // constructor invocation. 3172 // constructor invocation.
3173 SetConstructCallPosition(expr); 3173 SetConstructCallPosition(expr);
3174 3174
3175 // Load function and argument count into a1 and a0. 3175 // Load function and argument count into a1 and a0.
3176 __ li(a0, Operand(arg_count)); 3176 __ li(a0, Operand(arg_count));
3177 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); 3177 __ lw(a1, MemOperand(sp, arg_count * kPointerSize));
3178 3178
3179 // Record call targets in unoptimized code. 3179 // Record call targets in unoptimized code.
3180 __ li(a2, FeedbackVector()); 3180 __ EmitLoadTypeFeedbackVector(a2);
3181 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3181 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
3182 3182
3183 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3183 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3184 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3184 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3185 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3185 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3186 // Restore context register. 3186 // Restore context register.
3187 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3187 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3188 context()->Plug(v0); 3188 context()->Plug(v0);
3189 } 3189 }
3190 3190
(...skipping 19 matching lines...) Expand all
3210 3210
3211 // Load original constructor into t0. 3211 // Load original constructor into t0.
3212 VisitForAccumulatorValue(super_call_ref->new_target_var()); 3212 VisitForAccumulatorValue(super_call_ref->new_target_var());
3213 __ mov(t0, result_register()); 3213 __ mov(t0, result_register());
3214 3214
3215 // Load function and argument count into a1 and a0. 3215 // Load function and argument count into a1 and a0.
3216 __ li(a0, Operand(arg_count)); 3216 __ li(a0, Operand(arg_count));
3217 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); 3217 __ lw(a1, MemOperand(sp, arg_count * kPointerSize));
3218 3218
3219 // Record call targets in unoptimized code. 3219 // Record call targets in unoptimized code.
3220 __ li(a2, FeedbackVector()); 3220 __ EmitLoadTypeFeedbackVector(a2);
3221 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); 3221 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot())));
3222 3222
3223 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3223 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3224 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3224 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3225 3225
3226 RecordJSReturnSite(expr); 3226 RecordJSReturnSite(expr);
3227 3227
3228 // Restore context register. 3228 // Restore context register.
3229 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3229 __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3230 context()->Plug(v0); 3230 context()->Plug(v0);
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after
5224 reinterpret_cast<uint32_t>( 5224 reinterpret_cast<uint32_t>(
5225 isolate->builtins()->OsrAfterStackCheck()->entry())); 5225 isolate->builtins()->OsrAfterStackCheck()->entry()));
5226 return OSR_AFTER_STACK_CHECK; 5226 return OSR_AFTER_STACK_CHECK;
5227 } 5227 }
5228 5228
5229 5229
5230 } // namespace internal 5230 } // namespace internal
5231 } // namespace v8 5231 } // namespace v8
5232 5232
5233 #endif // V8_TARGET_ARCH_MIPS 5233 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698