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

Side by Side Diff: src/objects.h

Issue 1314053003: Move runtime helper for JSWeakCollection onto objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-runtime-helpers-1
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/api.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 // 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 9427 matching lines...) Expand 10 before | Expand all | Expand 10 after
9438 9438
9439 // Base class for both JSWeakMap and JSWeakSet 9439 // Base class for both JSWeakMap and JSWeakSet
9440 class JSWeakCollection: public JSObject { 9440 class JSWeakCollection: public JSObject {
9441 public: 9441 public:
9442 // [table]: the backing hash table mapping keys to values. 9442 // [table]: the backing hash table mapping keys to values.
9443 DECL_ACCESSORS(table, Object) 9443 DECL_ACCESSORS(table, Object)
9444 9444
9445 // [next]: linked list of encountered weak maps during GC. 9445 // [next]: linked list of encountered weak maps during GC.
9446 DECL_ACCESSORS(next, Object) 9446 DECL_ACCESSORS(next, Object)
9447 9447
9448 static void Initialize(Handle<JSWeakCollection> collection, Isolate* isolate);
9449 static void Set(Handle<JSWeakCollection> collection, Handle<Object> key,
9450 Handle<Object> value, int32_t hash);
9451 static bool Delete(Handle<JSWeakCollection> collection, Handle<Object> key,
9452 int32_t hash);
9453
9448 static const int kTableOffset = JSObject::kHeaderSize; 9454 static const int kTableOffset = JSObject::kHeaderSize;
9449 static const int kNextOffset = kTableOffset + kPointerSize; 9455 static const int kNextOffset = kTableOffset + kPointerSize;
9450 static const int kSize = kNextOffset + kPointerSize; 9456 static const int kSize = kNextOffset + kPointerSize;
9451 9457
9452 private: 9458 private:
9453 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection); 9459 DISALLOW_IMPLICIT_CONSTRUCTORS(JSWeakCollection);
9454 }; 9460 };
9455 9461
9456 9462
9457 // The JSWeakMap describes EcmaScript Harmony weak maps 9463 // The JSWeakMap describes EcmaScript Harmony weak maps
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
10320 } else { 10326 } else {
10321 value &= ~(1 << bit_position); 10327 value &= ~(1 << bit_position);
10322 } 10328 }
10323 return value; 10329 return value;
10324 } 10330 }
10325 }; 10331 };
10326 10332
10327 } } // namespace v8::internal 10333 } } // namespace v8::internal
10328 10334
10329 #endif // V8_OBJECTS_H_ 10335 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698