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

Side by Side Diff: src/objects.h

Issue 12217025: For HashTable-backed JS objects, use the proper type in the table() accessor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »
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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 8132 matching lines...) Expand 10 before | Expand all | Expand 10 after
8143 8143
8144 private: 8144 private:
8145 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy); 8145 DISALLOW_IMPLICIT_CONSTRUCTORS(JSFunctionProxy);
8146 }; 8146 };
8147 8147
8148 8148
8149 // The JSSet describes EcmaScript Harmony sets 8149 // The JSSet describes EcmaScript Harmony sets
8150 class JSSet: public JSObject { 8150 class JSSet: public JSObject {
8151 public: 8151 public:
8152 // [set]: the backing hash set containing keys. 8152 // [set]: the backing hash set containing keys.
8153 DECL_ACCESSORS(table, Object) 8153 DECL_ACCESSORS(table, ObjectHashSet)
8154 8154
8155 // Casting. 8155 // Casting.
8156 static inline JSSet* cast(Object* obj); 8156 static inline JSSet* cast(Object* obj);
8157 8157
8158 // Dispatched behavior. 8158 // Dispatched behavior.
8159 DECLARE_PRINTER(JSSet) 8159 DECLARE_PRINTER(JSSet)
8160 DECLARE_VERIFIER(JSSet) 8160 DECLARE_VERIFIER(JSSet)
8161 8161
8162 static const int kTableOffset = JSObject::kHeaderSize; 8162 static const int kTableOffset = JSObject::kHeaderSize;
8163 static const int kSize = kTableOffset + kPointerSize; 8163 static const int kSize = kTableOffset + kPointerSize;
8164 8164
8165 private: 8165 private:
8166 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet); 8166 DISALLOW_IMPLICIT_CONSTRUCTORS(JSSet);
8167 }; 8167 };
8168 8168
8169 8169
8170 // The JSMap describes EcmaScript Harmony maps 8170 // The JSMap describes EcmaScript Harmony maps
8171 class JSMap: public JSObject { 8171 class JSMap: public JSObject {
8172 public: 8172 public:
8173 // [table]: the backing hash table mapping keys to values. 8173 // [table]: the backing hash table mapping keys to values.
8174 DECL_ACCESSORS(table, Object) 8174 DECL_ACCESSORS(table, ObjectHashTable)
8175 8175
8176 // Casting. 8176 // Casting.
8177 static inline JSMap* cast(Object* obj); 8177 static inline JSMap* cast(Object* obj);
8178 8178
8179 // Dispatched behavior. 8179 // Dispatched behavior.
8180 DECLARE_PRINTER(JSMap) 8180 DECLARE_PRINTER(JSMap)
8181 DECLARE_VERIFIER(JSMap) 8181 DECLARE_VERIFIER(JSMap)
8182 8182
8183 static const int kTableOffset = JSObject::kHeaderSize; 8183 static const int kTableOffset = JSObject::kHeaderSize;
8184 static const int kSize = kTableOffset + kPointerSize; 8184 static const int kSize = kTableOffset + kPointerSize;
8185 8185
8186 private: 8186 private:
8187 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap); 8187 DISALLOW_IMPLICIT_CONSTRUCTORS(JSMap);
8188 }; 8188 };
8189 8189
8190 8190
8191 // The JSWeakMap describes EcmaScript Harmony weak maps 8191 // The JSWeakMap describes EcmaScript Harmony weak maps
8192 class JSWeakMap: public JSObject { 8192 class JSWeakMap: public JSObject {
8193 public: 8193 public:
8194 // [table]: the backing hash table mapping keys to values. 8194 // [table]: the backing hash table mapping keys to values.
8195 DECL_ACCESSORS(table, Object) 8195 DECL_ACCESSORS(table, ObjectHashTable)
8196 8196
8197 // [next]: linked list of encountered weak maps during GC. 8197 // [next]: linked list of encountered weak maps during GC.
8198 DECL_ACCESSORS(next, Object) 8198 DECL_ACCESSORS(next, Object)
8199 8199
8200 // Casting. 8200 // Casting.
8201 static inline JSWeakMap* cast(Object* obj); 8201 static inline JSWeakMap* cast(Object* obj);
8202 8202
8203 // Dispatched behavior. 8203 // Dispatched behavior.
8204 DECLARE_PRINTER(JSWeakMap) 8204 DECLARE_PRINTER(JSWeakMap)
8205 DECLARE_VERIFIER(JSWeakMap) 8205 DECLARE_VERIFIER(JSWeakMap)
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
8885 } else { 8885 } else {
8886 value &= ~(1 << bit_position); 8886 value &= ~(1 << bit_position);
8887 } 8887 }
8888 return value; 8888 return value;
8889 } 8889 }
8890 }; 8890 };
8891 8891
8892 } } // namespace v8::internal 8892 } } // namespace v8::internal
8893 8893
8894 #endif // V8_OBJECTS_H_ 8894 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698