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

Issue 2431223005: Implement DefineOwnProperty for TypedArrays (Closed)

Created:
4 years, 2 months ago by Henrique Ferreiro
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement DefineOwnProperty for TypedArrays TypedArrays need specific checks before calling OrdinaryDefineOwnProperty. BUG=v8:5328 Committed: https://crrev.com/bc1a3820c27ea869fcc7033ce4f72d9f2105992d Cr-Commit-Position: refs/heads/master@{#41333}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Implement DefineOwnProperty for TypedArrays #

Total comments: 17

Patch Set 3 : address comments and throw when needed #

Total comments: 1

Patch Set 4 : set correct descriptor #

Total comments: 8

Patch Set 5 : Run git cl format #

Patch Set 6 : Fix tests and a type conversion mistake #

Total comments: 8

Patch Set 7 : Refactor CanonicalNumericIndexString and fix tests #

Total comments: 6

Patch Set 8 : Correct use of assertThrows #

Total comments: 4

Patch Set 9 : Use function arrow for assertThrows #

Total comments: 5

Patch Set 10 : fix punctuation, variable name and formatting #

Patch Set 11 : Fix GCMole warning #

Total comments: 1

Patch Set 12 : move assignment out of comparison #

Patch Set 13 : formatting fixes #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -14 lines) Patch
M src/messages.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +98 lines, -3 lines 0 comments Download
M test/mjsunit/element-accessor.js View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -3 lines 3 comments Download
M test/test262/test262.status View 1 2 3 4 5 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 74 (20 generated)
Henrique Ferreiro
4 years, 2 months ago (2016-10-20 12:10:59 UTC) #3
caitp
https://codereview.chromium.org/2431223005/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/1/src/objects.cc#newcode17445 src/objects.cc:17445: if (std::floor(std::abs(d)) != std::abs(d)) return false; Why the std::floor() ...
4 years, 2 months ago (2016-10-20 15:39:21 UTC) #4
Henrique Ferreiro
I think I got all comments sorted through. https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17503 src/objects.cc:17503: if ...
4 years, 1 month ago (2016-10-24 11:56:11 UTC) #5
caitp
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17454 src/objects.cc:17454: return (n->IsSmi() || (std::isfinite(d) && FastD2I(d) == d)) && ...
4 years, 1 month ago (2016-10-24 13:44:02 UTC) #6
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17454 src/objects.cc:17454: return (n->IsSmi() || (std::isfinite(d) && FastD2I(d) == d)) && ...
4 years, 1 month ago (2016-10-25 12:02:20 UTC) #7
caitp
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17454 src/objects.cc:17454: return (n->IsSmi() || (std::isfinite(d) && FastD2I(d) == d)) && ...
4 years, 1 month ago (2016-10-25 12:53:38 UTC) #8
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17503 src/objects.cc:17503: if (!desc->has_writable()) desc->set_writable(true); On 2016/10/25 12:53:38, caitp wrote: > ...
4 years, 1 month ago (2016-10-27 11:45:26 UTC) #9
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/40001/src/messages.h File src/messages.h (left): https://codereview.chromium.org/2431223005/diff/40001/src/messages.h#oldcode507 src/messages.h:507: T(InvalidTypedArrayOffset, "Start offset is too large:") \ it isn't ...
4 years, 1 month ago (2016-10-27 11:56:52 UTC) #10
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17503 src/objects.cc:17503: if (!desc->has_writable()) desc->set_writable(true); On 2016/10/25 12:53:38, caitp wrote: > ...
4 years, 1 month ago (2016-11-08 23:29:00 UTC) #11
caitp
https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17503 src/objects.cc:17503: if (!desc->has_writable()) desc->set_writable(true); On 2016/11/08 23:29:00, hferreiro wrote: > ...
4 years, 1 month ago (2016-11-08 23:55:33 UTC) #12
Henrique Ferreiro
On 2016/11/08 at 23:55:33, caitp wrote: > https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc > File src/objects.cc (right): > > https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc#newcode17503 ...
4 years, 1 month ago (2016-11-09 00:06:30 UTC) #13
caitp
On 2016/11/09 00:06:30, hferreiro wrote: > On 2016/11/08 at 23:55:33, caitp wrote: > > https://codereview.chromium.org/2431223005/diff/20001/src/objects.cc ...
4 years, 1 month ago (2016-11-14 19:35:03 UTC) #15
Dan Ehrenberg
Looks like a clean, correct implementation to me. A couple small things: - You need ...
4 years, 1 month ago (2016-11-15 11:28:16 UTC) #20
Camillo Bruni
https://codereview.chromium.org/2431223005/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/60001/src/objects.cc#newcode17440 src/objects.cc:17440: static Handle<Object> CanonicalNumericIndexString(Isolate* isolate, nit: use an anonymous namespace ...
4 years, 1 month ago (2016-11-15 13:07:23 UTC) #21
Henrique Ferreiro
Fixed tests and a type conversion mistake that was hidden by not updating test262 expectations. ...
4 years, 1 month ago (2016-11-15 13:07:55 UTC) #22
caitp
https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js#newcode32 test/mjsunit/element-accessor.js:32: var o = new Int32Array(1); On 2016/11/15 13:07:55, hferreiro ...
4 years, 1 month ago (2016-11-15 15:10:57 UTC) #23
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js#newcode32 test/mjsunit/element-accessor.js:32: var o = new Int32Array(1); On 2016/11/15 at 15:10:57, ...
4 years, 1 month ago (2016-11-15 22:03:13 UTC) #24
Henrique Ferreiro
On 2016/11/15 at 11:28:16, littledan wrote: > - Since this takes us from not-throwing to ...
4 years, 1 month ago (2016-11-15 22:09:33 UTC) #25
caitp
https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js#newcode34 test/mjsunit/element-accessor.js:34: assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); On 2016/11/15 22:03:13, hferreiro wrote: > ...
4 years, 1 month ago (2016-11-15 22:13:51 UTC) #26
caitp
https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js#newcode34 test/mjsunit/element-accessor.js:34: assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); On 2016/11/15 22:13:50, caitp wrote: > ...
4 years, 1 month ago (2016-11-15 22:17:01 UTC) #27
Henrique Ferreiro
On 2016/11/15 at 22:17:01, caitp wrote: > https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js > File test/mjsunit/element-accessor.js (right): > > https://codereview.chromium.org/2431223005/diff/100001/test/mjsunit/element-accessor.js#newcode34 ...
4 years, 1 month ago (2016-11-15 22:21:51 UTC) #28
Henrique Ferreiro
On 2016/11/15 at 13:07:23, cbruni wrote: > https://codereview.chromium.org/2431223005/diff/60001/src/objects.cc > File src/objects.cc (right): > > https://codereview.chromium.org/2431223005/diff/60001/src/objects.cc#newcode17440 ...
4 years, 1 month ago (2016-11-16 10:13:20 UTC) #29
Camillo Bruni
On 2016/11/16 at 10:13:20, henrique.ferreiro wrote: > On 2016/11/15 at 13:07:23, cbruni wrote: > > ...
4 years, 1 month ago (2016-11-16 11:54:47 UTC) #30
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/120001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/120001/src/objects.cc#newcode17484 src/objects.cc:17484: if (double_index->IsMinusZero() || !double_index->ToUint32(&index)) { ToUint32 doesn't check for ...
4 years, 1 month ago (2016-11-17 12:11:02 UTC) #31
caitp
https://codereview.chromium.org/2431223005/diff/120001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/120001/src/objects.cc#newcode17484 src/objects.cc:17484: if (double_index->IsMinusZero() || !double_index->ToUint32(&index)) { On 2016/11/17 12:11:02, hferreiro ...
4 years, 1 month ago (2016-11-17 15:13:22 UTC) #32
caitp
https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (left): https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#oldcode34 test/mjsunit/element-accessor.js:34: assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); this old test was wrong per ...
4 years, 1 month ago (2016-11-17 15:24:42 UTC) #33
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (left): https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#oldcode34 test/mjsunit/element-accessor.js:34: assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); On 2016/11/17 at 15:24:42, caitp wrote: ...
4 years, 1 month ago (2016-11-18 09:27:08 UTC) #34
caitp
https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (left): https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#oldcode34 test/mjsunit/element-accessor.js:34: assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); On 2016/11/18 09:27:07, hferreiro wrote: > ...
4 years, 1 month ago (2016-11-18 14:47:51 UTC) #35
Henrique Ferreiro
On 2016/11/18 at 14:47:51, caitp wrote: > https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js > File test/mjsunit/element-accessor.js (left): > > https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#oldcode34 ...
4 years, 1 month ago (2016-11-18 15:59:33 UTC) #36
Dan Ehrenberg
https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#newcode33 test/mjsunit/element-accessor.js:33: assertThrows('Object.defineProperty(o, "0", {get: function(){}})'); Nit: For new tests, pass ...
4 years, 1 month ago (2016-11-18 16:03:52 UTC) #37
Henrique Ferreiro
On 2016/11/18 at 16:03:52, littledan wrote: > https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js > File test/mjsunit/element-accessor.js (right): > > https://codereview.chromium.org/2431223005/diff/120001/test/mjsunit/element-accessor.js#newcode33 ...
4 years, 1 month ago (2016-11-21 21:47:04 UTC) #38
caitp
lgtm /cc jkummerow about the fixed TODO https://codereview.chromium.org/2431223005/diff/140001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/140001/test/mjsunit/element-accessor.js#newcode35 test/mjsunit/element-accessor.js:35: }, TypeError); ...
4 years, 1 month ago (2016-11-21 22:02:36 UTC) #40
Henrique Ferreiro
https://codereview.chromium.org/2431223005/diff/140001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/140001/test/mjsunit/element-accessor.js#newcode35 test/mjsunit/element-accessor.js:35: }, TypeError); On 2016/11/21 at 22:02:36, caitp wrote: > ...
4 years, 1 month ago (2016-11-21 22:38:11 UTC) #41
Jakob Kummerow
ACK. https://codereview.chromium.org/2431223005/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/160001/src/objects.cc#newcode6552 src/objects.cc:6552: // DefineOwnPropertyIgnoreAttributes, can handle arguments (ES6 9.4.4.2) nit: ...
4 years, 1 month ago (2016-11-22 10:39:16 UTC) #42
Camillo Bruni
LGTM minus var name https://codereview.chromium.org/2431223005/diff/160001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/160001/src/objects.cc#newcode17477 src/objects.cc:17477: Handle<Object> double_index; You call this ...
4 years, 1 month ago (2016-11-22 15:20:11 UTC) #43
Henrique Ferreiro
> https://codereview.chromium.org/2431223005/diff/160001/src/objects.cc#newcode17473 > src/objects.cc:17473: // ToPropertyKey returns Smi's too > ToPropertyKey isn't called here? Just ...
4 years ago (2016-11-24 12:46:05 UTC) #44
Henrique Ferreiro
I think I have addressed every issue. If you think it is ok, I'll commit ...
4 years ago (2016-11-27 22:23:44 UTC) #49
caitp
https://codereview.chromium.org/2431223005/diff/200001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2431223005/diff/200001/src/objects.cc#newcode17454 src/objects.cc:17454: (str = Object::ToString(isolate, value).ToHandleChecked()) Please put the handle assignment ...
4 years ago (2016-11-27 23:01:00 UTC) #50
Henrique Ferreiro
On 2016/11/27 23:01:00, caitp wrote: > https://codereview.chromium.org/2431223005/diff/200001/src/objects.cc > File src/objects.cc (right): > > https://codereview.chromium.org/2431223005/diff/200001/src/objects.cc#newcode17454 > ...
4 years ago (2016-11-28 10:57:34 UTC) #51
Jakob Kummerow
lgtm
4 years ago (2016-11-28 11:58:01 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2431223005/220001
4 years ago (2016-11-28 21:45:24 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/29512)
4 years ago (2016-11-28 21:48:52 UTC) #57
caitp
On 2016/11/28 21:48:52, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years ago (2016-11-28 22:49:33 UTC) #58
Henrique Ferreiro
On 2016/11/28 22:49:33, caitp wrote: > On 2016/11/28 21:48:52, commit-bot: I haz the power wrote: ...
4 years ago (2016-11-28 22:54:35 UTC) #59
Dan Ehrenberg
It doesn't look like this patch does anything to collect data on how often the ...
4 years ago (2016-11-28 22:54:36 UTC) #60
Henrique Ferreiro
On 2016/11/28 22:54:36, Dan Ehrenberg wrote: > It doesn't look like this patch does anything ...
4 years ago (2016-11-28 22:58:22 UTC) #61
Dan Ehrenberg
https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js#newcode34 test/mjsunit/element-accessor.js:34: () => Object.defineProperty(o, '0', {get: function() {}}), TypeError); Looks ...
4 years ago (2016-11-28 23:01:40 UTC) #62
caitp
https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js#newcode34 test/mjsunit/element-accessor.js:34: () => Object.defineProperty(o, '0', {get: function() {}}), TypeError); On ...
4 years ago (2016-11-28 23:10:10 UTC) #63
Henrique Ferreiro
On 2016/11/28 23:01:40, Dan Ehrenberg wrote: > https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js > File test/mjsunit/element-accessor.js (right): > > https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js#newcode34 ...
4 years ago (2016-11-28 23:13:06 UTC) #64
Dan Ehrenberg
https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js File test/mjsunit/element-accessor.js (right): https://codereview.chromium.org/2431223005/diff/240001/test/mjsunit/element-accessor.js#newcode34 test/mjsunit/element-accessor.js:34: () => Object.defineProperty(o, '0', {get: function() {}}), TypeError); On ...
4 years ago (2016-11-28 23:13:14 UTC) #65
Dan Ehrenberg
lgtm
4 years ago (2016-11-28 23:25:41 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2431223005/240001
4 years ago (2016-11-28 23:30:54 UTC) #69
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years ago (2016-11-29 00:07:46 UTC) #72
commit-bot: I haz the power
4 years ago (2016-11-29 00:08:07 UTC) #74
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/bc1a3820c27ea869fcc7033ce4f72d9f2105992d
Cr-Commit-Position: refs/heads/master@{#41333}

Powered by Google App Engine
This is Rietveld 408576698