Reviewers: Yang,
Description:
Provide private symbols through internal APIs
Adds a notion of private symbols, mainly intended for internal use,
especially,
self-hosting of built-in types that would otherwise require new C++ classes.
On the JS side (i.e., in built-ins), private properties can be created and
accessed through a set of macros:
NEW_PRIVATE(print_name)
HAS_PRIVATE(obj, sym)
GET_PRIVATE(obj, sym)
SET_PRIVATE(obj, sym, val)
DELETE_PRIVATE(obj, sym)
In the V8 API, they are accessible via a new class Private, and respective
HasPrivate/Get/Private/SetPrivate/DeletePrivate methods on calss Object.
These APIs are designed and restricted such that their implementation can
later
be replaced by whatever ES7+ will officially provide.
R=yang...@chromium.org
BUG=
Please review this at https://codereview.chromium.org/48923002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+327, -49 lines):
M include/v8.h
M src/api.h
M src/api.cc
M src/factory.h
M src/factory.cc
M src/heap.h
M src/heap.cc
M src/macros.py
M src/messages.js
M src/objects-debug.cc
M src/objects-inl.h
M src/objects.h
M src/objects.cc
M src/parser.cc
M src/runtime.h
M src/runtime.cc
M test/cctest/test-api.cc
M test/mjsunit/harmony/symbols.js
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.