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

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

Issue 1529113002: [es6] Consistently use %_GetSuperConstructor to implement super calls. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comment Created 5 years 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
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/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/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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.h ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698