Changeset 231961 in webkit for trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp
- Timestamp:
- May 18, 2018, 10:29:56 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp
r223161 r231961 1 1 /* 2 * Copyright (C) 2015 Apple Inc. All rights reserved.2 * Copyright (C) 2015-2018 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 44 44 } 45 45 46 out.print(m_kind, " of ", m_uid);47 46 switch (m_kind) { 48 47 case Presence: 49 out.print( " at ", offset(), " with attributes ", attributes());48 out.print(m_kind, " of ", m_uid, " at ", offset(), " with attributes ", attributes()); 50 49 return; 51 50 case Absence: 52 51 case AbsenceOfSetEffect: 53 out.print( " with prototype ", inContext(JSValue(prototype()), context));52 out.print(m_kind, " of ", m_uid, " with prototype ", inContext(JSValue(prototype()), context)); 54 53 return; 55 54 case Equivalence: 56 out.print(" with ", inContext(requiredValue(), context)); 55 out.print(m_kind, " of ", m_uid, " with ", inContext(requiredValue(), context)); 56 return; 57 case HasPrototype: 58 out.print(m_kind, " with prototype ", inContext(JSValue(prototype()), context)); 57 59 return; 58 60 } … … 79 81 return false; 80 82 } 81 82 if (!structure->propertyAccessesAreCacheable()) { 83 if (PropertyConditionInternal::verbose) 84 dataLog("Invalid because accesses are not cacheable.\n"); 85 return false; 83 84 switch (m_kind) { 85 case Presence: 86 case Absence: 87 case AbsenceOfSetEffect: 88 case Equivalence: 89 if (!structure->propertyAccessesAreCacheable()) { 90 if (PropertyConditionInternal::verbose) 91 dataLog("Invalid because property accesses are not cacheable.\n"); 92 return false; 93 } 94 break; 95 96 case HasPrototype: 97 if (!structure->prototypeQueriesAreCacheable()) { 98 if (PropertyConditionInternal::verbose) 99 dataLog("Invalid because prototype queries are not cacheable.\n"); 100 return false; 101 } 102 break; 86 103 } 87 104 … … 175 192 } 176 193 194 case HasPrototype: { 195 if (structure->hasPolyProto()) { 196 // FIXME: I think this is too conservative. We can probably prove this if 197 // we have the base. Anyways, we should make this work when integrating 198 // OPC and poly proto. 199 // https://bugs.webkit.org/show_bug.cgi?id=177339 200 return false; 201 } 202 203 if (structure->storedPrototypeObject() != prototype()) { 204 if (PropertyConditionInternal::verbose) { 205 dataLog( 206 "Invalid because the prototype is ", structure->storedPrototype(), " even though " 207 "it should have been ", JSValue(prototype()), "\n"); 208 } 209 return false; 210 } 211 212 return true; 213 } 214 177 215 case Equivalence: { 178 216 if (!base || base->structure() != structure) { … … 227 265 case Equivalence: 228 266 return structure->needImpurePropertyWatchpoint(); 229 default: 230 return false; 231 } 267 case AbsenceOfSetEffect: 268 case HasPrototype: 269 return false; 270 } 271 272 RELEASE_ASSERT_NOT_REACHED(); 273 return false; 232 274 } 233 275 … … 376 418 out.print("Equivalence"); 377 419 return; 420 case JSC::PropertyCondition::HasPrototype: 421 out.print("HasPrototype"); 422 return; 378 423 } 379 424 RELEASE_ASSERT_NOT_REACHED();
Note:
See TracChangeset
for help on using the changeset viewer.