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

Side by Side Diff: src/objects.h

Issue 2874453002: [turbofan] Boost performance of Array.prototype.shift by 4x. (Closed)
Patch Set: Cosmetic fixes. Created 3 years, 7 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/crankshaft/hydrogen.cc ('k') | test/mjsunit/array-shift5.js » ('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 9580 matching lines...) Expand 10 before | Expand all | Expand 10 after
9591 DECLARE_PRINTER(JSArray) 9591 DECLARE_PRINTER(JSArray)
9592 DECLARE_VERIFIER(JSArray) 9592 DECLARE_VERIFIER(JSArray)
9593 9593
9594 // Number of element slots to pre-allocate for an empty array. 9594 // Number of element slots to pre-allocate for an empty array.
9595 static const int kPreallocatedArrayElements = 4; 9595 static const int kPreallocatedArrayElements = 4;
9596 9596
9597 // Layout description. 9597 // Layout description.
9598 static const int kLengthOffset = JSObject::kHeaderSize; 9598 static const int kLengthOffset = JSObject::kHeaderSize;
9599 static const int kSize = kLengthOffset + kPointerSize; 9599 static const int kSize = kLengthOffset + kPointerSize;
9600 9600
9601 // Max. number of elements being copied in Array builtins.
9602 static const int kMaxCopyElements = 16;
9603
9601 static const int kInitialMaxFastElementArray = 9604 static const int kInitialMaxFastElementArray =
9602 (kMaxRegularHeapObjectSize - FixedArray::kHeaderSize - kSize - 9605 (kMaxRegularHeapObjectSize - FixedArray::kHeaderSize - kSize -
9603 AllocationMemento::kSize) / 9606 AllocationMemento::kSize) /
9604 kPointerSize; 9607 kPointerSize;
9605 9608
9606 private: 9609 private:
9607 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray); 9610 DISALLOW_IMPLICIT_CONSTRUCTORS(JSArray);
9608 }; 9611 };
9609 9612
9610 9613
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
10236 } 10239 }
10237 }; 10240 };
10238 10241
10239 10242
10240 } // NOLINT, false-positive due to second-order macros. 10243 } // NOLINT, false-positive due to second-order macros.
10241 } // NOLINT, false-positive due to second-order macros. 10244 } // NOLINT, false-positive due to second-order macros.
10242 10245
10243 #include "src/objects/object-macros-undef.h" 10246 #include "src/objects/object-macros-undef.h"
10244 10247
10245 #endif // V8_OBJECTS_H_ 10248 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | test/mjsunit/array-shift5.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698