| Index: src/full-codegen.cc
|
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc
|
| index 35d51d982ed44f9edffc77ff8f249338fe42cca2..8177a35ed8efbfb0b061c5bc95c68a5cffc8102d 100644
|
| --- a/src/full-codegen.cc
|
| +++ b/src/full-codegen.cc
|
| @@ -1542,12 +1542,30 @@ void FullCodeGenerator::VisitFunctionLiteral(FunctionLiteral* expr) {
|
|
|
|
|
| void FullCodeGenerator::VisitClassLiteral(ClassLiteral* expr) {
|
| - // TODO(arv): Implement
|
| Comment cmnt(masm_, "[ ClassLiteral");
|
| +
|
| + if (expr->raw_name() != NULL) {
|
| + __ Push(expr->name());
|
| + } else {
|
| + __ Push(isolate()->factory()->undefined_value());
|
| + }
|
| +
|
| if (expr->extends() != NULL) {
|
| - VisitForEffect(expr->extends());
|
| + VisitForStackValue(expr->extends());
|
| + } else {
|
| + __ Push(isolate()->factory()->the_hole_value());
|
| }
|
| - context()->Plug(isolate()->factory()->undefined_value());
|
| +
|
| + if (expr->constructor() != NULL) {
|
| + VisitForStackValue(expr->constructor());
|
| + } else {
|
| + __ Push(isolate()->factory()->undefined_value());
|
| + }
|
| +
|
| + // TODO(arv): Process methods
|
| +
|
| + __ CallRuntime(Runtime::kDefineClass, 3);
|
| + context()->Plug(result_register());
|
| }
|
|
|
|
|
|
|