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

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

Issue 2243783002: Call IsStringLiteral instead of IsPropertyName in VisitObjectLiteral. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/interpreter/bytecode-generator.cc » ('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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 } 1340 }
1341 switch (property->kind()) { 1341 switch (property->kind()) {
1342 case ObjectLiteral::Property::CONSTANT: 1342 case ObjectLiteral::Property::CONSTANT:
1343 UNREACHABLE(); 1343 UNREACHABLE();
1344 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1344 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1345 DCHECK(!CompileTimeValue::IsCompileTimeValue(value)); 1345 DCHECK(!CompileTimeValue::IsCompileTimeValue(value));
1346 // Fall through. 1346 // Fall through.
1347 case ObjectLiteral::Property::COMPUTED: 1347 case ObjectLiteral::Property::COMPUTED:
1348 // It is safe to use [[Put]] here because the boilerplate already 1348 // It is safe to use [[Put]] here because the boilerplate already
1349 // contains computed properties with an uninitialized value. 1349 // contains computed properties with an uninitialized value.
1350 if (key->IsPropertyName()) { 1350 if (key->IsStringLiteral()) {
1351 DCHECK(key->IsPropertyName());
1351 if (property->emit_store()) { 1352 if (property->emit_store()) {
1352 VisitForAccumulatorValue(value); 1353 VisitForAccumulatorValue(value);
1353 DCHECK(StoreDescriptor::ValueRegister().is(eax)); 1354 DCHECK(StoreDescriptor::ValueRegister().is(eax));
1354 __ mov(StoreDescriptor::NameRegister(), Immediate(key->value())); 1355 __ mov(StoreDescriptor::NameRegister(), Immediate(key->value()));
1355 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0)); 1356 __ mov(StoreDescriptor::ReceiverRegister(), Operand(esp, 0));
1356 EmitLoadStoreICSlot(property->GetSlot(0)); 1357 EmitLoadStoreICSlot(property->GetSlot(0));
1357 CallStoreIC(); 1358 CallStoreIC();
1358 PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS); 1359 PrepareForBailoutForId(key->id(), BailoutState::NO_REGISTERS);
1359 if (NeedsHomeObject(value)) { 1360 if (NeedsHomeObject(value)) {
1360 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1)); 1361 EmitSetHomeObjectAccumulator(value, 0, property->GetSlot(1));
(...skipping 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after
3663 isolate->builtins()->OnStackReplacement()->entry(), 3664 isolate->builtins()->OnStackReplacement()->entry(),
3664 Assembler::target_address_at(call_target_address, unoptimized_code)); 3665 Assembler::target_address_at(call_target_address, unoptimized_code));
3665 return ON_STACK_REPLACEMENT; 3666 return ON_STACK_REPLACEMENT;
3666 } 3667 }
3667 3668
3668 3669
3669 } // namespace internal 3670 } // namespace internal
3670 } // namespace v8 3671 } // namespace v8
3671 3672
3672 #endif // V8_TARGET_ARCH_X87 3673 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698