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

Issue 2751263003: Give v8::Eternal a direct reference to the handle. (Closed)

Created:
3 years, 9 months ago by jbroman
Modified:
3 years, 9 months ago
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Give v8::Eternal a direct reference to the handle. This makes it more similar to other handle types (like PersistentBase), by simply storing an i::Object** cast to T*. This means that it is not necessary to look up the handle in the eternal handles table to access the underlying value. Like the built-in roots (null, etc.), an eternal handle can never be destroyed, so we don't even need to allocate a separate local handle. Instead, the Local<T> can point directly at the eternal reference. This makes Eternal<T>::Get trivial. Review-Url: https://codereview.chromium.org/2751263003 Cr-Commit-Position: refs/heads/master@{#43912} Committed: https://chromium.googlesource.com/v8/v8/+/4acdb5eec2c79331c47081c23f7d51d3244a2bf0

Patch Set 1 #

Patch Set 2 : Even cheaper -- this makes conversion to Local<T> totally free. #

Patch Set 3 : add needed reinterpret_cast #

Patch Set 4 : . #

Patch Set 5 : Merge branch 'master' into slim-eternal #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -21 lines) Patch
M include/v8.h View 1 2 3 4 3 chunks +11 lines, -12 lines 0 comments Download
M src/api.cc View 1 2 3 4 1 chunk +5 lines, -9 lines 0 comments Download

Messages

Total messages: 34 (27 generated)
jbroman
V8::GetEternal showed up as a little over 1% when I was profiling an approach to ...
3 years, 9 months ago (2017-03-16 18:21:18 UTC) #21
jochen (gone - plz use gerrit)
uh, hum, not sure this is correct Ulan is probably a better reviewer for this
3 years, 9 months ago (2017-03-16 19:19:59 UTC) #23
ulan
lgtm, much cleaner this way. I don't know the reason why indexes were used for ...
3 years, 9 months ago (2017-03-17 10:41:52 UTC) #24
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/2751263003/80001
3 years, 9 months ago (2017-03-17 15:03:46 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel_ng/builds/22735) v8_linux_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
3 years, 9 months ago (2017-03-17 16:16:00 UTC) #29
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/2751263003/80001
3 years, 9 months ago (2017-03-17 17:04:58 UTC) #31
commit-bot: I haz the power
3 years, 9 months ago (2017-03-17 17:23:44 UTC) #34
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/v8/v8/+/4acdb5eec2c79331c47081c23f7d51d3244...

Powered by Google App Engine
This is Rietveld 408576698