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

Unified Diff: src/objects-inl.h

Issue 1632993003: Revert of Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 598dc18e5d0bc706e5033230b6d539f0a476a193..a824b3b25479fe911bd9afb7ee528cc4ac40a564 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -3391,19 +3391,11 @@
TypeFeedbackVector* LiteralsArray::feedback_vector() const {
- if (length() == 0) {
- return TypeFeedbackVector::cast(
- const_cast<FixedArray*>(FixedArray::cast(this)));
- }
return TypeFeedbackVector::cast(get(kVectorIndex));
}
void LiteralsArray::set_feedback_vector(TypeFeedbackVector* vector) {
- if (length() <= kVectorIndex) {
- DCHECK(vector->length() == 0);
- return;
- }
set(kVectorIndex, vector);
}
@@ -3417,9 +3409,6 @@
set(kFirstLiteralIndex + literal_index, literal);
}
-void LiteralsArray::set_literal_undefined(int literal_index) {
- set_undefined(kFirstLiteralIndex + literal_index);
-}
int LiteralsArray::literals_count() const {
return length() - kFirstLiteralIndex;
@@ -5626,8 +5615,8 @@
ACCESSORS(SharedFunctionInfo, optimized_code_map, FixedArray,
kOptimizedCodeMapOffset)
ACCESSORS(SharedFunctionInfo, construct_stub, Code, kConstructStubOffset)
-ACCESSORS(SharedFunctionInfo, feedback_metadata, TypeFeedbackMetadata,
- kFeedbackMetadataOffset)
+ACCESSORS(SharedFunctionInfo, feedback_vector, TypeFeedbackVector,
+ kFeedbackVectorOffset)
#if TRACE_MAPS
SMI_ACCESSORS(SharedFunctionInfo, unique_id, kUniqueIdOffset)
#endif
@@ -5809,26 +5798,6 @@
set_compiler_hints(hints);
}
-// static
-int SharedFunctionInfo::OffsetToPreviousContext() {
- return FixedArray::kHeaderSize +
- kPointerSize * (kContextOffset - kEntryLength);
-}
-
-int SharedFunctionInfo::OffsetToPreviousCachedCode() {
- return FixedArray::kHeaderSize +
- kPointerSize * (kCachedCodeOffset - kEntryLength);
-}
-
-int SharedFunctionInfo::OffsetToPreviousLiterals() {
- return FixedArray::kHeaderSize +
- kPointerSize * (kLiteralsOffset - kEntryLength);
-}
-
-int SharedFunctionInfo::OffsetToPreviousOsrAstId() {
- return FixedArray::kHeaderSize +
- kPointerSize * (kOsrAstIdOffset - kEntryLength);
-}
BOOL_ACCESSORS(SharedFunctionInfo, compiler_hints, needs_home_object,
kNeedsHomeObject)
@@ -6280,10 +6249,6 @@
code() != builtins->builtin(Builtins::kCompileOptimizedConcurrent);
}
-TypeFeedbackVector* JSFunction::feedback_vector() {
- LiteralsArray* array = literals();
- return array->feedback_vector();
-}
int JSFunction::NumberOfLiterals() {
return literals()->length();
« no previous file with comments | « src/objects-debug.cc ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698