[es6] Initial steps towards a correct implementation of IsCallable.
authorbmeurer <bmeurer@chromium.org>
Thu, 3 Sep 2015 06:01:12 +0000 (23:01 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 3 Sep 2015 06:01:32 +0000 (06:01 +0000)
commit8a378f46d52ce64578c71313ed76a67592fbf63c
treee2c839d47a6ff15a8df6b373ca8d017761998dfd
parentddb1a6b37853a6f7ff95bd9d07f118b09e558a9e
[es6] Initial steps towards a correct implementation of IsCallable.

This turns the has_instance_call_handler bit on Map into an is_callable
bit, that matches the spec definition of IsCallable (i.e. instances have
[[Call]] internal methods).

Also fix the typeof operator to properly say "function" for everything
that is callable.

Also remove the (unused) premature %_GetPrototype optimization from
Crankshaft, which just complicated the Map bit swap.

R=mstarzinger@chromium.org, rossberg@chromium.org, yangguo@chromium.org
CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg

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

Cr-Commit-Position: refs/heads/master@{#30552}
50 files changed:
src/api-natives.cc
src/api.cc
src/arm/lithium-codegen-arm.cc
src/arm/macro-assembler-arm.cc
src/arm/macro-assembler-arm.h
src/arm64/lithium-codegen-arm64.cc
src/array.js
src/bootstrapper.cc
src/builtins.cc
src/code-stubs-hydrogen.cc
src/collection.js
src/execution.cc
src/execution.h
src/factory.cc
src/factory.h
src/full-codegen/arm/full-codegen-arm.cc
src/full-codegen/arm64/full-codegen-arm64.cc
src/full-codegen/ia32/full-codegen-ia32.cc
src/full-codegen/mips/full-codegen-mips.cc
src/full-codegen/mips64/full-codegen-mips64.cc
src/full-codegen/x64/full-codegen-x64.cc
src/harmony-array.js
src/hydrogen-instructions.cc
src/hydrogen-instructions.h
src/hydrogen.cc
src/hydrogen.h
src/ia32/lithium-codegen-ia32.cc
src/json.js
src/macros.py
src/mips/lithium-codegen-mips.cc
src/mips64/lithium-codegen-mips64.cc
src/object-observe.js
src/objects-debug.cc
src/objects-inl.h
src/objects-printer.cc
src/objects.cc
src/objects.h
src/promise.js
src/proxy.js
src/runtime.js
src/runtime/runtime-classes.cc
src/runtime/runtime-function.cc
src/runtime/runtime-internal.cc
src/runtime/runtime-proxy.cc
src/runtime/runtime.h
src/string.js
src/v8natives.js
src/weak-collection.js
src/x64/lithium-codegen-x64.cc
test/cctest/test-api.cc