| 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.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); | 1501 __ Move(LoadDescriptor::ReceiverRegister(), result_register()); |
| 1502 __ LoadRoot(LoadDescriptor::NameRegister(), | 1502 __ LoadRoot(LoadDescriptor::NameRegister(), |
| 1503 Heap::kprototype_stringRootIndex); | 1503 Heap::kprototype_stringRootIndex); |
| 1504 __ Move(LoadDescriptor::SlotRegister(), SmiFromSlot(lit->PrototypeSlot())); | 1504 __ Move(LoadDescriptor::SlotRegister(), SmiFromSlot(lit->PrototypeSlot())); |
| 1505 CallLoadIC(NOT_INSIDE_TYPEOF); | 1505 CallLoadIC(NOT_INSIDE_TYPEOF); |
| 1506 PrepareForBailoutForId(lit->PrototypeId(), TOS_REG); | 1506 PrepareForBailoutForId(lit->PrototypeId(), TOS_REG); |
| 1507 PushOperand(result_register()); | 1507 PushOperand(result_register()); |
| 1508 | 1508 |
| 1509 EmitClassDefineProperties(lit); | 1509 EmitClassDefineProperties(lit); |
| 1510 | 1510 |
| 1511 // Set constructor to have fast properties. | 1511 // Set both the prototype and constructor to have fast properties. |
| 1512 CallRuntimeWithOperands(Runtime::kFinalizeClassDefinition); | 1512 CallRuntimeWithOperands(Runtime::kFinalizeClassDefinition); |
| 1513 | 1513 |
| 1514 if (lit->class_variable_proxy() != nullptr) { | 1514 if (lit->class_variable_proxy() != nullptr) { |
| 1515 EmitVariableAssignment(lit->class_variable_proxy()->var(), Token::INIT, | 1515 EmitVariableAssignment(lit->class_variable_proxy()->var(), Token::INIT, |
| 1516 lit->ProxySlot()); | 1516 lit->ProxySlot()); |
| 1517 } | 1517 } |
| 1518 } | 1518 } |
| 1519 | 1519 |
| 1520 context()->Plug(result_register()); | 1520 context()->Plug(result_register()); |
| 1521 } | 1521 } |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1906 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1906 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1907 var->initializer_position() >= proxy->position(); | 1907 var->initializer_position() >= proxy->position(); |
| 1908 } | 1908 } |
| 1909 | 1909 |
| 1910 | 1910 |
| 1911 #undef __ | 1911 #undef __ |
| 1912 | 1912 |
| 1913 | 1913 |
| 1914 } // namespace internal | 1914 } // namespace internal |
| 1915 } // namespace v8 | 1915 } // namespace v8 |
| OLD | NEW |