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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 VisitForStackValue(lit->constructor()); | 1609 VisitForStackValue(lit->constructor()); |
1610 | 1610 |
1611 __ Push(script()); | 1611 __ Push(script()); |
1612 __ Push(Smi::FromInt(lit->start_position())); | 1612 __ Push(Smi::FromInt(lit->start_position())); |
1613 __ Push(Smi::FromInt(lit->end_position())); | 1613 __ Push(Smi::FromInt(lit->end_position())); |
1614 | 1614 |
1615 __ CallRuntime(Runtime::kDefineClass, 6); | 1615 __ CallRuntime(Runtime::kDefineClass, 6); |
1616 EmitClassDefineProperties(lit); | 1616 EmitClassDefineProperties(lit); |
1617 | 1617 |
1618 if (lit->scope() != NULL) { | 1618 if (lit->scope() != NULL) { |
1619 DCHECK_NOT_NULL(lit->class_variable_proxy()); | 1619 DCHECK(lit->class_variable_proxy()); |
1620 EmitVariableAssignment(lit->class_variable_proxy()->var(), | 1620 EmitVariableAssignment(lit->class_variable_proxy()->var(), |
1621 Token::INIT_CONST); | 1621 Token::INIT_CONST); |
1622 } | 1622 } |
1623 } | 1623 } |
1624 | 1624 |
1625 context()->Plug(result_register()); | 1625 context()->Plug(result_register()); |
1626 } | 1626 } |
1627 | 1627 |
1628 | 1628 |
1629 void FullCodeGenerator::VisitNativeFunctionLiteral( | 1629 void FullCodeGenerator::VisitNativeFunctionLiteral( |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1828 } | 1828 } |
1829 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); | 1829 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); |
1830 codegen_->scope_ = saved_scope_; | 1830 codegen_->scope_ = saved_scope_; |
1831 } | 1831 } |
1832 | 1832 |
1833 | 1833 |
1834 #undef __ | 1834 #undef __ |
1835 | 1835 |
1836 | 1836 |
1837 } } // namespace v8::internal | 1837 } } // namespace v8::internal |
OLD | NEW |