OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 typename InitOnceTrait = SingleThreadInitOnceTrait, | 243 typename InitOnceTrait = SingleThreadInitOnceTrait, |
244 typename DestroyTrait = LeakyInstanceTrait<T> > | 244 typename DestroyTrait = LeakyInstanceTrait<T> > |
245 struct LazyInstance { | 245 struct LazyInstance { |
246 // A LazyInstance is a LazyStaticInstance. | 246 // A LazyInstance is a LazyStaticInstance. |
247 typedef typename LazyStaticInstance<T, CreateTrait, InitOnceTrait, | 247 typedef typename LazyStaticInstance<T, CreateTrait, InitOnceTrait, |
248 DestroyTrait>::type type; | 248 DestroyTrait>::type type; |
249 }; | 249 }; |
250 | 250 |
251 | 251 |
252 template <typename T, | 252 template <typename T, |
253 typename CreateTrait = DefaultConstructTrait<T>, | 253 typename CreateTrait = DefaultCreateTrait<T>, |
254 typename InitOnceTrait = SingleThreadInitOnceTrait, | 254 typename InitOnceTrait = SingleThreadInitOnceTrait, |
255 typename DestroyTrait = LeakyInstanceTrait<T> > | 255 typename DestroyTrait = LeakyInstanceTrait<T> > |
256 struct LazyDynamicInstance { | 256 struct LazyDynamicInstance { |
257 typedef LazyInstanceImpl<T, DynamicallyAllocatedInstanceTrait<T>, | 257 typedef LazyInstanceImpl<T, DynamicallyAllocatedInstanceTrait<T>, |
258 CreateTrait, InitOnceTrait, DestroyTrait> type; | 258 CreateTrait, InitOnceTrait, DestroyTrait> type; |
259 }; | 259 }; |
260 | 260 |
261 } } // namespace v8::internal | 261 } } // namespace v8::internal |
262 | 262 |
263 #endif // V8_LAZY_INSTANCE_H_ | 263 #endif // V8_LAZY_INSTANCE_H_ |
OLD | NEW |