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

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

Powered by Google App Engine
This is Rietveld 408576698