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

Side by Side Diff: src/utils.h

Issue 2618553004: [compiler] Collect eager inner functions for compilation during renumbering. (Closed)
Patch Set: Address comments and remove field from ParseInfo Created 3 years, 11 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/list-inl.h ('k') | src/zone/zone.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_UTILS_H_ 5 #ifndef V8_UTILS_H_
6 #define V8_UTILS_H_ 6 #define V8_UTILS_H_
7 7
8 #include <limits.h> 8 #include <limits.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
11 #include <cmath> 11 #include <cmath>
12 12
13 #include "include/v8.h" 13 #include "include/v8.h"
14 #include "src/allocation.h" 14 #include "src/allocation.h"
15 #include "src/base/bits.h" 15 #include "src/base/bits.h"
16 #include "src/base/compiler-specific.h" 16 #include "src/base/compiler-specific.h"
17 #include "src/base/logging.h" 17 #include "src/base/logging.h"
18 #include "src/base/macros.h" 18 #include "src/base/macros.h"
19 #include "src/base/platform/platform.h" 19 #include "src/base/platform/platform.h"
20 #include "src/globals.h" 20 #include "src/globals.h"
21 #include "src/list.h" 21 #include "src/list.h"
22 #include "src/vector.h" 22 #include "src/vector.h"
23 #include "src/zone/zone.h"
23 24
24 namespace v8 { 25 namespace v8 {
25 namespace internal { 26 namespace internal {
26 27
27 // ---------------------------------------------------------------------------- 28 // ----------------------------------------------------------------------------
28 // General helper functions 29 // General helper functions
29 30
30 // Returns the value (0 .. 15) of a hexadecimal character c. 31 // Returns the value (0 .. 15) of a hexadecimal character c.
31 // If c is not a legal hexadecimal character, returns a value < 0. 32 // If c is not a legal hexadecimal character, returns a value < 0.
32 inline int HexValue(uc32 c) { 33 inline int HexValue(uc32 c) {
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 while (i-- > 0) ++t; 1680 while (i-- > 0) ++t;
1680 return *t; 1681 return *t;
1681 } 1682 }
1682 1683
1683 private: 1684 private:
1684 T* head_; 1685 T* head_;
1685 T** tail_; 1686 T** tail_;
1686 DISALLOW_COPY_AND_ASSIGN(ThreadedList); 1687 DISALLOW_COPY_AND_ASSIGN(ThreadedList);
1687 }; 1688 };
1688 1689
1690 // Can be used to create a threaded list of |T|.
1691 template <typename T>
1692 class ThreadedListZoneEntry final : public ZoneObject {
1693 public:
1694 explicit ThreadedListZoneEntry(T value) : value_(value), next_(nullptr) {}
1695
1696 T value() { return value_; }
1697 ThreadedListZoneEntry<T>** next() { return &next_; }
1698
1699 private:
1700 T value_;
1701 ThreadedListZoneEntry<T>* next_;
1702 DISALLOW_COPY_AND_ASSIGN(ThreadedListZoneEntry);
1703 };
1704
1689 } // namespace internal 1705 } // namespace internal
1690 } // namespace v8 1706 } // namespace v8
1691 1707
1692 #endif // V8_UTILS_H_ 1708 #endif // V8_UTILS_H_
OLDNEW
« no previous file with comments | « src/list-inl.h ('k') | src/zone/zone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698