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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
6 | 6 |
7 #include "src/ast/ast-numbering.h" | 7 #include "src/ast/ast-numbering.h" |
8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 return; | 1462 return; |
1463 } | 1463 } |
1464 EmitNewClosure(function_info, expr->pretenure()); | 1464 EmitNewClosure(function_info, expr->pretenure()); |
1465 } | 1465 } |
1466 | 1466 |
1467 | 1467 |
1468 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { | 1468 void FullCodeGenerator::VisitClassLiteral(ClassLiteral* lit) { |
1469 Comment cmnt(masm_, "[ ClassLiteral"); | 1469 Comment cmnt(masm_, "[ ClassLiteral"); |
1470 | 1470 |
1471 { | 1471 { |
| 1472 NestedClassLiteral nested_class_literal(this, lit); |
1472 EnterBlockScopeIfNeeded block_scope_state( | 1473 EnterBlockScopeIfNeeded block_scope_state( |
1473 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId()); | 1474 this, lit->scope(), lit->EntryId(), lit->DeclsId(), lit->ExitId()); |
1474 | 1475 |
1475 if (lit->extends() != NULL) { | 1476 if (lit->extends() != NULL) { |
1476 VisitForStackValue(lit->extends()); | 1477 VisitForStackValue(lit->extends()); |
1477 } else { | 1478 } else { |
1478 PushOperand(isolate()->factory()->the_hole_value()); | 1479 PushOperand(isolate()->factory()->the_hole_value()); |
1479 } | 1480 } |
1480 | 1481 |
1481 VisitForStackValue(lit->constructor()); | 1482 VisitForStackValue(lit->constructor()); |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1942 return var->scope()->is_nonlinear() || | 1943 return var->scope()->is_nonlinear() || |
1943 var->initializer_position() >= proxy->position(); | 1944 var->initializer_position() >= proxy->position(); |
1944 } | 1945 } |
1945 | 1946 |
1946 | 1947 |
1947 #undef __ | 1948 #undef __ |
1948 | 1949 |
1949 | 1950 |
1950 } // namespace internal | 1951 } // namespace internal |
1951 } // namespace v8 | 1952 } // namespace v8 |
OLD | NEW |