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

Side by Side Diff: src/allocation.h

Issue 8680013: Remove the static qualifier from functions in header files. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Restored static const references on ARM and MIPS. Created 9 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/api.h » ('j') | src/conversions-inl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2011 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
11 // with the distribution. 11 // with the distribution.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 class AllStatic { 74 class AllStatic {
75 #ifdef DEBUG 75 #ifdef DEBUG
76 public: 76 public:
77 void* operator new(size_t size); 77 void* operator new(size_t size);
78 void operator delete(void* p); 78 void operator delete(void* p);
79 #endif 79 #endif
80 }; 80 };
81 81
82 82
83 template <typename T> 83 template <typename T>
84 static T* NewArray(int size) { 84 T* NewArray(int size) {
85 T* result = new T[size]; 85 T* result = new T[size];
86 if (result == NULL) Malloced::FatalProcessOutOfMemory(); 86 if (result == NULL) Malloced::FatalProcessOutOfMemory();
87 return result; 87 return result;
88 } 88 }
89 89
90 90
91 template <typename T> 91 template <typename T>
92 static void DeleteArray(T* array) { 92 void DeleteArray(T* array) {
93 delete[] array; 93 delete[] array;
94 } 94 }
95 95
96 96
97 // The normal strdup functions use malloc. These versions of StrDup 97 // The normal strdup functions use malloc. These versions of StrDup
98 // and StrNDup uses new and calls the FatalProcessOutOfMemory handler 98 // and StrNDup uses new and calls the FatalProcessOutOfMemory handler
99 // if allocation fails. 99 // if allocation fails.
100 char* StrDup(const char* str); 100 char* StrDup(const char* str);
101 char* StrNDup(const char* str, int n); 101 char* StrNDup(const char* str, int n);
102 102
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 friend class Isolate; 135 friend class Isolate;
136 136
137 DISALLOW_IMPLICIT_CONSTRUCTORS(PreallocatedStorage); 137 DISALLOW_IMPLICIT_CONSTRUCTORS(PreallocatedStorage);
138 }; 138 };
139 139
140 140
141 } } // namespace v8::internal 141 } } // namespace v8::internal
142 142
143 #endif // V8_ALLOCATION_H_ 143 #endif // V8_ALLOCATION_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/api.h » ('j') | src/conversions-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698