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

Issue 1157453002: Add basic API support for Map & Set (Closed)

Created:
5 years, 7 months ago by adamk
Modified:
5 years, 6 months ago
CC:
Paweł Hajdan Jr., v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add basic API support for Map & Set Only supports constructing new objects and returning size. Followup patch will need to add ability to retrieve and set contents in order to support structured clone. Also removes a bunch of outdated "experimental" markers from v8.h. BUG=v8:3340 LOG=y Committed: https://crrev.com/395fa8ba2439f7e768376f7512553d66b67d1c87 Cr-Commit-Position: refs/heads/master@{#28637}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -17 lines) Patch
M include/v8.h View 3 chunks +56 lines, -6 lines 0 comments Download
M src/api.h View 3 chunks +8 lines, -0 lines 0 comments Download
M src/api.cc View 2 chunks +44 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 chunk +12 lines, -6 lines 2 comments Download
M src/contexts.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/factory.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/factory.cc View 1 chunk +16 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/runtime/runtime-collections.cc View 2 chunks +14 lines, -4 lines 0 comments Download
M test/cctest/test-api.cc View 1 chunk +34 lines, -0 lines 0 comments Download
M test/cctest/test-hashmap.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (2 generated)
adamk
5 years, 7 months ago (2015-05-21 20:50:08 UTC) #2
jochen (gone - plz use gerrit)
include/ lgtm
5 years, 7 months ago (2015-05-22 09:11:05 UTC) #3
adamk
See also https://codereview.chromium.org/1148383007/ and https://codereview.chromium.org/1155893003/. Happy to smash them together into one if that's preferred.
5 years, 7 months ago (2015-05-22 21:37:22 UTC) #4
arv (Not doing code reviews)
LGTM
5 years, 6 months ago (2015-05-26 16:31:31 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1157453002/1
5 years, 6 months ago (2015-05-26 17:10:21 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 6 months ago (2015-05-26 17:36:57 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/395fa8ba2439f7e768376f7512553d66b67d1c87 Cr-Commit-Position: refs/heads/master@{#28637}
5 years, 6 months ago (2015-05-26 17:37:13 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1157453002/diff/1/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1157453002/diff/1/src/bootstrapper.cc#newcode1221 src/bootstrapper.cc:1221: native_context()->set_js_map_map(js_map_fun->initial_map()); this doesn't work :-/ the prototype of the ...
5 years, 6 months ago (2015-06-01 13:32:27 UTC) #10
adamk
5 years, 6 months ago (2015-06-01 21:30:02 UTC) #11
Message was sent while issue was closed.
https://codereview.chromium.org/1157453002/diff/1/src/bootstrapper.cc
File src/bootstrapper.cc (right):

https://codereview.chromium.org/1157453002/diff/1/src/bootstrapper.cc#newcode...
src/bootstrapper.cc:1221:
native_context()->set_js_map_map(js_map_fun->initial_map());
On 2015/06/01 13:32:27, jochen wrote:
> this doesn't work :-/
> 
> the prototype of the Map() function is overwritten in collection.js which runs
> after this code.
> 
> if you built without a snapshot and create a Map via the C++ API, the
resulting
> object's __proto__ will be Object.prototype
> 
> you should store the function in the native context, and read the initial map
in
> ConfigureGlobalObjects

Good eye, fix up for review at https://codereview.chromium.org/1161363002

Powered by Google App Engine
This is Rietveld 408576698