OLD | NEW |
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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 1593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1604 __ mov(edx, Immediate(Smi::FromInt(flags))); | 1604 __ mov(edx, Immediate(Smi::FromInt(flags))); |
1605 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1605 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1606 __ CallStub(&stub); | 1606 __ CallStub(&stub); |
1607 } | 1607 } |
1608 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1608 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1609 | 1609 |
1610 // If result_saved is true the result is on top of the stack. If | 1610 // If result_saved is true the result is on top of the stack. If |
1611 // result_saved is false the result is in eax. | 1611 // result_saved is false the result is in eax. |
1612 bool result_saved = false; | 1612 bool result_saved = false; |
1613 | 1613 |
1614 // Mark all computed expressions that are bound to a key that | |
1615 // is shadowed by a later occurrence of the same key. For the | |
1616 // marked expressions, no store code is emitted. | |
1617 expr->CalculateEmitStore(zone()); | |
1618 | |
1619 AccessorTable accessor_table(zone()); | 1614 AccessorTable accessor_table(zone()); |
1620 int property_index = 0; | 1615 int property_index = 0; |
1621 for (; property_index < expr->properties()->length(); property_index++) { | 1616 for (; property_index < expr->properties()->length(); property_index++) { |
1622 ObjectLiteral::Property* property = expr->properties()->at(property_index); | 1617 ObjectLiteral::Property* property = expr->properties()->at(property_index); |
1623 if (property->is_computed_name()) break; | 1618 if (property->is_computed_name()) break; |
1624 if (property->IsCompileTimeValue()) continue; | 1619 if (property->IsCompileTimeValue()) continue; |
1625 | 1620 |
1626 Literal* key = property->key()->AsLiteral(); | 1621 Literal* key = property->key()->AsLiteral(); |
1627 Expression* value = property->value(); | 1622 Expression* value = property->value(); |
1628 if (!result_saved) { | 1623 if (!result_saved) { |
(...skipping 3759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5388 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5383 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5389 Assembler::target_address_at(call_target_address, | 5384 Assembler::target_address_at(call_target_address, |
5390 unoptimized_code)); | 5385 unoptimized_code)); |
5391 return OSR_AFTER_STACK_CHECK; | 5386 return OSR_AFTER_STACK_CHECK; |
5392 } | 5387 } |
5393 | 5388 |
5394 | 5389 |
5395 } } // namespace v8::internal | 5390 } } // namespace v8::internal |
5396 | 5391 |
5397 #endif // V8_TARGET_ARCH_IA32 | 5392 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |