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

Side by Side Diff: src/smart-pointers.h

Issue 12442002: Details wrt parallel recompilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: re-added accidental delete Created 7 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 | Annotate | Revision Log
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/parallel-optimize-disabled.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 2011 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
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 inline SmartArrayPointer() { } 122 inline SmartArrayPointer() { }
123 explicit inline SmartArrayPointer(T* ptr) 123 explicit inline SmartArrayPointer(T* ptr)
124 : SmartPointerBase<ArrayDeallocator<T>, T>(ptr) { } 124 : SmartPointerBase<ArrayDeallocator<T>, T>(ptr) { }
125 inline SmartArrayPointer(const SmartArrayPointer<T>& rhs) 125 inline SmartArrayPointer(const SmartArrayPointer<T>& rhs)
126 : SmartPointerBase<ArrayDeallocator<T>, T>(rhs) { } 126 : SmartPointerBase<ArrayDeallocator<T>, T>(rhs) { }
127 }; 127 };
128 128
129 129
130 template<typename T> 130 template<typename T>
131 struct ObjectDeallocator { 131 struct ObjectDeallocator {
132 static void Delete(T* array) { 132 static void Delete(T* object) {
133 Malloced::Delete(array); 133 delete object;
134 } 134 }
135 }; 135 };
136 136
137
137 template<typename T> 138 template<typename T>
138 class SmartPointer: public SmartPointerBase<ObjectDeallocator<T>, T> { 139 class SmartPointer: public SmartPointerBase<ObjectDeallocator<T>, T> {
139 public: 140 public:
140 inline SmartPointer() { } 141 inline SmartPointer() { }
141 explicit inline SmartPointer(T* ptr) 142 explicit inline SmartPointer(T* ptr)
142 : SmartPointerBase<ObjectDeallocator<T>, T>(ptr) { } 143 : SmartPointerBase<ObjectDeallocator<T>, T>(ptr) { }
143 inline SmartPointer(const SmartPointer<T>& rhs) 144 inline SmartPointer(const SmartPointer<T>& rhs)
144 : SmartPointerBase<ObjectDeallocator<T>, T>(rhs) { } 145 : SmartPointerBase<ObjectDeallocator<T>, T>(rhs) { }
145 }; 146 };
146 147
147 } } // namespace v8::internal 148 } } // namespace v8::internal
148 149
149 #endif // V8_SMART_POINTERS_H_ 150 #endif // V8_SMART_POINTERS_H_
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/parallel-optimize-disabled.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698