Simplify, speed-up correct-context ObjectObserve calls
authorrafaelw@chromium.org <rafaelw@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 May 2014 19:13:41 +0000 (19:13 +0000)
committerrafaelw@chromium.org <rafaelw@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 28 May 2014 19:13:41 +0000 (19:13 +0000)
commit74f92f21daf8e6d9a9196d2f8fe03c8eadfadaab
tree42b3a82e859e98ddfd868c542669be96d352a753
parent20eeff9ae433374956cd5f2bccf08042734405e2
Simplify, speed-up correct-context ObjectObserve calls

The original patch which ensured that Object.observe did allocations in the correct context regressed performance about 12%. This patch gets back most of that (about 11%) by simply returning the correct function which is then directly callable from JS, rather than by making the call from the runtime function. A side-effect is that their implementation is shorter.

LOG=Y
BUG=NONE
R=verwaest@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21575 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/object-observe.js
src/runtime.cc
src/runtime.h
test/mjsunit/runtime-gen/getobjectcontextnotifierperformchange.js [moved from test/mjsunit/runtime-gen/objectnotifierperformchangeinobjectcontext.js with 59% similarity]
test/mjsunit/runtime-gen/getobjectcontextobjectgetnotifier.js [moved from test/mjsunit/runtime-gen/objectobserveinobjectcontext.js with 62% similarity]
test/mjsunit/runtime-gen/getobjectcontextobjectobserve.js [moved from test/mjsunit/runtime-gen/objectgetnotifierinobjectcontext.js with 82% similarity]