| 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/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1513 Node* receiver = environment()->Pop(); | 1513 Node* receiver = environment()->Pop(); |
| 1514 DCHECK(property->emit_store()); | 1514 DCHECK(property->emit_store()); |
| 1515 const Operator* op = | 1515 const Operator* op = |
| 1516 javascript()->CallRuntime(Runtime::kInternalSetPrototype, 2); | 1516 javascript()->CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1517 Node* set_prototype = NewNode(op, receiver, value); | 1517 Node* set_prototype = NewNode(op, receiver, value); |
| 1518 // SetPrototype should not lazy deopt on an object literal. | 1518 // SetPrototype should not lazy deopt on an object literal. |
| 1519 PrepareFrameState(set_prototype, BailoutId::None()); | 1519 PrepareFrameState(set_prototype, BailoutId::None()); |
| 1520 break; | 1520 break; |
| 1521 } | 1521 } |
| 1522 case ObjectLiteral::Property::GETTER: | 1522 case ObjectLiteral::Property::GETTER: |
| 1523 accessor_table.lookup(key)->second->getter = property->value(); | 1523 if (property->emit_store()) { |
| 1524 accessor_table.lookup(key)->second->getter = property->value(); |
| 1525 } |
| 1524 break; | 1526 break; |
| 1525 case ObjectLiteral::Property::SETTER: | 1527 case ObjectLiteral::Property::SETTER: |
| 1526 accessor_table.lookup(key)->second->setter = property->value(); | 1528 if (property->emit_store()) { |
| 1529 accessor_table.lookup(key)->second->setter = property->value(); |
| 1530 } |
| 1527 break; | 1531 break; |
| 1528 } | 1532 } |
| 1529 } | 1533 } |
| 1530 | 1534 |
| 1531 // Create nodes to define accessors, using only a single call to the runtime | 1535 // Create nodes to define accessors, using only a single call to the runtime |
| 1532 // for each pair of corresponding getters and setters. | 1536 // for each pair of corresponding getters and setters. |
| 1533 for (AccessorTable::Iterator it = accessor_table.begin(); | 1537 for (AccessorTable::Iterator it = accessor_table.begin(); |
| 1534 it != accessor_table.end(); ++it) { | 1538 it != accessor_table.end(); ++it) { |
| 1535 VisitForValue(it->first); | 1539 VisitForValue(it->first); |
| 1536 VisitForValueOrNull(it->second->getter); | 1540 VisitForValueOrNull(it->second->getter); |
| (...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3128 Node* dead_node = graph()->NewNode(common()->Dead()); | 3132 Node* dead_node = graph()->NewNode(common()->Dead()); |
| 3129 dead_control_.set(dead_node); | 3133 dead_control_.set(dead_node); |
| 3130 return dead_node; | 3134 return dead_node; |
| 3131 } | 3135 } |
| 3132 return dead_control_.get(); | 3136 return dead_control_.get(); |
| 3133 } | 3137 } |
| 3134 | 3138 |
| 3135 } // namespace compiler | 3139 } // namespace compiler |
| 3136 } // namespace internal | 3140 } // namespace internal |
| 3137 } // namespace v8 | 3141 } // namespace v8 |
| OLD | NEW |