Minor Object.observe optimizations
authorrafaelw@chromium.org <rafaelw@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Jan 2014 20:25:08 +0000 (20:25 +0000)
committerrafaelw@chromium.org <rafaelw@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Jan 2014 20:25:08 +0000 (20:25 +0000)
commit902a05922b07eab5348ca6987e41a7a97c067ea9
tree93f33abd956545a779c905de6de5dbdbdabdbc32
parent480a3aeb6d1b18da5366f1175102b747a9fbea39
Minor Object.observe optimizations

This patch includes the follow two minor optimizations:

1) When Object.unobserve-ing, instead of deleting from changeObservers, set the index position to null, and null-check when iterating elsewhere
2) Isolate creation of null-proto objects inside a utility function

These former (deleting) was clearly showing up in d8 --prof traces and the later was preventing optimization of containing functions because of non-standard literal. Combined, on MDV construction/teardown benchmark, saves about 10%.

Note that this patch also cleans up retrieving objectInfo inside a utility function.

R=rossberg@chromium.org, rossberg
BUG=

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18501 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/object-observe.js