| OLD | NEW | 
|---|
| 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 7464 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 7475   // Set up the link between shared function info and the script. The shared | 7475   // Set up the link between shared function info and the script. The shared | 
| 7476   // function info is added to the list on the script. | 7476   // function info is added to the list on the script. | 
| 7477   V8_EXPORT_PRIVATE static void SetScript(Handle<SharedFunctionInfo> shared, | 7477   V8_EXPORT_PRIVATE static void SetScript(Handle<SharedFunctionInfo> shared, | 
| 7478                                           Handle<Object> script_object); | 7478                                           Handle<Object> script_object); | 
| 7479 | 7479 | 
| 7480   // Layout description of the optimized code map. | 7480   // Layout description of the optimized code map. | 
| 7481   static const int kEntriesStart = 0; | 7481   static const int kEntriesStart = 0; | 
| 7482   static const int kContextOffset = 0; | 7482   static const int kContextOffset = 0; | 
| 7483   static const int kCachedCodeOffset = 1; | 7483   static const int kCachedCodeOffset = 1; | 
| 7484   static const int kLiteralsOffset = 2; | 7484   static const int kLiteralsOffset = 2; | 
| 7485   static const int kOsrAstIdOffset = 3; | 7485   static const int kEntryLength = 3; | 
| 7486   static const int kEntryLength = 4; |  | 
| 7487   static const int kInitialLength = kEntriesStart + kEntryLength; | 7486   static const int kInitialLength = kEntriesStart + kEntryLength; | 
| 7488 | 7487 | 
| 7489   static const int kNotFound = -1; | 7488   static const int kNotFound = -1; | 
| 7490 | 7489 | 
| 7491   // Helpers for assembly code that does a backwards walk of the optimized code | 7490   // Helpers for assembly code that does a backwards walk of the optimized code | 
| 7492   // map. | 7491   // map. | 
| 7493   static const int kOffsetToPreviousContext = | 7492   static const int kOffsetToPreviousContext = | 
| 7494       FixedArray::kHeaderSize + kPointerSize * (kContextOffset - kEntryLength); | 7493       FixedArray::kHeaderSize + kPointerSize * (kContextOffset - kEntryLength); | 
| 7495   static const int kOffsetToPreviousCachedCode = | 7494   static const int kOffsetToPreviousCachedCode = | 
| 7496       FixedArray::kHeaderSize + | 7495       FixedArray::kHeaderSize + | 
| 7497       kPointerSize * (kCachedCodeOffset - kEntryLength); | 7496       kPointerSize * (kCachedCodeOffset - kEntryLength); | 
| 7498   static const int kOffsetToPreviousLiterals = | 7497   static const int kOffsetToPreviousLiterals = | 
| 7499       FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength); | 7498       FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength); | 
| 7500   static const int kOffsetToPreviousOsrAstId = |  | 
| 7501       FixedArray::kHeaderSize + kPointerSize * (kOsrAstIdOffset - kEntryLength); |  | 
| 7502 | 7499 | 
| 7503   // [scope_info]: Scope info. | 7500   // [scope_info]: Scope info. | 
| 7504   DECL_ACCESSORS(scope_info, ScopeInfo) | 7501   DECL_ACCESSORS(scope_info, ScopeInfo) | 
| 7505 | 7502 | 
| 7506   // The outer scope info for the purpose of parsing this function, or the hole | 7503   // The outer scope info for the purpose of parsing this function, or the hole | 
| 7507   // value if it isn't yet known. | 7504   // value if it isn't yet known. | 
| 7508   DECL_ACCESSORS(outer_scope_info, HeapObject) | 7505   DECL_ACCESSORS(outer_scope_info, HeapObject) | 
| 7509 | 7506 | 
| 7510   // [construct stub]: Code stub for constructing instances of this function. | 7507   // [construct stub]: Code stub for constructing instances of this function. | 
| 7511   DECL_ACCESSORS(construct_stub, Code) | 7508   DECL_ACCESSORS(construct_stub, Code) | 
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 8087 #endif | 8084 #endif | 
| 8088   static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction); | 8085   static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction); | 
| 8089   static const int kNativeByteOffset = BYTE_OFFSET(kNative); | 8086   static const int kNativeByteOffset = BYTE_OFFSET(kNative); | 
| 8090   static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind); | 8087   static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind); | 
| 8091   static const int kHasDuplicateParametersByteOffset = | 8088   static const int kHasDuplicateParametersByteOffset = | 
| 8092       BYTE_OFFSET(kHasDuplicateParameters); | 8089       BYTE_OFFSET(kHasDuplicateParameters); | 
| 8093   static const int kMarkedForTierUpByteOffset = BYTE_OFFSET(kMarkedForTierUp); | 8090   static const int kMarkedForTierUpByteOffset = BYTE_OFFSET(kMarkedForTierUp); | 
| 8094 #undef BYTE_OFFSET | 8091 #undef BYTE_OFFSET | 
| 8095 | 8092 | 
| 8096  private: | 8093  private: | 
| 8097   // Returns entry from optimized code map for specified context and OSR entry. | 8094   // Returns entry from optimized code map for specified context. | 
| 8098   // The result is either kNotFound, or a start index of the context-dependent | 8095   // The result is either kNotFound, or a start index of the context-dependent | 
| 8099   // entry. | 8096   // entry. | 
| 8100   int SearchOptimizedCodeMapEntry(Context* native_context, | 8097   int SearchOptimizedCodeMapEntry(Context* native_context); | 
| 8101                                   BailoutId osr_ast_id); |  | 
| 8102 | 8098 | 
| 8103   DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 8099   DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); | 
| 8104 }; | 8100 }; | 
| 8105 | 8101 | 
| 8106 | 8102 | 
| 8107 // Printing support. | 8103 // Printing support. | 
| 8108 struct SourceCodeOf { | 8104 struct SourceCodeOf { | 
| 8109   explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) | 8105   explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) | 
| 8110       : value(v), max_length(max) {} | 8106       : value(v), max_length(max) {} | 
| 8111   const SharedFunctionInfo* value; | 8107   const SharedFunctionInfo* value; | 
| (...skipping 3871 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 11983     } | 11979     } | 
| 11984     return value; | 11980     return value; | 
| 11985   } | 11981   } | 
| 11986 }; | 11982 }; | 
| 11987 | 11983 | 
| 11988 | 11984 | 
| 11989 }  // NOLINT, false-positive due to second-order macros. | 11985 }  // NOLINT, false-positive due to second-order macros. | 
| 11990 }  // NOLINT, false-positive due to second-order macros. | 11986 }  // NOLINT, false-positive due to second-order macros. | 
| 11991 | 11987 | 
| 11992 #endif  // V8_OBJECTS_H_ | 11988 #endif  // V8_OBJECTS_H_ | 
| OLD | NEW | 
|---|