| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
| 6 | 6 |
| 7 #include "src/compiler.h" | 7 #include "src/compiler.h" |
| 8 #include "src/compiler/ast-loop-assignment-analyzer.h" | 8 #include "src/compiler/ast-loop-assignment-analyzer.h" |
| 9 #include "src/compiler/control-builders.h" | 9 #include "src/compiler/control-builders.h" |
| 10 #include "src/compiler/js-type-feedback.h" | 10 #include "src/compiler/js-type-feedback.h" |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1737 environment()->Push(literal); // Duplicate receiver. | 1737 environment()->Push(literal); // Duplicate receiver. |
| 1738 VisitForValue(property->key()); | 1738 VisitForValue(property->key()); |
| 1739 VisitForValue(property->value()); | 1739 VisitForValue(property->value()); |
| 1740 Node* value = environment()->Pop(); | 1740 Node* value = environment()->Pop(); |
| 1741 Node* key = environment()->Pop(); | 1741 Node* key = environment()->Pop(); |
| 1742 Node* receiver = environment()->Pop(); | 1742 Node* receiver = environment()->Pop(); |
| 1743 if (property->emit_store()) { | 1743 if (property->emit_store()) { |
| 1744 Node* language = jsgraph()->Constant(SLOPPY); | 1744 Node* language = jsgraph()->Constant(SLOPPY); |
| 1745 const Operator* op = | 1745 const Operator* op = |
| 1746 javascript()->CallRuntime(Runtime::kSetProperty, 4); | 1746 javascript()->CallRuntime(Runtime::kSetProperty, 4); |
| 1747 NewNode(op, receiver, key, value, language); | 1747 Node* set_property = NewNode(op, receiver, key, value, language); |
| 1748 // SetProperty should not lazy deopt on an object literal. |
| 1749 PrepareFrameState(set_property, BailoutId::None()); |
| 1748 BuildSetHomeObject(value, receiver, property->value()); | 1750 BuildSetHomeObject(value, receiver, property->value()); |
| 1749 } | 1751 } |
| 1750 break; | 1752 break; |
| 1751 } | 1753 } |
| 1752 case ObjectLiteral::Property::PROTOTYPE: { | 1754 case ObjectLiteral::Property::PROTOTYPE: { |
| 1753 environment()->Push(literal); // Duplicate receiver. | 1755 environment()->Push(literal); // Duplicate receiver. |
| 1754 VisitForValue(property->value()); | 1756 VisitForValue(property->value()); |
| 1755 Node* value = environment()->Pop(); | 1757 Node* value = environment()->Pop(); |
| 1756 Node* receiver = environment()->Pop(); | 1758 Node* receiver = environment()->Pop(); |
| 1757 DCHECK(property->emit_store()); | 1759 DCHECK(property->emit_store()); |
| (...skipping 2280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4038 // Phi does not exist yet, introduce one. | 4040 // Phi does not exist yet, introduce one. |
| 4039 value = NewPhi(inputs, value, control); | 4041 value = NewPhi(inputs, value, control); |
| 4040 value->ReplaceInput(inputs - 1, other); | 4042 value->ReplaceInput(inputs - 1, other); |
| 4041 } | 4043 } |
| 4042 return value; | 4044 return value; |
| 4043 } | 4045 } |
| 4044 | 4046 |
| 4045 } // namespace compiler | 4047 } // namespace compiler |
| 4046 } // namespace internal | 4048 } // namespace internal |
| 4047 } // namespace v8 | 4049 } // namespace v8 |
| OLD | NEW |