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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/globals.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 // 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_X87 5 #if V8_TARGET_ARCH_X87
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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 } else { 1161 } else {
1162 __ push(Immediate(info)); 1162 __ push(Immediate(info));
1163 __ CallRuntime( 1163 __ CallRuntime(
1164 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1); 1164 pretenure ? Runtime::kNewClosure_Tenured : Runtime::kNewClosure, 1);
1165 } 1165 }
1166 context()->Plug(eax); 1166 context()->Plug(eax);
1167 } 1167 }
1168 1168
1169 1169
1170 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset, 1170 void FullCodeGenerator::EmitSetHomeObject(Expression* initializer, int offset,
1171 FeedbackVectorICSlot slot) { 1171 FeedbackVectorSlot slot) {
1172 DCHECK(NeedsHomeObject(initializer)); 1172 DCHECK(NeedsHomeObject(initializer));
1173 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); 1173 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
1174 __ mov(StoreDescriptor::NameRegister(), 1174 __ mov(StoreDescriptor::NameRegister(),
1175 Immediate(isolate()->factory()->home_object_symbol())); 1175 Immediate(isolate()->factory()->home_object_symbol()));
1176 __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); 1176 __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize));
1177 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1177 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1178 CallStoreIC(); 1178 CallStoreIC();
1179 } 1179 }
1180 1180
1181 1181
1182 void FullCodeGenerator::EmitSetHomeObjectAccumulator( 1182 void FullCodeGenerator::EmitSetHomeObjectAccumulator(Expression* initializer,
1183 Expression* initializer, int offset, FeedbackVectorICSlot slot) { 1183 int offset,
1184 FeedbackVectorSlot slot) {
1184 DCHECK(NeedsHomeObject(initializer)); 1185 DCHECK(NeedsHomeObject(initializer));
1185 __ mov(StoreDescriptor::ReceiverRegister(), eax); 1186 __ mov(StoreDescriptor::ReceiverRegister(), eax);
1186 __ mov(StoreDescriptor::NameRegister(), 1187 __ mov(StoreDescriptor::NameRegister(),
1187 Immediate(isolate()->factory()->home_object_symbol())); 1188 Immediate(isolate()->factory()->home_object_symbol()));
1188 __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize)); 1189 __ mov(StoreDescriptor::ValueRegister(), Operand(esp, offset * kPointerSize));
1189 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 1190 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
1190 CallStoreIC(); 1191 CallStoreIC();
1191 } 1192 }
1192 1193
1193 1194
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 Handle<Code> code = 2402 Handle<Code> code =
2402 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); 2403 CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code();
2403 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2404 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2404 CallIC(code, expr->BinaryOperationFeedbackId()); 2405 CallIC(code, expr->BinaryOperationFeedbackId());
2405 patch_site.EmitPatchInfo(); 2406 patch_site.EmitPatchInfo();
2406 context()->Plug(eax); 2407 context()->Plug(eax);
2407 } 2408 }
2408 2409
2409 2410
2410 void FullCodeGenerator::EmitAssignment(Expression* expr, 2411 void FullCodeGenerator::EmitAssignment(Expression* expr,
2411 FeedbackVectorICSlot slot) { 2412 FeedbackVectorSlot slot) {
2412 DCHECK(expr->IsValidReferenceExpressionOrThis()); 2413 DCHECK(expr->IsValidReferenceExpressionOrThis());
2413 2414
2414 Property* prop = expr->AsProperty(); 2415 Property* prop = expr->AsProperty();
2415 LhsKind assign_type = Property::GetAssignType(prop); 2416 LhsKind assign_type = Property::GetAssignType(prop);
2416 2417
2417 switch (assign_type) { 2418 switch (assign_type) {
2418 case VARIABLE: { 2419 case VARIABLE: {
2419 Variable* var = expr->AsVariableProxy()->var(); 2420 Variable* var = expr->AsVariableProxy()->var();
2420 EffectContext context(this); 2421 EffectContext context(this);
2421 EmitVariableAssignment(var, Token::ASSIGN, slot); 2422 EmitVariableAssignment(var, Token::ASSIGN, slot);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
2492 __ mov(location, eax); 2493 __ mov(location, eax);
2493 if (var->IsContextSlot()) { 2494 if (var->IsContextSlot()) {
2494 __ mov(edx, eax); 2495 __ mov(edx, eax);
2495 int offset = Context::SlotOffset(var->index()); 2496 int offset = Context::SlotOffset(var->index());
2496 __ RecordWriteContextSlot(ecx, offset, edx, ebx, kDontSaveFPRegs); 2497 __ RecordWriteContextSlot(ecx, offset, edx, ebx, kDontSaveFPRegs);
2497 } 2498 }
2498 } 2499 }
2499 2500
2500 2501
2501 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op, 2502 void FullCodeGenerator::EmitVariableAssignment(Variable* var, Token::Value op,
2502 FeedbackVectorICSlot slot) { 2503 FeedbackVectorSlot slot) {
2503 if (var->IsUnallocated()) { 2504 if (var->IsUnallocated()) {
2504 // Global var, const, or let. 2505 // Global var, const, or let.
2505 __ mov(StoreDescriptor::NameRegister(), var->name()); 2506 __ mov(StoreDescriptor::NameRegister(), var->name());
2506 __ mov(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand()); 2507 __ mov(StoreDescriptor::ReceiverRegister(), GlobalObjectOperand());
2507 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot); 2508 if (FLAG_vector_stores) EmitLoadStoreICSlot(slot);
2508 CallStoreIC(); 2509 CallStoreIC();
2509 2510
2510 } else if (var->IsGlobalSlot()) { 2511 } else if (var->IsGlobalSlot()) {
2511 // Global var, const, or let. 2512 // Global var, const, or let.
2512 DCHECK(var->index() > 0); 2513 DCHECK(var->index() > 0);
(...skipping 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 5043
5043 void FullCodeGenerator::ClearPendingMessage() { 5044 void FullCodeGenerator::ClearPendingMessage() {
5044 DCHECK(!result_register().is(edx)); 5045 DCHECK(!result_register().is(edx));
5045 ExternalReference pending_message_obj = 5046 ExternalReference pending_message_obj =
5046 ExternalReference::address_of_pending_message_obj(isolate()); 5047 ExternalReference::address_of_pending_message_obj(isolate());
5047 __ mov(edx, Immediate(isolate()->factory()->the_hole_value())); 5048 __ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
5048 __ mov(Operand::StaticVariable(pending_message_obj), edx); 5049 __ mov(Operand::StaticVariable(pending_message_obj), edx);
5049 } 5050 }
5050 5051
5051 5052
5052 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorICSlot slot) { 5053 void FullCodeGenerator::EmitLoadStoreICSlot(FeedbackVectorSlot slot) {
5053 DCHECK(FLAG_vector_stores && !slot.IsInvalid()); 5054 DCHECK(FLAG_vector_stores && !slot.IsInvalid());
5054 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(), 5055 __ mov(VectorStoreICTrampolineDescriptor::SlotRegister(),
5055 Immediate(SmiFromSlot(slot))); 5056 Immediate(SmiFromSlot(slot)));
5056 } 5057 }
5057 5058
5058 5059
5059 #undef __ 5060 #undef __
5060 5061
5061 5062
5062 static const byte kJnsInstruction = 0x79; 5063 static const byte kJnsInstruction = 0x79;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
5133 Assembler::target_address_at(call_target_address, 5134 Assembler::target_address_at(call_target_address,
5134 unoptimized_code)); 5135 unoptimized_code));
5135 return OSR_AFTER_STACK_CHECK; 5136 return OSR_AFTER_STACK_CHECK;
5136 } 5137 }
5137 5138
5138 5139
5139 } // namespace internal 5140 } // namespace internal
5140 } // namespace v8 5141 } // namespace v8
5141 5142
5142 #endif // V8_TARGET_ARCH_X87 5143 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698