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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 1625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1636 __ Move(rdx, Smi::FromInt(flags)); | 1636 __ Move(rdx, Smi::FromInt(flags)); |
1637 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); | 1637 FastCloneShallowObjectStub stub(isolate(), expr->properties_count()); |
1638 __ CallStub(&stub); | 1638 __ CallStub(&stub); |
1639 } | 1639 } |
1640 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); | 1640 PrepareForBailoutForId(expr->CreateLiteralId(), TOS_REG); |
1641 | 1641 |
1642 // If result_saved is true the result is on top of the stack. If | 1642 // If result_saved is true the result is on top of the stack. If |
1643 // result_saved is false the result is in rax. | 1643 // result_saved is false the result is in rax. |
1644 bool result_saved = false; | 1644 bool result_saved = false; |
1645 | 1645 |
1646 // Mark all computed expressions that are bound to a key that | |
1647 // is shadowed by a later occurrence of the same key. For the | |
1648 // marked expressions, no store code is emitted. | |
1649 expr->CalculateEmitStore(zone()); | |
1650 | |
1651 AccessorTable accessor_table(zone()); | 1646 AccessorTable accessor_table(zone()); |
1652 int property_index = 0; | 1647 int property_index = 0; |
1653 for (; property_index < expr->properties()->length(); property_index++) { | 1648 for (; property_index < expr->properties()->length(); property_index++) { |
1654 ObjectLiteral::Property* property = expr->properties()->at(property_index); | 1649 ObjectLiteral::Property* property = expr->properties()->at(property_index); |
1655 if (property->is_computed_name()) break; | 1650 if (property->is_computed_name()) break; |
1656 if (property->IsCompileTimeValue()) continue; | 1651 if (property->IsCompileTimeValue()) continue; |
1657 | 1652 |
1658 Literal* key = property->key()->AsLiteral(); | 1653 Literal* key = property->key()->AsLiteral(); |
1659 Expression* value = property->value(); | 1654 Expression* value = property->value(); |
1660 if (!result_saved) { | 1655 if (!result_saved) { |
(...skipping 3745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5406 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5401 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5407 Assembler::target_address_at(call_target_address, | 5402 Assembler::target_address_at(call_target_address, |
5408 unoptimized_code)); | 5403 unoptimized_code)); |
5409 return OSR_AFTER_STACK_CHECK; | 5404 return OSR_AFTER_STACK_CHECK; |
5410 } | 5405 } |
5411 | 5406 |
5412 | 5407 |
5413 } } // namespace v8::internal | 5408 } } // namespace v8::internal |
5414 | 5409 |
5415 #endif // V8_TARGET_ARCH_X64 | 5410 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |