PPC: [builtins] Unify the String constructor.
authormbrandy <mbrandy@us.ibm.com>
Thu, 17 Sep 2015 17:14:06 +0000 (10:14 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 17 Sep 2015 17:14:16 +0000 (17:14 +0000)
commitb82efa829041c3452a5f5aa4c2ff9a8e884aa240
treeb2a5c0423ea40de9eacce32ed2d8792549907183
parentd5bbd45f044ae6796c0d0f7bd8732069d74418de
PPC: [builtins] Unify the String constructor.

Port a3d6f6cce317dbe1d31079eb81e15e49f3fb687a

Original commit message:
    Implement the String constructor completely as native builtin,
    avoiding the need to do gymnastics in JavaScript builtin to
    properly detect the no argument case (which is different from
    the undefined argument case) and also allowing to just
    tailcall through to ToString or SymbolDescriptiveString for
    the common case. Also the JavaScript builtin was misleading
    since the case for construct call was unused, but could be
    triggered in a wrong way once we support tail calls from
    constructor functions.

    This refactoring allows us to properly implement subclassing
    for String builtins, once we have the correct initial_map on
    derived classes (it's merely a matter of using NewTarget
    instead of the target register now).

    This introduces a new %SymbolDescriptiveString runtime
    entry, which is also used by Symbol.toString() now.

R=bmeurer@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com, dstence@us.ibm.com
BUG=

Review URL: https://codereview.chromium.org/1354663002

Cr-Commit-Position: refs/heads/master@{#30809}
src/ppc/builtins-ppc.cc