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

Side by Side Diff: src/objects.h

Issue 2774553003: Fast body iteration for objects without unboxed fields. (Closed)
Patch Set: simplify Created 3 years, 9 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 | « no previous file | src/objects-body-descriptors.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 #include <memory> 9 #include <memory>
10 10
(...skipping 2534 matching lines...) Expand 10 before | Expand all | Expand 10 after
2545 // its size by more than the 1 entry necessary, so sequentially adding fields 2545 // its size by more than the 1 entry necessary, so sequentially adding fields
2546 // to the same object requires fewer allocations and copies. 2546 // to the same object requires fewer allocations and copies.
2547 static const int kFieldsAdded = 3; 2547 static const int kFieldsAdded = 3;
2548 2548
2549 // Layout description. 2549 // Layout description.
2550 static const int kElementsOffset = JSReceiver::kHeaderSize; 2550 static const int kElementsOffset = JSReceiver::kHeaderSize;
2551 static const int kHeaderSize = kElementsOffset + kPointerSize; 2551 static const int kHeaderSize = kElementsOffset + kPointerSize;
2552 2552
2553 STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize); 2553 STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize);
2554 2554
2555 typedef FlexibleBodyDescriptor<JSReceiver::kPropertiesOffset> BodyDescriptor; 2555 class BodyDescriptor;
2556 2556
2557 // Gets the number of currently used elements. 2557 // Gets the number of currently used elements.
2558 int GetFastElementsUsage(); 2558 int GetFastElementsUsage();
2559 2559
2560 static bool AllCanRead(LookupIterator* it); 2560 static bool AllCanRead(LookupIterator* it);
2561 static bool AllCanWrite(LookupIterator* it); 2561 static bool AllCanWrite(LookupIterator* it);
2562 2562
2563 private: 2563 private:
2564 friend class JSReceiver; 2564 friend class JSReceiver;
2565 friend class Object; 2565 friend class Object;
(...skipping 9026 matching lines...) Expand 10 before | Expand all | Expand 10 after
11592 } 11592 }
11593 }; 11593 };
11594 11594
11595 11595
11596 } // NOLINT, false-positive due to second-order macros. 11596 } // NOLINT, false-positive due to second-order macros.
11597 } // NOLINT, false-positive due to second-order macros. 11597 } // NOLINT, false-positive due to second-order macros.
11598 11598
11599 #include "src/objects/object-macros-undef.h" 11599 #include "src/objects/object-macros-undef.h"
11600 11600
11601 #endif // V8_OBJECTS_H_ 11601 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | src/objects-body-descriptors.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698