Skip to content
Permalink
Browse files
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.



Canonical link: https://commits.webkit.org/103923@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Gavin Barraclough committed May 14, 2012
1 parent 4c8695e commit 71a2f6c65ab40293f57efc05cb06c9acdf230844
Showing 2 changed files with 16 additions and 2 deletions.
@@ -1,3 +1,18 @@
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 @@ class PropertyName {
PropertyName(const Identifier& propertyName)
: m_impl(propertyName.impl())
{
ASSERT(!propertyName.isNull());
}

StringImpl* impl() const { return m_impl; }

0 comments on commit 71a2f6c

Please sign in to comment.