| 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/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1074 javascript()->CallRuntime(Runtime::kSetProperty, 4); | 1074 javascript()->CallRuntime(Runtime::kSetProperty, 4); |
| 1075 NewNode(op, receiver, key, value, strict); | 1075 NewNode(op, receiver, key, value, strict); |
| 1076 } | 1076 } |
| 1077 break; | 1077 break; |
| 1078 } | 1078 } |
| 1079 case ObjectLiteral::Property::PROTOTYPE: { | 1079 case ObjectLiteral::Property::PROTOTYPE: { |
| 1080 environment()->Push(literal); // Duplicate receiver. | 1080 environment()->Push(literal); // Duplicate receiver. |
| 1081 VisitForValue(property->value()); | 1081 VisitForValue(property->value()); |
| 1082 Node* value = environment()->Pop(); | 1082 Node* value = environment()->Pop(); |
| 1083 Node* receiver = environment()->Pop(); | 1083 Node* receiver = environment()->Pop(); |
| 1084 if (property->emit_store()) { | 1084 DCHECK(property->emit_store()); |
| 1085 const Operator* op = | 1085 const Operator* op = |
| 1086 javascript()->CallRuntime(Runtime::kInternalSetPrototype, 2); | 1086 javascript()->CallRuntime(Runtime::kInternalSetPrototype, 2); |
| 1087 Node* set_prototype = NewNode(op, receiver, value); | 1087 Node* set_prototype = NewNode(op, receiver, value); |
| 1088 // SetPrototype should not lazy deopt on an object literal. | 1088 // SetPrototype should not lazy deopt on an object literal. |
| 1089 PrepareFrameState(set_prototype, BailoutId::None()); | 1089 PrepareFrameState(set_prototype, BailoutId::None()); |
| 1090 } | |
| 1091 break; | 1090 break; |
| 1092 } | 1091 } |
| 1093 case ObjectLiteral::Property::GETTER: | 1092 case ObjectLiteral::Property::GETTER: |
| 1094 accessor_table.lookup(key)->second->getter = property->value(); | 1093 accessor_table.lookup(key)->second->getter = property->value(); |
| 1095 break; | 1094 break; |
| 1096 case ObjectLiteral::Property::SETTER: | 1095 case ObjectLiteral::Property::SETTER: |
| 1097 accessor_table.lookup(key)->second->setter = property->value(); | 1096 accessor_table.lookup(key)->second->setter = property->value(); |
| 1098 break; | 1097 break; |
| 1099 } | 1098 } |
| 1100 } | 1099 } |
| (...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2434 | 2433 |
| 2435 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( | 2434 BitVector* AstGraphBuilder::GetVariablesAssignedInLoop( |
| 2436 IterationStatement* stmt) { | 2435 IterationStatement* stmt) { |
| 2437 if (loop_assignment_analysis_ == NULL) return NULL; | 2436 if (loop_assignment_analysis_ == NULL) return NULL; |
| 2438 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); | 2437 return loop_assignment_analysis_->GetVariablesAssignedInLoop(stmt); |
| 2439 } | 2438 } |
| 2440 | 2439 |
| 2441 } // namespace compiler | 2440 } // namespace compiler |
| 2442 } // namespace internal | 2441 } // namespace internal |
| 2443 } // namespace v8 | 2442 } // namespace v8 |
| OLD | NEW |