I like your solution. This eliminates the need for special_function_table and
makes it easier to add new special function.
- Please complete the change.
- Cleanup the IC code where special_function_table is used.
- Please add small benchmarks so we can see it works.
//Lars


http://codereview.chromium.org/660298/diff/4/5
File src/bootstrapper.cc (right):

http://codereview.chromium.org/660298/diff/4/5#newcode1465
src/bootstrapper.cc:1465: Handle<JSFunction>
Genesis::MakeFunction(Handle<String> name,
You should change the name of this method to be more specific.

http://codereview.chromium.org/660298/diff/4/5#newcode1502
src/bootstrapper.cc:1502: Handle<JSFunction>
old(JSFunction::cast(prototype->GetProperty(*key)));
You might want an explicit check in debug mode to ensure the original
function is there.

http://codereview.chromium.org/660298/diff/4/6
File src/builtins.cc (right):

http://codereview.chromium.org/660298/diff/4/6#newcode348
src/builtins.cc:348: if (!args.receiver()->IsJSArray()) {
It would be easier to read if you could combine the check:
   Object* rec = args.receiver();
   if (!rec->IsJSArray() || JSArray::cast(rec)->HasFastElements()) {
      // Add nice comment here.
      ... bail out...
   }

http://codereview.chromium.org/660298

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to