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

Side by Side Diff: src/full-codegen/mips64/full-codegen-mips64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
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 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 __ jmp(&loop); 1115 __ jmp(&loop);
1116 1116
1117 __ bind(&no_descriptors); 1117 __ bind(&no_descriptors);
1118 __ Drop(1); 1118 __ Drop(1);
1119 __ jmp(&exit); 1119 __ jmp(&exit);
1120 1120
1121 // We got a fixed array in register v0. Iterate through that. 1121 // We got a fixed array in register v0. Iterate through that.
1122 Label non_proxy; 1122 Label non_proxy;
1123 __ bind(&fixed_array); 1123 __ bind(&fixed_array);
1124 1124
1125 __ li(a1, FeedbackVector()); 1125 __ EmitLoadTypeFeedbackVector(a1);
1126 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate()))); 1126 __ li(a2, Operand(TypeFeedbackVector::MegamorphicSentinel(isolate())));
1127 int vector_index = FeedbackVector()->GetIndex(slot); 1127 int vector_index = SmiFromSlot(slot)->value();
1128 __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index))); 1128 __ sd(a2, FieldMemOperand(a1, FixedArray::OffsetOfElementAt(vector_index)));
1129 1129
1130 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check 1130 __ li(a1, Operand(Smi::FromInt(1))); // Smi indicates slow check
1131 __ ld(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object 1131 __ ld(a2, MemOperand(sp, 0 * kPointerSize)); // Get enumerated object
1132 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); 1132 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE);
1133 __ GetObjectType(a2, a3, a3); 1133 __ GetObjectType(a2, a3, a3);
1134 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE)); 1134 __ Branch(&non_proxy, gt, a3, Operand(LAST_JS_PROXY_TYPE));
1135 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy 1135 __ li(a1, Operand(Smi::FromInt(0))); // Zero indicates proxy
1136 __ bind(&non_proxy); 1136 __ bind(&non_proxy);
1137 __ Push(a1, v0); // Smi and array 1137 __ Push(a1, v0); // Smi and array
(...skipping 2034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 3172
3173 // Call the construct call builtin that handles allocation and 3173 // Call the construct call builtin that handles allocation and
3174 // constructor invocation. 3174 // constructor invocation.
3175 SetConstructCallPosition(expr); 3175 SetConstructCallPosition(expr);
3176 3176
3177 // Load function and argument count into a1 and a0. 3177 // Load function and argument count into a1 and a0.
3178 __ li(a0, Operand(arg_count)); 3178 __ li(a0, Operand(arg_count));
3179 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); 3179 __ ld(a1, MemOperand(sp, arg_count * kPointerSize));
3180 3180
3181 // Record call targets in unoptimized code. 3181 // Record call targets in unoptimized code.
3182 __ li(a2, FeedbackVector()); 3182 __ EmitLoadTypeFeedbackVector(a2);
3183 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); 3183 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot())));
3184 3184
3185 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); 3185 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET);
3186 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3186 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3187 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 3187 PrepareForBailoutForId(expr->ReturnId(), TOS_REG);
3188 // Restore context register. 3188 // Restore context register.
3189 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3189 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3190 context()->Plug(v0); 3190 context()->Plug(v0);
3191 } 3191 }
3192 3192
(...skipping 19 matching lines...) Expand all
3212 3212
3213 // Load original constructor into a4. 3213 // Load original constructor into a4.
3214 VisitForAccumulatorValue(super_call_ref->new_target_var()); 3214 VisitForAccumulatorValue(super_call_ref->new_target_var());
3215 __ mov(a4, result_register()); 3215 __ mov(a4, result_register());
3216 3216
3217 // Load function and argument count into a1 and a0. 3217 // Load function and argument count into a1 and a0.
3218 __ li(a0, Operand(arg_count)); 3218 __ li(a0, Operand(arg_count));
3219 __ ld(a1, MemOperand(sp, arg_count * kPointerSize)); 3219 __ ld(a1, MemOperand(sp, arg_count * kPointerSize));
3220 3220
3221 // Record call targets in unoptimized code. 3221 // Record call targets in unoptimized code.
3222 __ li(a2, FeedbackVector()); 3222 __ EmitLoadTypeFeedbackVector(a2);
3223 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot()))); 3223 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackSlot())));
3224 3224
3225 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET); 3225 CallConstructStub stub(isolate(), SUPER_CALL_RECORD_TARGET);
3226 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); 3226 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL);
3227 3227
3228 RecordJSReturnSite(expr); 3228 RecordJSReturnSite(expr);
3229 3229
3230 // Restore context register. 3230 // Restore context register.
3231 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); 3231 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
3232 context()->Plug(v0); 3232 context()->Plug(v0);
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
5230 reinterpret_cast<uint64_t>( 5230 reinterpret_cast<uint64_t>(
5231 isolate->builtins()->OsrAfterStackCheck()->entry())); 5231 isolate->builtins()->OsrAfterStackCheck()->entry()));
5232 return OSR_AFTER_STACK_CHECK; 5232 return OSR_AFTER_STACK_CHECK;
5233 } 5233 }
5234 5234
5235 5235
5236 } // namespace internal 5236 } // namespace internal
5237 } // namespace v8 5237 } // namespace v8
5238 5238
5239 #endif // V8_TARGET_ARCH_MIPS64 5239 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698