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

Side by Side Diff: src/globals.h

Issue 1360403002: Revert of [es6] Introduce spec compliant IsConstructor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/factory.cc ('k') | src/hydrogen.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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return kind & FunctionKind::kBaseConstructor; 990 return kind & FunctionKind::kBaseConstructor;
991 } 991 }
992 992
993 993
994 inline bool IsSubclassConstructor(FunctionKind kind) { 994 inline bool IsSubclassConstructor(FunctionKind kind) {
995 DCHECK(IsValidFunctionKind(kind)); 995 DCHECK(IsValidFunctionKind(kind));
996 return kind & FunctionKind::kSubclassConstructor; 996 return kind & FunctionKind::kSubclassConstructor;
997 } 997 }
998 998
999 999
1000 inline bool IsClassConstructor(FunctionKind kind) { 1000 inline bool IsConstructor(FunctionKind kind) {
1001 DCHECK(IsValidFunctionKind(kind)); 1001 DCHECK(IsValidFunctionKind(kind));
1002 return kind & 1002 return kind &
1003 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor | 1003 (FunctionKind::kBaseConstructor | FunctionKind::kSubclassConstructor |
1004 FunctionKind::kDefaultConstructor); 1004 FunctionKind::kDefaultConstructor);
1005 } 1005 }
1006 1006
1007 1007
1008 inline bool IsInObjectLiteral(FunctionKind kind) { 1008 inline bool IsInObjectLiteral(FunctionKind kind) {
1009 DCHECK(IsValidFunctionKind(kind)); 1009 DCHECK(IsValidFunctionKind(kind));
1010 return kind & FunctionKind::kInObjectLiteral; 1010 return kind & FunctionKind::kInObjectLiteral;
1011 } 1011 }
1012 1012
1013 1013
1014 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) { 1014 inline FunctionKind WithObjectLiteralBit(FunctionKind kind) {
1015 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral); 1015 kind = static_cast<FunctionKind>(kind | FunctionKind::kInObjectLiteral);
1016 DCHECK(IsValidFunctionKind(kind)); 1016 DCHECK(IsValidFunctionKind(kind));
1017 return kind; 1017 return kind;
1018 } 1018 }
1019 } } // namespace v8::internal 1019 } } // namespace v8::internal
1020 1020
1021 namespace i = v8::internal; 1021 namespace i = v8::internal;
1022 1022
1023 #endif // V8_GLOBALS_H_ 1023 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698