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

Side by Side Diff: src/objects.h

Issue 2481163002: Assign unique IDs to FunctionLiterals (Closed)
Patch Set: updates Created 4 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
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 7455 matching lines...) Expand 10 before | Expand all | Expand 10 after
7466 7466
7467 // [expected_nof_properties]: Expected number of properties for the function. 7467 // [expected_nof_properties]: Expected number of properties for the function.
7468 inline int expected_nof_properties() const; 7468 inline int expected_nof_properties() const;
7469 inline void set_expected_nof_properties(int value); 7469 inline void set_expected_nof_properties(int value);
7470 7470
7471 // [feedback_metadata] - describes ast node feedback from full-codegen and 7471 // [feedback_metadata] - describes ast node feedback from full-codegen and
7472 // (increasingly) from crankshafted code where sufficient feedback isn't 7472 // (increasingly) from crankshafted code where sufficient feedback isn't
7473 // available. 7473 // available.
7474 DECL_ACCESSORS(feedback_metadata, TypeFeedbackMetadata) 7474 DECL_ACCESSORS(feedback_metadata, TypeFeedbackMetadata)
7475 7475
7476 // [function_literal_id] - uniquely identifies the FunctionLiteral this
7477 // SharedFunctionInfo represents within its script, or -1 if this
7478 // SharedFunctionInfo object doesn't correspond to a parsed FunctionLiteral.
7479 inline int function_literal_id() const;
7480 inline void set_function_literal_id(int value);
7481
7476 #if TRACE_MAPS 7482 #if TRACE_MAPS
7477 // [unique_id] - For --trace-maps purposes, an identifier that's persistent 7483 // [unique_id] - For --trace-maps purposes, an identifier that's persistent
7478 // even if the GC moves this SharedFunctionInfo. 7484 // even if the GC moves this SharedFunctionInfo.
7479 inline int unique_id() const; 7485 inline int unique_id() const;
7480 inline void set_unique_id(int value); 7486 inline void set_unique_id(int value);
7481 #endif 7487 #endif
7482 7488
7483 // [instance class name]: class name for instances. 7489 // [instance class name]: class name for instances.
7484 DECL_ACCESSORS(instance_class_name, Object) 7490 DECL_ACCESSORS(instance_class_name, Object)
7485 7491
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
7772 static const int kConstructStubOffset = kOuterScopeInfoOffset + kPointerSize; 7778 static const int kConstructStubOffset = kOuterScopeInfoOffset + kPointerSize;
7773 static const int kInstanceClassNameOffset = 7779 static const int kInstanceClassNameOffset =
7774 kConstructStubOffset + kPointerSize; 7780 kConstructStubOffset + kPointerSize;
7775 static const int kFunctionDataOffset = 7781 static const int kFunctionDataOffset =
7776 kInstanceClassNameOffset + kPointerSize; 7782 kInstanceClassNameOffset + kPointerSize;
7777 static const int kScriptOffset = kFunctionDataOffset + kPointerSize; 7783 static const int kScriptOffset = kFunctionDataOffset + kPointerSize;
7778 static const int kDebugInfoOffset = kScriptOffset + kPointerSize; 7784 static const int kDebugInfoOffset = kScriptOffset + kPointerSize;
7779 static const int kFunctionIdentifierOffset = kDebugInfoOffset + kPointerSize; 7785 static const int kFunctionIdentifierOffset = kDebugInfoOffset + kPointerSize;
7780 static const int kFeedbackMetadataOffset = 7786 static const int kFeedbackMetadataOffset =
7781 kFunctionIdentifierOffset + kPointerSize; 7787 kFunctionIdentifierOffset + kPointerSize;
7788 static const int kFunctionLiteralIdOffset =
7789 kFeedbackMetadataOffset + kPointerSize;
7782 #if TRACE_MAPS 7790 #if TRACE_MAPS
7783 static const int kUniqueIdOffset = kFeedbackMetadataOffset + kPointerSize; 7791 static const int kUniqueIdOffset = kFunctionLiteralIdOffset + kPointerSize;
7784 static const int kLastPointerFieldOffset = kUniqueIdOffset; 7792 static const int kLastPointerFieldOffset = kUniqueIdOffset;
7785 #else 7793 #else
7786 // Just to not break the postmortrem support with conditional offsets 7794 // Just to not break the postmortrem support with conditional offsets
7787 static const int kUniqueIdOffset = kFeedbackMetadataOffset; 7795 static const int kUniqueIdOffset = kFunctionLiteralIdOffset;
7788 static const int kLastPointerFieldOffset = kFeedbackMetadataOffset; 7796 static const int kLastPointerFieldOffset = kFunctionLiteralIdOffset;
7789 #endif 7797 #endif
7790 7798
7791 #if V8_HOST_ARCH_32_BIT 7799 #if V8_HOST_ARCH_32_BIT
7792 // Smi fields. 7800 // Smi fields.
7793 static const int kLengthOffset = kLastPointerFieldOffset + kPointerSize; 7801 static const int kLengthOffset = kLastPointerFieldOffset + kPointerSize;
7794 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize; 7802 static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize;
7795 static const int kExpectedNofPropertiesOffset = 7803 static const int kExpectedNofPropertiesOffset =
7796 kFormalParameterCountOffset + kPointerSize; 7804 kFormalParameterCountOffset + kPointerSize;
7797 static const int kNumLiteralsOffset = 7805 static const int kNumLiteralsOffset =
7798 kExpectedNofPropertiesOffset + kPointerSize; 7806 kExpectedNofPropertiesOffset + kPointerSize;
(...skipping 4063 matching lines...) Expand 10 before | Expand all | Expand 10 after
11862 } 11870 }
11863 return value; 11871 return value;
11864 } 11872 }
11865 }; 11873 };
11866 11874
11867 11875
11868 } // NOLINT, false-positive due to second-order macros. 11876 } // NOLINT, false-positive due to second-order macros.
11869 } // NOLINT, false-positive due to second-order macros. 11877 } // NOLINT, false-positive due to second-order macros.
11870 11878
11871 #endif // V8_OBJECTS_H_ 11879 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/objects.cc » ('j') | src/parsing/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698