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.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.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 902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 | 913 |
914 void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property, | 914 void FullCodeGenerator::EmitPropertyKey(ObjectLiteralProperty* property, |
915 BailoutId bailout_id) { | 915 BailoutId bailout_id) { |
916 VisitForStackValue(property->key()); | 916 VisitForStackValue(property->key()); |
917 __ CallRuntime(Runtime::kToName, 1); | 917 __ CallRuntime(Runtime::kToName, 1); |
918 PrepareForBailoutForId(bailout_id, NO_REGISTERS); | 918 PrepareForBailoutForId(bailout_id, NO_REGISTERS); |
919 __ Push(result_register()); | 919 __ Push(result_register()); |
920 } | 920 } |
921 | 921 |
922 | 922 |
923 void FullCodeGenerator::EmitLoadSuperConstructor(SuperCallReference* ref) { | |
924 VisitForStackValue(ref->this_function_var()); | |
925 __ CallRuntime(Runtime::kGetPrototype, 1); | |
926 } | |
927 | |
928 | |
929 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { | 923 void FullCodeGenerator::VisitReturnStatement(ReturnStatement* stmt) { |
930 Comment cmnt(masm_, "[ ReturnStatement"); | 924 Comment cmnt(masm_, "[ ReturnStatement"); |
931 SetStatementPosition(stmt); | 925 SetStatementPosition(stmt); |
932 Expression* expr = stmt->expression(); | 926 Expression* expr = stmt->expression(); |
933 VisitForAccumulatorValue(expr); | 927 VisitForAccumulatorValue(expr); |
934 EmitUnwindBeforeReturn(); | 928 EmitUnwindBeforeReturn(); |
935 EmitReturnSequence(); | 929 EmitReturnSequence(); |
936 } | 930 } |
937 | 931 |
938 | 932 |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1730 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
1737 var->initializer_position() >= proxy->position(); | 1731 var->initializer_position() >= proxy->position(); |
1738 } | 1732 } |
1739 | 1733 |
1740 | 1734 |
1741 #undef __ | 1735 #undef __ |
1742 | 1736 |
1743 | 1737 |
1744 } // namespace internal | 1738 } // namespace internal |
1745 } // namespace v8 | 1739 } // namespace v8 |
OLD | NEW |