Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Issue 8199004: Reimplement Function.prototype.bind. (Closed)

Created:
9 years, 2 months ago by Lasse Reichstein
Modified:
9 years, 2 months ago
Reviewers:
PhistucK, rossberg
CC:
v8-dev
Visibility:
Public.

Description

Reimplement Function.prototype.bind. Make instanceof work correctly. BUG=v8:893 Committed: http://code.google.com/p/v8/source/detail?r=9659

Patch Set 1 #

Total comments: 5

Patch Set 2 : Reading length of function proxies as property of proxy. #

Total comments: 10

Patch Set 3 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+529 lines, -222 lines) Patch
M src/arm/code-stubs-arm.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/arm/macro-assembler-arm.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 chunks +11 lines, -1 line 0 comments Download
M src/factory.cc View 1 1 chunk +13 lines, -9 lines 0 comments Download
M src/heap.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.h View 2 chunks +5 lines, -1 line 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 3 chunks +24 lines, -1 line 0 comments Download
M src/macros.py View 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.h View 1 4 chunks +19 lines, -3 lines 0 comments Download
M src/objects-inl.h View 1 2 chunks +30 lines, -1 line 0 comments Download
M src/profile-generator.cc View 1 1 chunk +4 lines, -2 lines 0 comments Download
M src/runtime.h View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/runtime.cc View 1 5 chunks +108 lines, -50 lines 0 comments Download
M src/runtime.js View 1 chunk +6 lines, -0 lines 0 comments Download
M src/v8natives.js View 1 2 chunks +42 lines, -54 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/x64/macro-assembler-x64.h View 3 chunks +6 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.cc View 3 chunks +20 lines, -1 line 0 comments Download
M test/mjsunit/function-bind.js View 1 2 3 chunks +124 lines, -42 lines 0 comments Download
M test/mjsunit/harmony/proxies-function.js View 1 2 7 chunks +101 lines, -46 lines 0 comments Download
M test/mjsunit/regress/regress-1229.js View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Lasse Reichstein
9 years, 2 months ago (2011-10-07 14:39:31 UTC) #1
PhistucK
Just a passerby. http://codereview.chromium.org/8199004/diff/1/src/objects.h File src/objects.h (right): http://codereview.chromium.org/8199004/diff/1/src/objects.h#newcode4960 src/objects.h:4960: // Allows to use byte-witgh instructions. ...
9 years, 2 months ago (2011-10-10 06:44:44 UTC) #2
Lasse Reichstein
Andreas, any comments? I'm particularly wary at the proxy-interaction. I hope I got it right. ...
9 years, 2 months ago (2011-10-13 13:10:38 UTC) #3
rossberg
LGTM. I just ran some additional proxy tests against this patch, and it seems to ...
9 years, 2 months ago (2011-10-13 14:25:01 UTC) #4
Lasse Reichstein
Please take another look. I fixed the length calculation, by doing it in JS. I ...
9 years, 2 months ago (2011-10-14 11:19:37 UTC) #5
rossberg
Have you actually uploaded your latest changes? ;)
9 years, 2 months ago (2011-10-17 09:38:02 UTC) #6
Lasse Reichstein
I did upload it ... just not with the correct issue number *cough*. Please look ...
9 years, 2 months ago (2011-10-17 10:53:16 UTC) #7
rossberg
LGTM > Fixed the layout and added missing semicolons while I was there (semicolons: it's ...
9 years, 2 months ago (2011-10-17 11:49:08 UTC) #8
Lasse Reichstein
9 years, 2 months ago (2011-10-17 12:38:39 UTC) #9
http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/function-bind.js
File test/mjsunit/function-bind.js (right):

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/function-bind.j...
test/mjsunit/function-bind.js:107: // Several parameters can be given, and given
in different bind invokations.
Fixed.

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
File test/mjsunit/harmony/proxies-function.js (right):

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
test/mjsunit/harmony/proxies-function.js:32: 
I'll undo the manual semicolon insertions so you won't get too many conflicts -
then you can add them yourself :)

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
test/mjsunit/harmony/proxies-function.js:35: handler.fix = function() { return {
length: { value: 2 } }; };
Ok, removing fix for fix.

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
test/mjsunit/harmony/proxies-function.js:51: var handler = {
Done.

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
test/mjsunit/harmony/proxies-function.js:208: var f =
Proxy.createFunction(handler, callTrap);
Right, no call to bind here. Undoing.

http://codereview.chromium.org/8199004/diff/9001/test/mjsunit/harmony/proxies...
test/mjsunit/harmony/proxies-function.js:247: fix: function() { return { length:
{ value: 2 } }; },
Removing length from fix here too.

Powered by Google App Engine
This is Rietveld 408576698