| 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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1551 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); | 1551 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); |
| 1552 __ LoadRoot(LoadDescriptor::NameRegister(), Heap::kprototype_stringRootIndex); | 1552 __ LoadRoot(LoadDescriptor::NameRegister(), Heap::kprototype_stringRootIndex); |
| 1553 __ Move(LoadDescriptor::SlotRegister(), SmiFromSlot(lit->PrototypeSlot())); | 1553 __ Move(LoadDescriptor::SlotRegister(), SmiFromSlot(lit->PrototypeSlot())); |
| 1554 CallLoadIC(); | 1554 CallLoadIC(); |
| 1555 PrepareForBailoutForId(lit->PrototypeId(), BailoutState::TOS_REGISTER); | 1555 PrepareForBailoutForId(lit->PrototypeId(), BailoutState::TOS_REGISTER); |
| 1556 PushOperand(result_register()); | 1556 PushOperand(result_register()); |
| 1557 | 1557 |
| 1558 EmitClassDefineProperties(lit); | 1558 EmitClassDefineProperties(lit); |
| 1559 DropOperands(1); | 1559 DropOperands(1); |
| 1560 | 1560 |
| 1561 // ES6 section 14.5.16 class expression evaluation, step 5 |
| 1562 EmitClassDefineNameProperty(lit); |
| 1563 |
| 1561 // Set the constructor to have fast properties. | 1564 // Set the constructor to have fast properties. |
| 1562 CallRuntimeWithOperands(Runtime::kToFastProperties); | 1565 CallRuntimeWithOperands(Runtime::kToFastProperties); |
| 1563 | 1566 |
| 1564 if (lit->class_variable_proxy() != nullptr) { | 1567 if (lit->class_variable_proxy() != nullptr) { |
| 1565 EmitVariableAssignment(lit->class_variable_proxy()->var(), Token::INIT, | 1568 EmitVariableAssignment(lit->class_variable_proxy()->var(), Token::INIT, |
| 1566 lit->ProxySlot()); | 1569 lit->ProxySlot()); |
| 1567 } | 1570 } |
| 1568 | 1571 |
| 1569 context()->Plug(result_register()); | 1572 context()->Plug(result_register()); |
| 1570 } | 1573 } |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 return info_->has_simple_parameters(); | 2035 return info_->has_simple_parameters(); |
| 2033 } | 2036 } |
| 2034 | 2037 |
| 2035 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } | 2038 FunctionLiteral* FullCodeGenerator::literal() const { return info_->literal(); } |
| 2036 | 2039 |
| 2037 #undef __ | 2040 #undef __ |
| 2038 | 2041 |
| 2039 | 2042 |
| 2040 } // namespace internal | 2043 } // namespace internal |
| 2041 } // namespace v8 | 2044 } // namespace v8 |
| OLD | NEW |