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

Side by Side Diff: src/objects.h

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

Powered by Google App Engine
This is Rietveld 408576698