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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 if (lit->constructor() != NULL) { | 1578 if (lit->constructor() != NULL) { |
1579 VisitForStackValue(lit->constructor()); | 1579 VisitForStackValue(lit->constructor()); |
1580 } else { | 1580 } else { |
1581 __ Push(isolate()->factory()->undefined_value()); | 1581 __ Push(isolate()->factory()->undefined_value()); |
1582 } | 1582 } |
1583 | 1583 |
1584 __ Push(script()); | 1584 __ Push(script()); |
1585 __ Push(Smi::FromInt(lit->start_position())); | 1585 __ Push(Smi::FromInt(lit->start_position())); |
1586 __ Push(Smi::FromInt(lit->end_position())); | 1586 __ Push(Smi::FromInt(lit->end_position())); |
1587 | 1587 |
1588 // TODO(arv): Process methods | 1588 __ CallRuntime(Runtime::kDefineClass, 6); |
| 1589 EmitClassDefineProperties(lit); |
1589 | 1590 |
1590 __ CallRuntime(Runtime::kDefineClass, 6); | |
1591 context()->Plug(result_register()); | 1591 context()->Plug(result_register()); |
1592 } | 1592 } |
1593 | 1593 |
1594 | 1594 |
1595 void FullCodeGenerator::VisitNativeFunctionLiteral( | 1595 void FullCodeGenerator::VisitNativeFunctionLiteral( |
1596 NativeFunctionLiteral* expr) { | 1596 NativeFunctionLiteral* expr) { |
1597 Comment cmnt(masm_, "[ NativeFunctionLiteral"); | 1597 Comment cmnt(masm_, "[ NativeFunctionLiteral"); |
1598 | 1598 |
1599 // Compute the function template for the native function. | 1599 // Compute the function template for the native function. |
1600 Handle<String> name = expr->name(); | 1600 Handle<String> name = expr->name(); |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 } | 1751 } |
1752 return true; | 1752 return true; |
1753 } | 1753 } |
1754 #endif // DEBUG | 1754 #endif // DEBUG |
1755 | 1755 |
1756 | 1756 |
1757 #undef __ | 1757 #undef __ |
1758 | 1758 |
1759 | 1759 |
1760 } } // namespace v8::internal | 1760 } } // namespace v8::internal |
OLD | NEW |