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

Side by Side Diff: src/objects.h

Issue 2315733003: Class fields, part 1 (parsing and infrastructure) (Closed)
Patch Set: whitespace Created 4 years, 3 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/interpreter/bytecode-generator.cc ('k') | src/objects.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 7302 matching lines...) Expand 10 before | Expand all | Expand 10 after
7313 7313
7314 // Indicates that this function is a getter. 7314 // Indicates that this function is a getter.
7315 DECL_BOOLEAN_ACCESSORS(is_getter_function) 7315 DECL_BOOLEAN_ACCESSORS(is_getter_function)
7316 7316
7317 // Indicates that this function is a setter. 7317 // Indicates that this function is a setter.
7318 DECL_BOOLEAN_ACCESSORS(is_setter_function) 7318 DECL_BOOLEAN_ACCESSORS(is_setter_function)
7319 7319
7320 // Indicates that this function is a default constructor. 7320 // Indicates that this function is a default constructor.
7321 DECL_BOOLEAN_ACCESSORS(is_default_constructor) 7321 DECL_BOOLEAN_ACCESSORS(is_default_constructor)
7322 7322
7323 // Indicates that this is a constructor for a base class with instance fields.
7324 DECL_BOOLEAN_ACCESSORS(requires_class_field_init)
7325 // Indicates that this is a synthesized function to set up class instance
7326 // fields.
7327 DECL_BOOLEAN_ACCESSORS(is_class_field_initializer)
7328
7323 // Indicates that this function is an asm function. 7329 // Indicates that this function is an asm function.
7324 DECL_BOOLEAN_ACCESSORS(asm_function) 7330 DECL_BOOLEAN_ACCESSORS(asm_function)
7325 7331
7326 // Indicates that the the shared function info is deserialized from cache. 7332 // Indicates that the the shared function info is deserialized from cache.
7327 DECL_BOOLEAN_ACCESSORS(deserialized) 7333 DECL_BOOLEAN_ACCESSORS(deserialized)
7328 7334
7329 // Indicates that the the shared function info has never been compiled before. 7335 // Indicates that the the shared function info has never been compiled before.
7330 DECL_BOOLEAN_ACCESSORS(never_compiled) 7336 DECL_BOOLEAN_ACCESSORS(never_compiled)
7331 7337
7332 // Whether this function was created from a FunctionDeclaration. 7338 // Whether this function was created from a FunctionDeclaration.
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
7601 kIsDefaultConstructor, 7607 kIsDefaultConstructor,
7602 kIsSubclassConstructor, 7608 kIsSubclassConstructor,
7603 kIsBaseConstructor, 7609 kIsBaseConstructor,
7604 kIsGetterFunction, 7610 kIsGetterFunction,
7605 kIsSetterFunction, 7611 kIsSetterFunction,
7606 // byte 3 7612 // byte 3
7607 kIsAsyncFunction, 7613 kIsAsyncFunction,
7608 kDeserialized, 7614 kDeserialized,
7609 kIsDeclaration, 7615 kIsDeclaration,
7610 kIsAsmWasmBroken, 7616 kIsAsmWasmBroken,
7617 kRequiresClassFieldInit,
7618 kIsClassFieldInitializer,
7611 kCompilerHintsCount, // Pseudo entry 7619 kCompilerHintsCount, // Pseudo entry
7612 }; 7620 };
7613 // kFunctionKind has to be byte-aligned 7621 // kFunctionKind has to be byte-aligned
7614 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); 7622 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0);
7615 // Make sure that FunctionKind and byte 2 are in sync: 7623 // Make sure that FunctionKind and byte 2 are in sync:
7616 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \ 7624 #define ASSERT_FUNCTION_KIND_ORDER(functionKind, compilerFunctionKind) \
7617 STATIC_ASSERT(FunctionKind::functionKind == \ 7625 STATIC_ASSERT(FunctionKind::functionKind == \
7618 1 << (compilerFunctionKind - kFunctionKind)) 7626 1 << (compilerFunctionKind - kFunctionKind))
7619 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow); 7627 ASSERT_FUNCTION_KIND_ORDER(kArrowFunction, kIsArrow);
7620 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator); 7628 ASSERT_FUNCTION_KIND_ORDER(kGeneratorFunction, kIsGenerator);
(...skipping 3580 matching lines...) Expand 10 before | Expand all | Expand 10 after
11201 } 11209 }
11202 return value; 11210 return value;
11203 } 11211 }
11204 }; 11212 };
11205 11213
11206 11214
11207 } // NOLINT, false-positive due to second-order macros. 11215 } // NOLINT, false-positive due to second-order macros.
11208 } // NOLINT, false-positive due to second-order macros. 11216 } // NOLINT, false-positive due to second-order macros.
11209 11217
11210 #endif // V8_OBJECTS_H_ 11218 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698