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

Unified Diff: src/type-feedback-vector.cc

Issue 1681143003: [TypeFeedbackVector/Crankshaft] Fix private symbol feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/type-feedback-vector.cc
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc
index 698f2a6d17380d6e0771c5194e2259819b864542..9e60fcffa768559697acabea14bc8cfe29c602b4 100644
--- a/src/type-feedback-vector.cc
+++ b/src/type-feedback-vector.cc
@@ -15,8 +15,13 @@ namespace internal {
static bool IsPropertyNameFeedback(Object* feedback) {
- return feedback->IsString() ||
- (feedback->IsSymbol() && !Symbol::cast(feedback)->is_private());
+ if (feedback->IsString()) return true;
+ if (!feedback->IsSymbol()) return false;
+ Symbol* symbol = Symbol::cast(feedback);
+ Heap* heap = symbol->GetHeap();
+ return symbol != heap->uninitialized_symbol() &&
+ symbol != heap->premonomorphic_symbol() &&
+ symbol != heap->megamorphic_symbol();
}
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698