OLD | NEW |
---|---|
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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
6 * | 6 * |
7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
8 * | 8 * |
9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
(...skipping 4111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4122 /** | 4122 /** |
4123 * Types of garbage collections that can be requested via | 4123 * Types of garbage collections that can be requested via |
4124 * RequestGarbageCollectionForTesting. | 4124 * RequestGarbageCollectionForTesting. |
4125 */ | 4125 */ |
4126 enum GarbageCollectionType { | 4126 enum GarbageCollectionType { |
4127 kFullGarbageCollection, | 4127 kFullGarbageCollection, |
4128 kMinorGarbageCollection | 4128 kMinorGarbageCollection |
4129 }; | 4129 }; |
4130 | 4130 |
4131 /** | 4131 /** |
4132 * Features reported via the SetUseCounterCallback callback. Do not chang | |
Sven Panne
2014/06/23 09:29:39
+e
| |
4133 * assigned numbers of existing items; add new features to the end of this | |
4134 * list. | |
4135 */ | |
4136 enum UseCounterFeature { | |
Sven Panne
2014/06/23 09:29:39
I general, I'm a bit torn how to represent such a
| |
4137 kUseAsm = 0 | |
4138 }; | |
4139 | |
4140 typedef void (*UseCounterCallback)(Isolate* isolate, | |
4141 UseCounterFeature feature); | |
4142 | |
4143 | |
4144 /** | |
4132 * Creates a new isolate. Does not change the currently entered | 4145 * Creates a new isolate. Does not change the currently entered |
4133 * isolate. | 4146 * isolate. |
4134 * | 4147 * |
4135 * When an isolate is no longer used its resources should be freed | 4148 * When an isolate is no longer used its resources should be freed |
4136 * by calling Dispose(). Using the delete operator is not allowed. | 4149 * by calling Dispose(). Using the delete operator is not allowed. |
4137 */ | 4150 */ |
4138 static Isolate* New(); | 4151 static Isolate* New(); |
4139 | 4152 |
4140 /** | 4153 /** |
4141 * Returns the entered isolate for the current thread or NULL in | 4154 * Returns the entered isolate for the current thread or NULL in |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4390 * run when the script call depth decrements to zero. | 4403 * run when the script call depth decrements to zero. |
4391 */ | 4404 */ |
4392 void SetAutorunMicrotasks(bool autorun); | 4405 void SetAutorunMicrotasks(bool autorun); |
4393 | 4406 |
4394 /** | 4407 /** |
4395 * Experimental: Returns whether the Microtask Work Queue is automatically | 4408 * Experimental: Returns whether the Microtask Work Queue is automatically |
4396 * run when the script call depth decrements to zero. | 4409 * run when the script call depth decrements to zero. |
4397 */ | 4410 */ |
4398 bool WillAutorunMicrotasks() const; | 4411 bool WillAutorunMicrotasks() const; |
4399 | 4412 |
4413 /** | |
4414 * Sets a callback for counting the number of times a feature of V8 is used. | |
4415 */ | |
4416 void SetUseCounterCallback(UseCounterCallback callback); | |
4417 | |
4400 private: | 4418 private: |
4401 template<class K, class V, class Traits> friend class PersistentValueMap; | 4419 template<class K, class V, class Traits> friend class PersistentValueMap; |
4402 | 4420 |
4403 Isolate(); | 4421 Isolate(); |
4404 Isolate(const Isolate&); | 4422 Isolate(const Isolate&); |
4405 ~Isolate(); | 4423 ~Isolate(); |
4406 Isolate& operator=(const Isolate&); | 4424 Isolate& operator=(const Isolate&); |
4407 void* operator new(size_t size); | 4425 void* operator new(size_t size); |
4408 void operator delete(void*, size_t); | 4426 void operator delete(void*, size_t); |
4409 | 4427 |
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6665 */ | 6683 */ |
6666 | 6684 |
6667 | 6685 |
6668 } // namespace v8 | 6686 } // namespace v8 |
6669 | 6687 |
6670 | 6688 |
6671 #undef TYPE_CHECK | 6689 #undef TYPE_CHECK |
6672 | 6690 |
6673 | 6691 |
6674 #endif // V8_H_ | 6692 #endif // V8_H_ |
OLD | NEW |