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_X87 | 7 #if V8_TARGET_ARCH_X87 |
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 1586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1597 __ mov(edx, Immediate(Smi::FromInt(flags))); | 1597 __ mov(edx, Immediate(Smi::FromInt(flags))); |
1598 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1598 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1599 __ CallStub(&stub); | 1599 __ CallStub(&stub); |
1600 } | 1600 } |
1601 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1601 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1602 | 1602 |
1603 // If result_saved is true the result is on top of the stack. If | 1603 // If result_saved is true the result is on top of the stack. If |
1604 // result_saved is false the result is in eax. | 1604 // result_saved is false the result is in eax. |
1605 bool result_saved = false; | 1605 bool result_saved = false; |
1606 | 1606 |
1607 // Mark all computed expressions that are bound to a key that | |
1608 // is shadowed by a later occurrence of the same key. For the | |
1609 // marked expressions, no store code is emitted. | |
1610 expr->CalculateEmitStore(zone()); | |
1611 | |
1612 AccessorTable accessor_table(zone()); | 1607 AccessorTable accessor_table(zone()); |
1613 int property_index = 0; | 1608 int property_index = 0; |
1614 for (; property_index < expr->properties()->length(); property_index++) { | 1609 for (; property_index < expr->properties()->length(); property_index++) { |
1615 ObjectLiteral::Property* property = expr->properties()->at(property_index); | 1610 ObjectLiteral::Property* property = expr->properties()->at(property_index); |
1616 if (property->is_computed_name()) break; | 1611 if (property->is_computed_name()) break; |
1617 if (property->IsCompileTimeValue()) continue; | 1612 if (property->IsCompileTimeValue()) continue; |
1618 | 1613 |
1619 Literal* key = property->key()->AsLiteral(); | 1614 Literal* key = property->key()->AsLiteral(); |
1620 Expression* value = property->value(); | 1615 Expression* value = property->value(); |
1621 if (!result_saved) { | 1616 if (!result_saved) { |
(...skipping 3756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5378 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5373 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5379 Assembler::target_address_at(call_target_address, | 5374 Assembler::target_address_at(call_target_address, |
5380 unoptimized_code)); | 5375 unoptimized_code)); |
5381 return OSR_AFTER_STACK_CHECK; | 5376 return OSR_AFTER_STACK_CHECK; |
5382 } | 5377 } |
5383 | 5378 |
5384 | 5379 |
5385 } } // namespace v8::internal | 5380 } } // namespace v8::internal |
5386 | 5381 |
5387 #endif // V8_TARGET_ARCH_X87 | 5382 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |