Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: src/full-codegen.cc

Issue 639123009: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | src/ia32/full-codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698