Reviewers: dcarney (ooto), rossberg,
Message:
The bulk of the changes in this patch are to the API layer. They are
compatible
changes.
Internally, I changed use of AccessorGetterCallback to use
AccessorNameGetterCallback, and the same for the setters. (The difference
is
that the one with Name passes the name as a Name, whereas the other one
passes
it as a string.) These should be compatible -- although calling an
AccessorGetterCallback as if it were an AccessorNameGetterCallback isn't
strictly C++-legal, AFAIU, I don't think there are problems with V8's
targets,
and this minifies the change to the code generator.
Description:
Support symbol-named properties in API
Add new "Name" type to API that is a supertype of Symbol and String.
Object::SetDeclaredAccessor, Object::SetAccessorProperty, Template::Set,
Template::SetAccessorProperty, and Template::SetDeclaredAccessor now
take a Name as the property name instead of a String.
Add Object::SetAccessor, Template::SetNativeDataProperty, and
ObjectTemplate::SetAccessor overloads that can define accessors for
symbol-named properties.
[email protected], [email protected]
BUG=v8:3394
TEST=cctest/test-api/TestSymbolProperties
LOG=Y
Please review this at https://codereview.chromium.org/459413002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+256, -112 lines):
M include/v8.h
M src/accessors.h
M src/accessors.cc
M src/api.h
M src/api.cc
M src/arguments.h
M src/arm64/simulator-arm64.cc
M src/assembler.h
M src/objects.cc
M src/stub-cache.cc
M test/cctest/test-alloc.cc
M test/cctest/test-api.cc
--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.