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

Side by Side Diff: src/regexp-stack.h

Issue 390004: Fix warnings on Win64. (Closed)
Patch Set: Created 11 years, 1 month 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // There is only a limited number of locations below the stack limit, 61 // There is only a limited number of locations below the stack limit,
62 // so users of the stack should check the stack limit during any 62 // so users of the stack should check the stack limit during any
63 // sequence of pushes longer that this. 63 // sequence of pushes longer that this.
64 static Address* limit_address() { return &(thread_local_.limit_); } 64 static Address* limit_address() { return &(thread_local_.limit_); }
65 65
66 // Ensures that there is a memory area with at least the specified size. 66 // Ensures that there is a memory area with at least the specified size.
67 // If passing zero, the default/minimum size buffer is allocated. 67 // If passing zero, the default/minimum size buffer is allocated.
68 static Address EnsureCapacity(size_t size); 68 static Address EnsureCapacity(size_t size);
69 69
70 // Thread local archiving. 70 // Thread local archiving.
71 static size_t ArchiveSpacePerThread() { return sizeof(thread_local_); } 71 static int ArchiveSpacePerThread() {
72 return static_cast<int>(sizeof(thread_local_));
73 }
72 static char* ArchiveStack(char* to); 74 static char* ArchiveStack(char* to);
73 static char* RestoreStack(char* from); 75 static char* RestoreStack(char* from);
74 static void FreeThreadResources() { thread_local_.Free(); } 76 static void FreeThreadResources() { thread_local_.Free(); }
75 77
76 private: 78 private:
77 // Artificial limit used when no memory has been allocated. 79 // Artificial limit used when no memory has been allocated.
78 static const uintptr_t kMemoryTop = static_cast<uintptr_t>(-1); 80 static const uintptr_t kMemoryTop = static_cast<uintptr_t>(-1);
79 81
80 // Minimal size of allocated stack area. 82 // Minimal size of allocated stack area.
81 static const size_t kMinimumStackSize = 1 * KB; 83 static const size_t kMinimumStackSize = 1 * KB;
(...skipping 18 matching lines...) Expand all
100 // After this, the buffer is either the default size, or it is empty, so 102 // After this, the buffer is either the default size, or it is empty, so
101 // you have to call EnsureCapacity before using it again. 103 // you have to call EnsureCapacity before using it again.
102 static void Reset(); 104 static void Reset();
103 105
104 static ThreadLocal thread_local_; 106 static ThreadLocal thread_local_;
105 }; 107 };
106 108
107 }} // namespace v8::internal 109 }} // namespace v8::internal
108 110
109 #endif // V8_REGEXP_STACK_H_ 111 #endif // V8_REGEXP_STACK_H_
OLDNEW
« src/api.cc ('K') | « src/platform-win32.cc ('k') | src/regexp-stack.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698