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

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

Issue 1370303004: Distinction between FeedbackVectorICSlot and FeedbackVectorSlot eliminated. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed release builds 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 1226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 } else { 1237 } else {
1238 __ Push(info); 1238 __ Push(info);
1239 __ CallRuntime( 1239 __ CallRuntime(
1240 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); 1240 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1241 } 1241 }
1242 context()->Plug(v0); 1242 context()->Plug(v0);
1243 } 1243 }
1244 1244
1245 1245
1246 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, 1246 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset,
1247 FeedbackVectorICSlot slot) { 1247 FeedbackVectorSlot slot) {
1248 DCHECK(NeedsHomeObject(initializer)); 1248 DCHECK(NeedsHomeObject(initializer));
1249 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); 1249 __ lw(StoreDescriptor::ReceiverRegister(), MemOperand(sp));
1250 __ li(StoreDescriptor::NameRegister(), 1250 __ li(StoreDescriptor::NameRegister(),
1251 Operand(isolate()->factory()->home_object_symbol())); 1251 Operand(isolate()->factory()->home_object_symbol()));
1252 __ lw(StoreDescriptor::ValueRegister(), 1252 __ lw(StoreDescriptor::ValueRegister(),
1253 MemOperand(sp, offset * kPointerSize)); 1253 MemOperand(sp, offset * kPointerSize));
1254 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1254 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1255 CallStoreIC(); 1255 CallStoreIC();
1256 } 1256 }
1257 1257
1258 1258
1259 void FullCodeGenerator::EmitSetHomeObjectAccumulator( 1259 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer,
1260 Expression* initializer, int offset, FeedbackVectorICSlot slot) { 1260 int offset,
1261 FeedbackVectorSlot slot) {
1261 DCHECK(NeedsHomeObject(initializer)); 1262 DCHECK(NeedsHomeObject(initializer));
1262 __ Move(StoreDescriptor::ReceiverRegister(), v0); 1263 __ Move(StoreDescriptor::ReceiverRegister(), v0);
1263 __ li(StoreDescriptor::NameRegister(), 1264 __ li(StoreDescriptor::NameRegister(),
1264 Operand(isolate()->factory()->home_object_symbol())); 1265 Operand(isolate()->factory()->home_object_symbol()));
1265 __ lw(StoreDescriptor::ValueRegister(), 1266 __ lw(StoreDescriptor::ValueRegister(),
1266 MemOperand(sp, offset * kPointerSize)); 1267 MemOperand(sp, offset * kPointerSize));
1267 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1268 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1268 CallStoreIC(); 1269 CallStoreIC();
1269 } 1270 }
1270 1271
(...skipping 1223 matching lines...) Expand 10 before | Expand all | Expand 10 after
2494 Handle<Code> code = 2495 Handle<Code> code =
2495 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2496 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2496 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2497 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2497 CallIC(code, expr->BinaryOperationFeedbackId()); 2498 CallIC(code, expr->BinaryOperationFeedbackId());
2498 patch_site.EmitPatchInfo(); 2499 patch_site.EmitPatchInfo();
2499 context()->Plug(v0); 2500 context()->Plug(v0);
2500 } 2501 }
2501 2502
2502 2503
2503 void FullCodeGenerator::EmitAssignment(Expression* expr, 2504 void FullCodeGenerator::EmitAssignment(Expression* expr,
2504 FeedbackVectorICSlot slot) { 2505 FeedbackVectorSlot slot) {
2505 DCHECK(expr->IsValidReferenceExpressionOrThis()); 2506 DCHECK(expr->IsValidReferenceExpressionOrThis());
2506 2507
2507 Property* prop = expr->AsProperty(); 2508 Property* prop = expr->AsProperty();
2508 LhsKind assign_type = Property::GetAssignType(prop); 2509 LhsKind assign_type = Property::GetAssignType(prop);
2509 2510
2510 switch (assign_type) { 2511 switch (assign_type) {
2511 case VARIABLE: { 2512 case VARIABLE: {
2512 Variable* var = expr->AsVariableProxy()->var(); 2513 Variable* var = expr->AsVariableProxy()->var();
2513 EffectContext context(this); 2514 EffectContext context(this);
2514 EmitVariableAssignment(var, Token::ASSIGN, slot); 2515 EmitVariableAssignment(var, Token::ASSIGN, slot);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 // RecordWrite may destroy all its register arguments. 2588 // RecordWrite may destroy all its register arguments.
2588 __ Move(a3, result_register()); 2589 __ Move(a3, result_register());
2589 int offset = Context::SlotOffset(var->index()); 2590 int offset = Context::SlotOffset(var->index());
2590 __ RecordWriteContextSlot( 2591 __ RecordWriteContextSlot(
2591 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs); 2592 a1, offset, a3, a2, kRAHasBeenSaved, kDontSaveFPRegs);
2592 } 2593 }
2593 } 2594 }
2594 2595
2595 2596
2596 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, 2597 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
2597 FeedbackVectorICSlot slot) { 2598 FeedbackVectorSlot slot) {
2598 if (var->IsUnallocated()) { 2599 if (var->IsUnallocated()) {
2599 // Global var, const, or let. 2600 // Global var, const, or let.
2600 __ mov(StoreDescriptor::ValueRegister(), result_register()); 2601 __ mov(StoreDescriptor::ValueRegister(), result_register());
2601 __ li(StoreDescriptor::NameRegister(), Operand(var->name())); 2602 __ li(StoreDescriptor::NameRegister(), Operand(var->name()));
2602 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); 2603 __ lw(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
2603 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 2604 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
2604 CallStoreIC(); 2605 CallStoreIC();
2605 2606
2606 } else if (var->IsGlobalSlot()) { 2607 } else if (var->IsGlobalSlot()) {
2607 // Global var, const, or let. 2608 // Global var, const, or let.
(...skipping 2541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5149 void FullCodeGenerator::ClearPendingMessage() { 5150 void FullCodeGenerator::ClearPendingMessage() {
5150 DCHECK(!result_register().is(a1)); 5151 DCHECK(!result_register().is(a1));
5151 ExternalReference pending_message_obj = 5152 ExternalReference pending_message_obj =
5152 ExternalReference::address_of_pending_message_obj(isolate()); 5153 ExternalReference::address_of_pending_message_obj(isolate());
5153 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex); 5154 __ LoadRoot(a1, Heap::kTheHoleValueRootIndex);
5154 __ li(at, Operand(pending_message_obj)); 5155 __ li(at, Operand(pending_message_obj));
5155 __ sw(a1, MemOperand(at)); 5156 __ sw(a1, MemOperand(at));
5156 } 5157 }
5157 5158
5158 5159
5159 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorICSlot slot) { 5160 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) {
5160 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); 5161 DCHECK(FLAG_vector_stores && !slot.IsInvalid());
5161 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(), 5162 __ li(VectorStoreICTrampolineDescriptor::SlotRegister(),
5162 Operand(SmiFromSlot(slot))); 5163 Operand(SmiFromSlot(slot)));
5163 } 5164 }
5164 5165
5165 5166
5166 #undef __ 5167 #undef __
5167 5168
5168 5169
5169 void BackEdgeTable::PatchAt(Code* unoptimized_code, 5170 void BackEdgeTable::PatchAt(Code* unoptimized_code,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
5239 reinterpret_cast<uint32_t>( 5240 reinterpret_cast<uint32_t>(
5240 isolate->builtins()->OsrAfterStackCheck()->entry())); 5241 isolate->builtins()->OsrAfterStackCheck()->entry()));
5241 return OSR_AFTER_STACK_CHECK; 5242 return OSR_AFTER_STACK_CHECK;
5242 } 5243 }
5243 5244
5244 5245
5245 } // namespace internal 5246 } // namespace internal
5246 } // namespace v8 5247 } // namespace v8
5247 5248
5248 #endif // V8_TARGET_ARCH_MIPS 5249 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698