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

Side by Side Diff: src/accessors.h

Issue 459413002: Support symbol-named properties in API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Include a bit that was missing from the previous patch Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/accessors.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ACCESSORS_H_ 5 #ifndef V8_ACCESSORS_H_
6 #define V8_ACCESSORS_H_ 6 #define V8_ACCESSORS_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 25 matching lines...) Expand all
36 V(ScriptSourceMappingUrl) \ 36 V(ScriptSourceMappingUrl) \
37 V(StringLength) 37 V(StringLength)
38 38
39 // Accessors contains all predefined proxy accessors. 39 // Accessors contains all predefined proxy accessors.
40 40
41 class Accessors : public AllStatic { 41 class Accessors : public AllStatic {
42 public: 42 public:
43 // Accessor descriptors. 43 // Accessor descriptors.
44 #define ACCESSOR_INFO_DECLARATION(name) \ 44 #define ACCESSOR_INFO_DECLARATION(name) \
45 static void name##Getter( \ 45 static void name##Getter( \
46 v8::Local<v8::String> name, \ 46 v8::Local<v8::Name> name, \
47 const v8::PropertyCallbackInfo<v8::Value>& info); \ 47 const v8::PropertyCallbackInfo<v8::Value>& info); \
48 static void name##Setter( \ 48 static void name##Setter( \
49 v8::Local<v8::String> name, \ 49 v8::Local<v8::Name> name, \
50 v8::Local<v8::Value> value, \ 50 v8::Local<v8::Value> value, \
51 const v8::PropertyCallbackInfo<void>& info); \ 51 const v8::PropertyCallbackInfo<void>& info); \
52 static Handle<AccessorInfo> name##Info( \ 52 static Handle<AccessorInfo> name##Info( \
53 Isolate* isolate, \ 53 Isolate* isolate, \
54 PropertyAttributes attributes); 54 PropertyAttributes attributes);
55 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION) 55 ACCESSOR_INFO_LIST(ACCESSOR_INFO_DECLARATION)
56 #undef ACCESSOR_INFO_DECLARATION 56 #undef ACCESSOR_INFO_DECLARATION
57 57
58 enum DescriptorId { 58 enum DescriptorId {
59 #define ACCESSOR_INFO_DECLARATION(name) \ 59 #define ACCESSOR_INFO_DECLARATION(name) \
(...skipping 16 matching lines...) Expand all
76 76
77 // Returns true for properties that are accessors to object fields. 77 // Returns true for properties that are accessors to object fields.
78 // If true, *object_offset contains offset of object field. 78 // If true, *object_offset contains offset of object field.
79 template <class T> 79 template <class T>
80 static bool IsJSObjectFieldAccessor(typename T::TypeHandle type, 80 static bool IsJSObjectFieldAccessor(typename T::TypeHandle type,
81 Handle<Name> name, 81 Handle<Name> name,
82 int* object_offset); 82 int* object_offset);
83 83
84 static Handle<AccessorInfo> MakeAccessor( 84 static Handle<AccessorInfo> MakeAccessor(
85 Isolate* isolate, 85 Isolate* isolate,
86 Handle<String> name, 86 Handle<Name> name,
87 AccessorGetterCallback getter, 87 AccessorNameGetterCallback getter,
88 AccessorSetterCallback setter, 88 AccessorNameSetterCallback setter,
89 PropertyAttributes attributes); 89 PropertyAttributes attributes);
90 90
91 static Handle<ExecutableAccessorInfo> CloneAccessor( 91 static Handle<ExecutableAccessorInfo> CloneAccessor(
92 Isolate* isolate, 92 Isolate* isolate,
93 Handle<ExecutableAccessorInfo> accessor); 93 Handle<ExecutableAccessorInfo> accessor);
94 94
95 95
96 private: 96 private:
97 // Helper functions. 97 // Helper functions.
98 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value); 98 static Handle<Object> FlattenNumber(Isolate* isolate, Handle<Object> value);
99 }; 99 };
100 100
101 } } // namespace v8::internal 101 } } // namespace v8::internal
102 102
103 #endif // V8_ACCESSORS_H_ 103 #endif // V8_ACCESSORS_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/accessors.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698