Rename ArrayMode::supportsLength to supportsSelfLength
https://bugs.webkit.org/show_bug.cgi?id=156374
Reviewed by Filip Pizlo.
The name supportsLength is confusing because TypedArray have a
length function however it is on the prototype and not on the
instance. supportsSelfLength makes more sense since we use the
function during fixup to tell if we can intrinsic the length
property lookup on self accesses.
* dfg/DFGArrayMode.h:
(JSC::DFG::ArrayMode::supportsSelfLength):
(JSC::DFG::ArrayMode::supportsLength): Deleted.
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@199203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index b26258f..36a126e 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,3 +1,22 @@
+2016-04-07 Keith Miller <keith_miller@apple.com>
+
+ Rename ArrayMode::supportsLength to supportsSelfLength
+ https://bugs.webkit.org/show_bug.cgi?id=156374
+
+ Reviewed by Filip Pizlo.
+
+ The name supportsLength is confusing because TypedArray have a
+ length function however it is on the prototype and not on the
+ instance. supportsSelfLength makes more sense since we use the
+ function during fixup to tell if we can intrinsic the length
+ property lookup on self accesses.
+
+ * dfg/DFGArrayMode.h:
+ (JSC::DFG::ArrayMode::supportsSelfLength):
+ (JSC::DFG::ArrayMode::supportsLength): Deleted.
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):
+
2016-04-07 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
diff --git a/Source/JavaScriptCore/dfg/DFGArrayMode.h b/Source/JavaScriptCore/dfg/DFGArrayMode.h
index a170fe6..749ce2b 100644
--- a/Source/JavaScriptCore/dfg/DFGArrayMode.h
+++ b/Source/JavaScriptCore/dfg/DFGArrayMode.h
@@ -349,7 +349,7 @@
}
}
- bool supportsLength() const
+ bool supportsSelfLength() const
{
switch (type()) {
case Array::SelectUsingPredictions:
diff --git a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
index 2201aa4..05cd2da 100644
--- a/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
+++ b/Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
@@ -2214,7 +2214,7 @@
attemptToForceStringArrayModeByToStringConversion<StringOrStringObjectUse>(arrayMode, node);
}
- if (!arrayMode.supportsLength())
+ if (!arrayMode.supportsSelfLength())
return false;
convertToGetArrayLength(node, arrayMode);