Chromium Code Reviews| 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 1397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1408 bool IsEval() const; | 1408 bool IsEval() const; |
| 1409 | 1409 |
| 1410 /** | 1410 /** |
| 1411 * Returns whether or not the associated function is called as a | 1411 * Returns whether or not the associated function is called as a |
| 1412 * constructor via "new". | 1412 * constructor via "new". |
| 1413 */ | 1413 */ |
| 1414 bool IsConstructor() const; | 1414 bool IsConstructor() const; |
| 1415 }; | 1415 }; |
| 1416 | 1416 |
| 1417 | 1417 |
| 1418 struct RegisterState { | |
| 1419 RegisterState() : pc(NULL), sp(NULL), fp(NULL) {} | |
| 1420 void* pc; // Instruction pointer. | |
| 1421 void* sp; // Stack pointer. | |
| 1422 void* fp; // Frame pointer. | |
| 1423 }; | |
| 1424 | |
| 1425 | |
| 1418 /** | 1426 /** |
| 1419 * A JSON Parser. | 1427 * A JSON Parser. |
| 1420 */ | 1428 */ |
| 1421 class V8_EXPORT JSON { | 1429 class V8_EXPORT JSON { |
| 1422 public: | 1430 public: |
| 1423 /** | 1431 /** |
| 1424 * Tries to parse the string |json_string| and returns it as value if | 1432 * Tries to parse the string |json_string| and returns it as value if |
| 1425 * successful. | 1433 * successful. |
| 1426 * | 1434 * |
| 1427 * \param json_string The string to parse. | 1435 * \param json_string The string to parse. |
| (...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4541 * are in the range of 0 - GetNumberOfDataSlots() - 1. | 4549 * are in the range of 0 - GetNumberOfDataSlots() - 1. |
| 4542 */ | 4550 */ |
| 4543 V8_INLINE static uint32_t GetNumberOfDataSlots(); | 4551 V8_INLINE static uint32_t GetNumberOfDataSlots(); |
| 4544 | 4552 |
| 4545 /** | 4553 /** |
| 4546 * Get statistics about the heap memory usage. | 4554 * Get statistics about the heap memory usage. |
| 4547 */ | 4555 */ |
| 4548 void GetHeapStatistics(HeapStatistics* heap_statistics); | 4556 void GetHeapStatistics(HeapStatistics* heap_statistics); |
| 4549 | 4557 |
| 4550 /** | 4558 /** |
| 4559 * Get a call stack sample from the isolate. | |
| 4560 * \param state Execution state. | |
| 4561 * \param frames Caller allocated buffer to store stack frames. | |
| 4562 * \param frames_limit Maximum number of frames to capture. The buffer must | |
| 4563 * be large enough to hold the number of frames. | |
| 4564 * \return Actual number of captured frames. | |
| 4565 * \note GetStackSample should only be called when the JS thread is paused or | |
| 4566 * interrupted. Otherwise the behavior is undefined. | |
| 4567 */ | |
| 4568 int GetStackSample(const RegisterState& state, void** frames, | |
|
Benedikt Meurer
2014/09/23 05:47:48
Nit: int -> size_t
alph
2014/09/23 07:30:46
Done.
I just saw v8 tends to use int whenever poss
| |
| 4569 int frames_limit); | |
|
Benedikt Meurer
2014/09/23 05:47:48
Nit: int -> size_t
alph
2014/09/23 07:30:46
Done.
| |
| 4570 | |
| 4571 /** | |
| 4551 * Adjusts the amount of registered external memory. Used to give V8 an | 4572 * Adjusts the amount of registered external memory. Used to give V8 an |
| 4552 * indication of the amount of externally allocated memory that is kept alive | 4573 * indication of the amount of externally allocated memory that is kept alive |
| 4553 * by JavaScript objects. V8 uses this to decide when to perform global | 4574 * by JavaScript objects. V8 uses this to decide when to perform global |
| 4554 * garbage collections. Registering externally allocated memory will trigger | 4575 * garbage collections. Registering externally allocated memory will trigger |
| 4555 * global garbage collections more often than it would otherwise in an attempt | 4576 * global garbage collections more often than it would otherwise in an attempt |
| 4556 * to garbage collect the JavaScript objects that keep the externally | 4577 * to garbage collect the JavaScript objects that keep the externally |
| 4557 * allocated memory alive. | 4578 * allocated memory alive. |
| 4558 * | 4579 * |
| 4559 * \param change_in_bytes the change in externally allocated memory that is | 4580 * \param change_in_bytes the change in externally allocated memory that is |
| 4560 * kept alive by JavaScript objects. | 4581 * kept alive by JavaScript objects. |
| (...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6949 */ | 6970 */ |
| 6950 | 6971 |
| 6951 | 6972 |
| 6952 } // namespace v8 | 6973 } // namespace v8 |
| 6953 | 6974 |
| 6954 | 6975 |
| 6955 #undef TYPE_CHECK | 6976 #undef TYPE_CHECK |
| 6956 | 6977 |
| 6957 | 6978 |
| 6958 #endif // V8_H_ | 6979 #endif // V8_H_ |
| OLD | NEW |