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

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

Issue 949763003: WIP: new.target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months 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
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 836
837 void FullCodeGenerator::VisitSuperReference(SuperReference* super) { 837 void FullCodeGenerator::VisitSuperReference(SuperReference* super) {
838 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0); 838 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
839 } 839 }
840 840
841 841
842 bool FullCodeGenerator::ValidateSuperCall(Call* expr) { 842 bool FullCodeGenerator::ValidateSuperCall(Call* expr) {
843 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); 843 Variable* new_target_var = scope()->DeclarationScope()->new_target_var();
844 if (new_target_var == nullptr) { 844 if (new_target_var == nullptr) {
845 // TODO(dslomov): this is not exactly correct, the spec requires us 845 // TODO(dslomov): this is not exactly correct, the spec requires us
846 // to execute the constructor and only fail when an assigment to 'this' 846 // to execute the constructor and only fail when an assignment to 'this'
Dmitry Lomov (no reviews) 2015/02/25 11:28:40 I believe we can now kill this entire function and
arv (Not doing code reviews) 2015/02/25 14:47:24 That is unrelated to this CL. I'll remove it in an
847 // is attempted. Will implement once we have general new.target support, 847 // is attempted. Will implement once we have general new.target support,
848 // but also filed spec bug 3843 to make it an early error. 848 // but also filed spec bug 3843 to make it an early error.
849 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0); 849 __ CallRuntime(Runtime::kThrowUnsupportedSuperError, 0);
850 RecordJSReturnSite(expr); 850 RecordJSReturnSite(expr);
851 context()->Plug(result_register()); 851 context()->Plug(result_register());
852 return false; 852 return false;
853 } 853 }
854 return true; 854 return true;
855 } 855 }
856 856
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 } 1823 }
1824 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS); 1824 codegen_->PrepareForBailoutForId(exit_id_, NO_REGISTERS);
1825 codegen_->scope_ = saved_scope_; 1825 codegen_->scope_ = saved_scope_;
1826 } 1826 }
1827 1827
1828 1828
1829 #undef __ 1829 #undef __
1830 1830
1831 1831
1832 } } // namespace v8::internal 1832 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/messages.js » ('j') | src/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698