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

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

Issue 1555023002: [turbofan] Add deopt point for InternalSetPrototype in VisitObjectLiteral. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1482 __ CallRuntime(Runtime::kSetProperty); 1482 __ CallRuntime(Runtime::kSetProperty);
1483 } else { 1483 } else {
1484 __ Drop(3); 1484 __ Drop(3);
1485 } 1485 }
1486 break; 1486 break;
1487 case ObjectLiteral::Property::PROTOTYPE: 1487 case ObjectLiteral::Property::PROTOTYPE:
1488 __ push(Operand(esp, 0)); // Duplicate receiver. 1488 __ push(Operand(esp, 0)); // Duplicate receiver.
1489 VisitForStackValue(value); 1489 VisitForStackValue(value);
1490 DCHECK(property->emit_store()); 1490 DCHECK(property->emit_store());
1491 __ CallRuntime(Runtime::kInternalSetPrototype); 1491 __ CallRuntime(Runtime::kInternalSetPrototype);
1492 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1493 NO_REGISTERS);
1492 break; 1494 break;
1493 case ObjectLiteral::Property::GETTER: 1495 case ObjectLiteral::Property::GETTER:
1494 if (property->emit_store()) { 1496 if (property->emit_store()) {
1495 accessor_table.lookup(key)->second->getter = property; 1497 accessor_table.lookup(key)->second->getter = property;
1496 } 1498 }
1497 break; 1499 break;
1498 case ObjectLiteral::Property::SETTER: 1500 case ObjectLiteral::Property::SETTER:
1499 if (property->emit_store()) { 1501 if (property->emit_store()) {
1500 accessor_table.lookup(key)->second->setter = property; 1502 accessor_table.lookup(key)->second->setter = property;
1501 } 1503 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 result_saved = true; 1538 result_saved = true;
1537 } 1539 }
1538 1540
1539 __ push(Operand(esp, 0)); // Duplicate receiver. 1541 __ push(Operand(esp, 0)); // Duplicate receiver.
1540 1542
1541 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) { 1543 if (property->kind() == ObjectLiteral::Property::PROTOTYPE) {
1542 DCHECK(!property->is_computed_name()); 1544 DCHECK(!property->is_computed_name());
1543 VisitForStackValue(value); 1545 VisitForStackValue(value);
1544 DCHECK(property->emit_store()); 1546 DCHECK(property->emit_store());
1545 __ CallRuntime(Runtime::kInternalSetPrototype); 1547 __ CallRuntime(Runtime::kInternalSetPrototype);
1548 PrepareForBailoutForId(expr->GetIdForPropertySet(property_index),
1549 NO_REGISTERS);
1546 } else { 1550 } else {
1547 EmitPropertyKey(property, expr->GetIdForProperty(property_index)); 1551 EmitPropertyKey(property, expr->GetIdForPropertyName(property_index));
1548 VisitForStackValue(value); 1552 VisitForStackValue(value);
1549 if (NeedsHomeObject(value)) { 1553 if (NeedsHomeObject(value)) {
1550 EmitSetHomeObject(value, 2, property->GetSlot()); 1554 EmitSetHomeObject(value, 2, property->GetSlot());
1551 } 1555 }
1552 1556
1553 switch (property->kind()) { 1557 switch (property->kind()) {
1554 case ObjectLiteral::Property::CONSTANT: 1558 case ObjectLiteral::Property::CONSTANT:
1555 case ObjectLiteral::Property::MATERIALIZED_LITERAL: 1559 case ObjectLiteral::Property::MATERIALIZED_LITERAL:
1556 case ObjectLiteral::Property::COMPUTED: 1560 case ObjectLiteral::Property::COMPUTED:
1557 if (property->emit_store()) { 1561 if (property->emit_store()) {
(...skipping 3221 matching lines...) Expand 10 before | Expand all | Expand 10 after
4779 Assembler::target_address_at(call_target_address, 4783 Assembler::target_address_at(call_target_address,
4780 unoptimized_code)); 4784 unoptimized_code));
4781 return OSR_AFTER_STACK_CHECK; 4785 return OSR_AFTER_STACK_CHECK;
4782 } 4786 }
4783 4787
4784 4788
4785 } // namespace internal 4789 } // namespace internal
4786 } // namespace v8 4790 } // namespace v8
4787 4791
4788 #endif // V8_TARGET_ARCH_IA32 4792 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698