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 4083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4094 int max_old_space_size_; | 4094 int max_old_space_size_; |
4095 int max_executable_size_; | 4095 int max_executable_size_; |
4096 uint32_t* stack_limit_; | 4096 uint32_t* stack_limit_; |
4097 int max_available_threads_; | 4097 int max_available_threads_; |
4098 size_t code_range_size_; | 4098 size_t code_range_size_; |
4099 }; | 4099 }; |
4100 | 4100 |
4101 | 4101 |
4102 /** | 4102 /** |
4103 * Sets the given ResourceConstraints on the given Isolate. | 4103 * Sets the given ResourceConstraints on the given Isolate. |
| 4104 * |
| 4105 * Deprecated, will be removed. Pass constraints via Isolate::New or modify |
| 4106 * the stack limit via Isolate::SetStackLimit. |
4104 */ | 4107 */ |
4105 bool V8_EXPORT SetResourceConstraints(Isolate* isolate, | 4108 bool V8_EXPORT SetResourceConstraints(Isolate* isolate, |
4106 ResourceConstraints* constraints); | 4109 ResourceConstraints* constraints); |
4107 | 4110 |
4108 | 4111 |
4109 // --- Exceptions --- | 4112 // --- Exceptions --- |
4110 | 4113 |
4111 | 4114 |
4112 typedef void (*FatalErrorCallback)(const char* location, const char* message); | 4115 typedef void (*FatalErrorCallback)(const char* location, const char* message); |
4113 | 4116 |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4364 * generated function. Furthermore, if an entry_hook is given, V8 will | 4367 * generated function. Furthermore, if an entry_hook is given, V8 will |
4365 * always run without a context snapshot. | 4368 * always run without a context snapshot. |
4366 */ | 4369 */ |
4367 FunctionEntryHook entry_hook; | 4370 FunctionEntryHook entry_hook; |
4368 | 4371 |
4369 /** | 4372 /** |
4370 * Allows the host application to provide the address of a function that is | 4373 * Allows the host application to provide the address of a function that is |
4371 * notified each time code is added, moved or removed. | 4374 * notified each time code is added, moved or removed. |
4372 */ | 4375 */ |
4373 JitCodeEventHandler code_event_handler; | 4376 JitCodeEventHandler code_event_handler; |
| 4377 |
| 4378 /** |
| 4379 * ResourceConstraints to use for the new Isolate. |
| 4380 */ |
| 4381 ResourceConstraints constraints; |
4374 }; | 4382 }; |
4375 | 4383 |
4376 | 4384 |
4377 /** | 4385 /** |
4378 * Stack-allocated class which sets the isolate for all operations | 4386 * Stack-allocated class which sets the isolate for all operations |
4379 * executed within a local scope. | 4387 * executed within a local scope. |
4380 */ | 4388 */ |
4381 class V8_EXPORT Scope { | 4389 class V8_EXPORT Scope { |
4382 public: | 4390 public: |
4383 explicit Scope(Isolate* isolate) : isolate_(isolate) { | 4391 explicit Scope(Isolate* isolate) : isolate_(isolate) { |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4810 * \note the set of events declared in JitCodeEvent::EventType is expected to | 4818 * \note the set of events declared in JitCodeEvent::EventType is expected to |
4811 * grow over time, and the JitCodeEvent structure is expected to accrue | 4819 * grow over time, and the JitCodeEvent structure is expected to accrue |
4812 * new members. The \p event_handler function must ignore event codes | 4820 * new members. The \p event_handler function must ignore event codes |
4813 * it does not recognize to maintain future compatibility. | 4821 * it does not recognize to maintain future compatibility. |
4814 * \note Use Isolate::CreateParams to get events for code executed during | 4822 * \note Use Isolate::CreateParams to get events for code executed during |
4815 * Isolate setup. | 4823 * Isolate setup. |
4816 */ | 4824 */ |
4817 void SetJitCodeEventHandler(JitCodeEventOptions options, | 4825 void SetJitCodeEventHandler(JitCodeEventOptions options, |
4818 JitCodeEventHandler event_handler); | 4826 JitCodeEventHandler event_handler); |
4819 | 4827 |
| 4828 /** |
| 4829 * Modifies the stack limit for this Isolate. |
| 4830 * |
| 4831 * \param stack_limit An address beyond which the Vm's stack may not grow. |
| 4832 * |
| 4833 * \note If you are using threads then you should hold the V8::Locker lock |
| 4834 * while setting the stack limit and you must set a non-default stack |
| 4835 * limit separately for each thread. |
| 4836 */ |
| 4837 void SetStackLimit(uintptr_t stack_limit); |
| 4838 |
4820 private: | 4839 private: |
4821 template<class K, class V, class Traits> friend class PersistentValueMap; | 4840 template<class K, class V, class Traits> friend class PersistentValueMap; |
4822 | 4841 |
4823 Isolate(); | 4842 Isolate(); |
4824 Isolate(const Isolate&); | 4843 Isolate(const Isolate&); |
4825 ~Isolate(); | 4844 ~Isolate(); |
4826 Isolate& operator=(const Isolate&); | 4845 Isolate& operator=(const Isolate&); |
4827 void* operator new(size_t size); | 4846 void* operator new(size_t size); |
4828 void operator delete(void*, size_t); | 4847 void operator delete(void*, size_t); |
4829 | 4848 |
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6976 */ | 6995 */ |
6977 | 6996 |
6978 | 6997 |
6979 } // namespace v8 | 6998 } // namespace v8 |
6980 | 6999 |
6981 | 7000 |
6982 #undef TYPE_CHECK | 7001 #undef TYPE_CHECK |
6983 | 7002 |
6984 | 7003 |
6985 #endif // V8_H_ | 7004 #endif // V8_H_ |
OLD | NEW |