Chromium Code Reviews| 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/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
| 9 #include "src/compiler.h" | 9 #include "src/compiler.h" |
| 10 #include "src/debug.h" | 10 #include "src/debug.h" |
| (...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1560 if (lit->constructor() != NULL) { | 1560 if (lit->constructor() != NULL) { |
| 1561 VisitForStackValue(lit->constructor()); | 1561 VisitForStackValue(lit->constructor()); |
| 1562 } else { | 1562 } else { |
| 1563 __ Push(isolate()->factory()->undefined_value()); | 1563 __ Push(isolate()->factory()->undefined_value()); |
| 1564 } | 1564 } |
| 1565 | 1565 |
| 1566 __ Push(script()); | 1566 __ Push(script()); |
| 1567 __ Push(Smi::FromInt(lit->start_position())); | 1567 __ Push(Smi::FromInt(lit->start_position())); |
| 1568 __ Push(Smi::FromInt(lit->end_position())); | 1568 __ Push(Smi::FromInt(lit->end_position())); |
| 1569 | 1569 |
| 1570 // TODO(arv): Process methods | |
| 1571 | |
| 1572 __ CallRuntime(Runtime::kDefineClass, 6); | 1570 __ CallRuntime(Runtime::kDefineClass, 6); |
| 1573 context()->Plug(result_register()); | 1571 EmitClassDefineProperties(lit); |
|
Dmitry Lomov (no reviews)
2014/10/18 08:30:32
nit: keep plugging context here - this is a result
| |
| 1574 } | 1572 } |
| 1575 | 1573 |
| 1576 | 1574 |
| 1577 void FullCodeGenerator::VisitNativeFunctionLiteral( | 1575 void FullCodeGenerator::VisitNativeFunctionLiteral( |
| 1578 NativeFunctionLiteral* expr) { | 1576 NativeFunctionLiteral* expr) { |
| 1579 Comment cmnt(masm_, "[ NativeFunctionLiteral"); | 1577 Comment cmnt(masm_, "[ NativeFunctionLiteral"); |
| 1580 | 1578 |
| 1581 // Compute the function template for the native function. | 1579 // Compute the function template for the native function. |
| 1582 Handle<String> name = expr->name(); | 1580 Handle<String> name = expr->name(); |
| 1583 v8::Handle<v8::FunctionTemplate> fun_template = | 1581 v8::Handle<v8::FunctionTemplate> fun_template = |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1733 } | 1731 } |
| 1734 return true; | 1732 return true; |
| 1735 } | 1733 } |
| 1736 #endif // DEBUG | 1734 #endif // DEBUG |
| 1737 | 1735 |
| 1738 | 1736 |
| 1739 #undef __ | 1737 #undef __ |
| 1740 | 1738 |
| 1741 | 1739 |
| 1742 } } // namespace v8::internal | 1740 } } // namespace v8::internal |
| OLD | NEW |