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

Side by Side Diff: src/globals.h

Issue 867153003: new classes: special construct stub for derived classs and TDZ for `this`. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: CHECK_OK fixed 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
« no previous file with comments | « src/builtins.h ('k') | src/ia32/builtins-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 #ifndef V8_GLOBALS_H_ 5 #ifndef V8_GLOBALS_H_
6 #define V8_GLOBALS_H_ 6 #define V8_GLOBALS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 enum Signedness { kSigned, kUnsigned }; 772 enum Signedness { kSigned, kUnsigned };
773 773
774 774
775 enum FunctionKind { 775 enum FunctionKind {
776 kNormalFunction = 0, 776 kNormalFunction = 0,
777 kArrowFunction = 1, 777 kArrowFunction = 1,
778 kGeneratorFunction = 2, 778 kGeneratorFunction = 2,
779 kConciseMethod = 4, 779 kConciseMethod = 4,
780 kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod, 780 kConciseGeneratorMethod = kGeneratorFunction | kConciseMethod,
781 kDefaultConstructor = 8 781 kDefaultConstructor = 8,
782 kSubclassConstructor = 16
782 }; 783 };
783 784
784 785
785 inline bool IsValidFunctionKind(FunctionKind kind) { 786 inline bool IsValidFunctionKind(FunctionKind kind) {
786 return kind == FunctionKind::kNormalFunction || 787 return kind == FunctionKind::kNormalFunction ||
787 kind == FunctionKind::kArrowFunction || 788 kind == FunctionKind::kArrowFunction ||
788 kind == FunctionKind::kGeneratorFunction || 789 kind == FunctionKind::kGeneratorFunction ||
789 kind == FunctionKind::kConciseMethod || 790 kind == FunctionKind::kConciseMethod ||
790 kind == FunctionKind::kConciseGeneratorMethod || 791 kind == FunctionKind::kConciseGeneratorMethod ||
791 kind == FunctionKind::kDefaultConstructor; 792 kind == FunctionKind::kDefaultConstructor ||
793 kind == FunctionKind::kSubclassConstructor;
792 } 794 }
793 795
794 796
795 inline bool IsArrowFunction(FunctionKind kind) { 797 inline bool IsArrowFunction(FunctionKind kind) {
796 DCHECK(IsValidFunctionKind(kind)); 798 DCHECK(IsValidFunctionKind(kind));
797 return kind & FunctionKind::kArrowFunction; 799 return kind & FunctionKind::kArrowFunction;
798 } 800 }
799 801
800 802
801 inline bool IsGeneratorFunction(FunctionKind kind) { 803 inline bool IsGeneratorFunction(FunctionKind kind) {
802 DCHECK(IsValidFunctionKind(kind)); 804 DCHECK(IsValidFunctionKind(kind));
803 return kind & FunctionKind::kGeneratorFunction; 805 return kind & FunctionKind::kGeneratorFunction;
804 } 806 }
805 807
806 808
807 inline bool IsConciseMethod(FunctionKind kind) { 809 inline bool IsConciseMethod(FunctionKind kind) {
808 DCHECK(IsValidFunctionKind(kind)); 810 DCHECK(IsValidFunctionKind(kind));
809 return kind & FunctionKind::kConciseMethod; 811 return kind & FunctionKind::kConciseMethod;
810 } 812 }
811 813
812 814
813 inline bool IsDefaultConstructor(FunctionKind kind) { 815 inline bool IsDefaultConstructor(FunctionKind kind) {
814 DCHECK(IsValidFunctionKind(kind)); 816 DCHECK(IsValidFunctionKind(kind));
815 return kind & FunctionKind::kDefaultConstructor; 817 return kind & FunctionKind::kDefaultConstructor;
816 } 818 }
817 819
818 820 inline bool IsSubclassConstructor(FunctionKind kind) {
821 DCHECK(IsValidFunctionKind(kind));
822 return kind & FunctionKind::kSubclassConstructor;
823 }
819 } } // namespace v8::internal 824 } } // namespace v8::internal
820 825
821 namespace i = v8::internal; 826 namespace i = v8::internal;
822 827
823 #endif // V8_GLOBALS_H_ 828 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/builtins.h ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698