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

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

Issue 680993003: Classes: Add basic support for properties (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: git rebase Created 6 years, 1 month 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
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698