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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } else { 1209 } else {
1210 __ Push(info); 1210 __ Push(info);
1211 __ CallRuntime( 1211 __ CallRuntime(
1212 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); 1212 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1213 } 1213 }
1214 context()->Plug(r3); 1214 context()->Plug(r3);
1215 } 1215 }
1216 1216
1217 1217
1218 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, 1218 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset,
1219 FeedbackVectorICSlot slot) { 1219 FeedbackVectorSlot slot) {
1220 DCHECK(NeedsHomeObject(initializer)); 1220 DCHECK(NeedsHomeObject(initializer));
1221 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp)); 1221 __ LoadP(StoreDescriptor::ReceiverRegister(), MemOperand(sp));
1222 __ mov(StoreDescriptor::NameRegister(), 1222 __ mov(StoreDescriptor::NameRegister(),
1223 Operand(isolate()->factory()->home_object_symbol())); 1223 Operand(isolate()->factory()->home_object_symbol()));
1224 __ LoadP(StoreDescriptor::ValueRegister(), 1224 __ LoadP(StoreDescriptor::ValueRegister(),
1225 MemOperand(sp, offset * kPointerSize)); 1225 MemOperand(sp, offset * kPointerSize));
1226 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1226 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1227 CallStoreIC(); 1227 CallStoreIC();
1228 } 1228 }
1229 1229
1230 1230
1231 void FullCodeGenerator::EmitSetHomeObjectAccumulator( 1231 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer,
1232 Expression* initializer, int offset, FeedbackVectorICSlot slot) { 1232 int offset,
1233 FeedbackVectorSlot slot) {
1233 DCHECK(NeedsHomeObject(initializer)); 1234 DCHECK(NeedsHomeObject(initializer));
1234 __ Move(StoreDescriptor::ReceiverRegister(), r3); 1235 __ Move(StoreDescriptor::ReceiverRegister(), r3);
1235 __ mov(StoreDescriptor::NameRegister(), 1236 __ mov(StoreDescriptor::NameRegister(),
1236 Operand(isolate()->factory()->home_object_symbol())); 1237 Operand(isolate()->factory()->home_object_symbol()));
1237 __ LoadP(StoreDescriptor::ValueRegister(), 1238 __ LoadP(StoreDescriptor::ValueRegister(),
1238 MemOperand(sp, offset * kPointerSize)); 1239 MemOperand(sp, offset * kPointerSize));
1239 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1240 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1240 CallStoreIC(); 1241 CallStoreIC();
1241 } 1242 }
1242 1243
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 Handle<Code> code = 2509 Handle<Code> code =
2509 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2510 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2510 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2511 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2511 CallIC(code, expr->BinaryOperationFeedbackId()); 2512 CallIC(code, expr->BinaryOperationFeedbackId());
2512 patch_site.EmitPatchInfo(); 2513 patch_site.EmitPatchInfo();
2513 context()->Plug(r3); 2514 context()->Plug(r3);
2514 } 2515 }
2515 2516
2516 2517
2517 void FullCodeGenerator::EmitAssignment(Expression* expr, 2518 void FullCodeGenerator::EmitAssignment(Expression* expr,
2518 FeedbackVectorICSlot slot) { 2519 FeedbackVectorSlot slot) {
2519 DCHECK(expr->IsValidReferenceExpressionOrThis()); 2520 DCHECK(expr->IsValidReferenceExpressionOrThis());
2520 2521
2521 Property* prop = expr->AsProperty(); 2522 Property* prop = expr->AsProperty();
2522 LhsKind assign_type = Property::GetAssignType(prop); 2523 LhsKind assign_type = Property::GetAssignType(prop);
2523 2524
2524 switch (assign_type) { 2525 switch (assign_type) {
2525 case VARIABLE: { 2526 case VARIABLE: {
2526 Variable* var = expr->AsVariableProxy()->var(); 2527 Variable* var = expr->AsVariableProxy()->var();
2527 EffectContext context(this); 2528 EffectContext context(this);
2528 EmitVariableAssignment(var, Token::ASSIGN, slot); 2529 EmitVariableAssignment(var, Token::ASSIGN, slot);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2601 // RecordWrite may destroy all its register arguments. 2602 // RecordWrite may destroy all its register arguments.
2602 __ mr(r6, result_register()); 2603 __ mr(r6, result_register());
2603 int offset = Context::SlotOffset(var->index()); 2604 int offset = Context::SlotOffset(var->index());
2604 __ RecordWriteContextSlot(r4, offset, r6, r5, kLRHasBeenSaved, 2605 __ RecordWriteContextSlot(r4, offset, r6, r5, kLRHasBeenSaved,
2605 kDontSaveFPRegs); 2606 kDontSaveFPRegs);
2606 } 2607 }
2607 } 2608 }
2608 2609
2609 2610
2610 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, 2611 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
2611 FeedbackVectorICSlot slot) { 2612 FeedbackVectorSlot slot) {
2612 if (var->IsUnallocated()) { 2613 if (var->IsUnallocated()) {
2613 // Global var, const, or let. 2614 // Global var, const, or let.
2614 __ mov(StoreDescriptor::NameRegister(), Operand(var->name())); 2615 __ mov(StoreDescriptor::NameRegister(), Operand(var->name()));
2615 __ LoadP(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); 2616 __ LoadP(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
2616 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 2617 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
2617 CallStoreIC(); 2618 CallStoreIC();
2618 2619
2619 } else if (var->IsGlobalSlot()) { 2620 } else if (var->IsGlobalSlot()) {
2620 // Global var, const, or let. 2621 // Global var, const, or let.
2621 DCHECK(var->index() > 0); 2622 DCHECK(var->index() > 0);
(...skipping 2520 matching lines...) Expand 10 before | Expand all | Expand 10 after
5142 void FullCodeGenerator::ClearPendingMessage() { 5143 void FullCodeGenerator::ClearPendingMessage() {
5143 DCHECK(!result_register().is(r4)); 5144 DCHECK(!result_register().is(r4));
5144 ExternalReference pending_message_obj = 5145 ExternalReference pending_message_obj =
5145 ExternalReference::address_of_pending_message_obj(isolate()); 5146 ExternalReference::address_of_pending_message_obj(isolate());
5146 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex); 5147 __ LoadRoot(r4, Heap::kTheHoleValueRootIndex);
5147 __ mov(ip, Operand(pending_message_obj)); 5148 __ mov(ip, Operand(pending_message_obj));
5148 __ StoreP(r4, MemOperand(ip)); 5149 __ StoreP(r4, MemOperand(ip));
5149 } 5150 }
5150 5151
5151 5152
5152 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorICSlot slot) { 5153 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) {
5153 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); 5154 DCHECK(FLAG_vector_stores && !slot.IsInvalid());
5154 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), 5155 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(),
5155 Operand(SmiFromSlot(slot))); 5156 Operand(SmiFromSlot(slot)));
5156 } 5157 }
5157 5158
5158 5159
5159 #undef __ 5160 #undef __
5160 5161
5161 5162
5162 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc, 5163 void BackEdgeTable::PatchAt(Code* unoptimized_code, Address pc,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
5223 return ON_STACK_REPLACEMENT; 5224 return ON_STACK_REPLACEMENT;
5224 } 5225 }
5225 5226
5226 DCHECK(interrupt_address == 5227 DCHECK(interrupt_address ==
5227 isolate->builtins()->OsrAfterStackCheck()->entry()); 5228 isolate->builtins()->OsrAfterStackCheck()->entry());
5228 return OSR_AFTER_STACK_CHECK; 5229 return OSR_AFTER_STACK_CHECK;
5229 } 5230 }
5230 } // namespace internal 5231 } // namespace internal
5231 } // namespace v8 5232 } // namespace v8
5232 #endif // V8_TARGET_ARCH_PPC 5233 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698