Please sign in to comment.
[Perf] Reduce o_set overhead
Summary: ObjectData's o_set family of functions all took a bool flag "forInit". The flag was used to bypass access checks, and was only used when initializing an ObjectData from hphpi, and from o_setArray. This meant that we were always passing in, and checking a mostly unused parameter. In addition, Object's o_set family didnt have the flag. code-gen didnt differentiate the two cases, and so in some cases was passing the class name as the "forInit" flag. Bizarrely, this mostly worked, because the class-name would be converted to true, and access would be allowed (which is usually the right thing to do in correct programs). With this diff, ObjectData's o_set family matches the Object o_set family, solving the correctness problem, and also reducing the call overhead by dropping a parameter. Test Plan: fast_tests slow_tests Reviewers: qigao, myang Reviewed By: myang CC: ps, mwilliams, myang, qigao Differential Revision: 346544
- Loading branch information...
Showing with 62 additions and 47 deletions.