X87: [builtins] Unify the String constructor.
authorchunyang.dai <chunyang.dai@intel.com>
Fri, 18 Sep 2015 11:46:12 +0000 (04:46 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 18 Sep 2015 11:46:34 +0000 (11:46 +0000)
commit55da29f443b6f2cd45ff87a1f2841842f1452971
treecd5e2babb97b5a95e7a3a319805f13eb84b64e19
parent061e2a9b2b1cf70cb1c18ea6425219e8bd592903
X87: [builtins] Unify the String constructor.

port a3d6f6cce317dbe1d31079eb81e15e49f3fb687a (r30759).

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.

BUG=

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

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