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

Unified Diff: src/objects.h

Issue 9428026: Cleaned up setting of accessors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 7068b980c7b588a1960ba23c3b25696a6511a420..6ac353d330dba69c76673c2aaf966fa5e0f6772f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -2139,10 +2139,16 @@ class JSObject: public JSReceiver {
String* name,
Object* structure,
PropertyAttributes attributes);
- MUST_USE_RESULT MaybeObject* DefineGetterSetter(
+ MUST_USE_RESULT MaybeObject* DefineElementAccessor(
+ uint32_t index,
+ bool is_getter,
+ Object* fun,
+ PropertyAttributes attributes);
+ MUST_USE_RESULT MaybeObject* DefinePropertyAccessor(
String* name,
+ bool is_getter,
+ Object* fun,
PropertyAttributes attributes);
-
void LookupInDescriptor(String* name, LookupResult* result);
// Returns the hidden properties backing store object, currently
@@ -7837,6 +7843,15 @@ class AccessorPair: public Struct {
MUST_USE_RESULT MaybeObject* CopyWithoutTransitions();
+ // TODO(svenpanne) Evil temporary helper, will vanish soon...
+ void set(bool modify_getter, Object* value) {
+ if (modify_getter) {
+ set_getter(value);
+ } else {
+ set_setter(value);
+ }
+ }
+
#ifdef OBJECT_PRINT
void AccessorPairPrint(FILE* out = stdout);
#endif
« no previous file with comments | « src/heap.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698