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

Side by Side Diff: src/objects.h

Issue 2562623003: Revert of Store OSR'd optimized code on the native context. (patchset #8 id:140001 of https://coder… (Closed)
Patch Set: 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 kEntryLength = 3; 7487 static const int kOsrAstIdOffset = 3;
7488 static const int kEntryLength = 4;
7488 static const int kInitialLength = kEntriesStart + kEntryLength; 7489 static const int kInitialLength = kEntriesStart + kEntryLength;
7489 7490
7490 static const int kNotFound = -1; 7491 static const int kNotFound = -1;
7491 7492
7492 // Helpers for assembly code that does a backwards walk of the optimized code 7493 // Helpers for assembly code that does a backwards walk of the optimized code
7493 // map. 7494 // map.
7494 static const int kOffsetToPreviousContext = 7495 static const int kOffsetToPreviousContext =
7495 FixedArray::kHeaderSize + kPointerSize * (kContextOffset - kEntryLength); 7496 FixedArray::kHeaderSize + kPointerSize * (kContextOffset - kEntryLength);
7496 static const int kOffsetToPreviousCachedCode = 7497 static const int kOffsetToPreviousCachedCode =
7497 FixedArray::kHeaderSize + 7498 FixedArray::kHeaderSize +
7498 kPointerSize * (kCachedCodeOffset - kEntryLength); 7499 kPointerSize * (kCachedCodeOffset - kEntryLength);
7499 static const int kOffsetToPreviousLiterals = 7500 static const int kOffsetToPreviousLiterals =
7500 FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength); 7501 FixedArray::kHeaderSize + kPointerSize * (kLiteralsOffset - kEntryLength);
7502 static const int kOffsetToPreviousOsrAstId =
7503 FixedArray::kHeaderSize + kPointerSize * (kOsrAstIdOffset - kEntryLength);
7501 7504
7502 // [scope_info]: Scope info. 7505 // [scope_info]: Scope info.
7503 DECL_ACCESSORS(scope_info, ScopeInfo) 7506 DECL_ACCESSORS(scope_info, ScopeInfo)
7504 7507
7505 // The outer scope info for the purpose of parsing this function, or the hole 7508 // The outer scope info for the purpose of parsing this function, or the hole
7506 // value if it isn't yet known. 7509 // value if it isn't yet known.
7507 DECL_ACCESSORS(outer_scope_info, HeapObject) 7510 DECL_ACCESSORS(outer_scope_info, HeapObject)
7508 7511
7509 // [construct stub]: Code stub for constructing instances of this function. 7512 // [construct stub]: Code stub for constructing instances of this function.
7510 DECL_ACCESSORS(construct_stub, Code) 7513 DECL_ACCESSORS(construct_stub, Code)
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
8086 #endif 8089 #endif
8087 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction); 8090 static const int kStrictModeByteOffset = BYTE_OFFSET(kStrictModeFunction);
8088 static const int kNativeByteOffset = BYTE_OFFSET(kNative); 8091 static const int kNativeByteOffset = BYTE_OFFSET(kNative);
8089 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind); 8092 static const int kFunctionKindByteOffset = BYTE_OFFSET(kFunctionKind);
8090 static const int kHasDuplicateParametersByteOffset = 8093 static const int kHasDuplicateParametersByteOffset =
8091 BYTE_OFFSET(kHasDuplicateParameters); 8094 BYTE_OFFSET(kHasDuplicateParameters);
8092 static const int kMarkedForTierUpByteOffset = BYTE_OFFSET(kMarkedForTierUp); 8095 static const int kMarkedForTierUpByteOffset = BYTE_OFFSET(kMarkedForTierUp);
8093 #undef BYTE_OFFSET 8096 #undef BYTE_OFFSET
8094 8097
8095 private: 8098 private:
8096 // Returns entry from optimized code map for specified context. 8099 // Returns entry from optimized code map for specified context and OSR entry.
8097 // The result is either kNotFound, or a start index of the context-dependent 8100 // The result is either kNotFound, or a start index of the context-dependent
8098 // entry. 8101 // entry.
8099 int SearchOptimizedCodeMapEntry(Context* native_context); 8102 int SearchOptimizedCodeMapEntry(Context* native_context,
8103 BailoutId osr_ast_id);
8100 8104
8101 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo); 8105 DISALLOW_IMPLICIT_CONSTRUCTORS(SharedFunctionInfo);
8102 }; 8106 };
8103 8107
8104 8108
8105 // Printing support. 8109 // Printing support.
8106 struct SourceCodeOf { 8110 struct SourceCodeOf {
8107 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1) 8111 explicit SourceCodeOf(SharedFunctionInfo* v, int max = -1)
8108 : value(v), max_length(max) {} 8112 : value(v), max_length(max) {}
8109 const SharedFunctionInfo* value; 8113 const SharedFunctionInfo* value;
(...skipping 3885 matching lines...) Expand 10 before | Expand all | Expand 10 after
11995 } 11999 }
11996 return value; 12000 return value;
11997 } 12001 }
11998 }; 12002 };
11999 12003
12000 12004
12001 } // NOLINT, false-positive due to second-order macros. 12005 } // NOLINT, false-positive due to second-order macros.
12002 } // NOLINT, false-positive due to second-order macros. 12006 } // NOLINT, false-positive due to second-order macros.
12003 12007
12004 #endif // V8_OBJECTS_H_ 12008 #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