Commit 65d4da02 authored by barraclough@apple.com's avatar barraclough@apple.com

Introduce PropertyName class

https://bugs.webkit.org/show_bug.cgi?id=86241

Reviewed by Darin Adler.

This patch introduced a couple of small bugs.

* runtime/PropertyName.h:
(JSC::toUInt32FromCharacters):
    - Returning wrong value for "" - should not convert to 0.
(JSC::PropertyName::PropertyName):
    - Remove the ASSERT, it was a little too aspirational.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@116926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 00b84181
2012-05-13 Gavin Barraclough <barraclough@apple.com>
Introduce PropertyName class
https://bugs.webkit.org/show_bug.cgi?id=86241
Reviewed by Darin Adler.
This patch introduced a couple of small bugs.
* runtime/PropertyName.h:
(JSC::toUInt32FromCharacters):
- Returning wrong value for "" - should not convert to 0.
(JSC::PropertyName::PropertyName):
- Remove the ASSERT, it was a little too aspirational.
2012-05-13 Filip Pizlo <fpizlo@apple.com>
DFG performs incorrect constant folding on double-to-uint32 conversion in
......@@ -35,7 +35,7 @@ ALWAYS_INLINE uint32_t toUInt32FromCharacters(const CharType* characters, unsign
{
// An empty string is not a number.
if (!length)
return 0;
return UINT_MAX;
// Get the first character, turning it into a digit.
uint32_t value = characters[0] - '0';
......@@ -80,7 +80,6 @@ public:
PropertyName(const Identifier& propertyName)
: m_impl(propertyName.impl())
{
ASSERT(!propertyName.isNull());
}
StringImpl* impl() const { return m_impl; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment