| 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 4561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4572 * further callbacks. | 4572 * further callbacks. |
| 4573 */ | 4573 */ |
| 4574 static void AddCallCompletedCallback(CallCompletedCallback callback); | 4574 static void AddCallCompletedCallback(CallCompletedCallback callback); |
| 4575 | 4575 |
| 4576 /** | 4576 /** |
| 4577 * Removes callback that was installed by AddCallCompletedCallback. | 4577 * Removes callback that was installed by AddCallCompletedCallback. |
| 4578 */ | 4578 */ |
| 4579 static void RemoveCallCompletedCallback(CallCompletedCallback callback); | 4579 static void RemoveCallCompletedCallback(CallCompletedCallback callback); |
| 4580 | 4580 |
| 4581 /** | 4581 /** |
| 4582 * Experimental: Runs the Microtask Work Queue until empty |
| 4583 */ |
| 4584 static void RunMicrotasks(Isolate* isolate); |
| 4585 |
| 4586 /** |
| 4587 * Experimental: Enqueues the callback to the Microtask Work Queue |
| 4588 */ |
| 4589 static void EnqueueMicrotask(Isolate* isolate, Handle<Function> microtask); |
| 4590 |
| 4591 /** |
| 4592 * Experimental: Controls whether the Microtask Work Queue is automatically |
| 4593 * run when the script call depth decrements to zero. |
| 4594 */ |
| 4595 static void SetAutorunMicrotasks(Isolate *source, bool autorun); |
| 4596 |
| 4597 /** |
| 4582 * Initializes from snapshot if possible. Otherwise, attempts to | 4598 * Initializes from snapshot if possible. Otherwise, attempts to |
| 4583 * initialize from scratch. This function is called implicitly if | 4599 * initialize from scratch. This function is called implicitly if |
| 4584 * you use the API without calling it first. | 4600 * you use the API without calling it first. |
| 4585 */ | 4601 */ |
| 4586 static bool Initialize(); | 4602 static bool Initialize(); |
| 4587 | 4603 |
| 4588 /** | 4604 /** |
| 4589 * Allows the host application to provide a callback which can be used | 4605 * Allows the host application to provide a callback which can be used |
| 4590 * as a source of entropy for random number generators. | 4606 * as a source of entropy for random number generators. |
| 4591 */ | 4607 */ |
| (...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5391 static const int kStringEncodingMask = 0x4; | 5407 static const int kStringEncodingMask = 0x4; |
| 5392 static const int kExternalTwoByteRepresentationTag = 0x02; | 5408 static const int kExternalTwoByteRepresentationTag = 0x02; |
| 5393 static const int kExternalAsciiRepresentationTag = 0x06; | 5409 static const int kExternalAsciiRepresentationTag = 0x06; |
| 5394 | 5410 |
| 5395 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; | 5411 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; |
| 5396 static const int kIsolateRootsOffset = 5 * kApiPointerSize; | 5412 static const int kIsolateRootsOffset = 5 * kApiPointerSize; |
| 5397 static const int kUndefinedValueRootIndex = 5; | 5413 static const int kUndefinedValueRootIndex = 5; |
| 5398 static const int kNullValueRootIndex = 7; | 5414 static const int kNullValueRootIndex = 7; |
| 5399 static const int kTrueValueRootIndex = 8; | 5415 static const int kTrueValueRootIndex = 8; |
| 5400 static const int kFalseValueRootIndex = 9; | 5416 static const int kFalseValueRootIndex = 9; |
| 5401 static const int kEmptyStringRootIndex = 147; | 5417 static const int kEmptyStringRootIndex = 148; |
| 5402 | 5418 |
| 5403 static const int kNodeClassIdOffset = 1 * kApiPointerSize; | 5419 static const int kNodeClassIdOffset = 1 * kApiPointerSize; |
| 5404 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; | 5420 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; |
| 5405 static const int kNodeStateMask = 0xf; | 5421 static const int kNodeStateMask = 0xf; |
| 5406 static const int kNodeStateIsWeakValue = 2; | 5422 static const int kNodeStateIsWeakValue = 2; |
| 5407 static const int kNodeStateIsPendingValue = 3; | 5423 static const int kNodeStateIsPendingValue = 3; |
| 5408 static const int kNodeStateIsNearDeathValue = 4; | 5424 static const int kNodeStateIsNearDeathValue = 4; |
| 5409 static const int kNodeIsIndependentShift = 4; | 5425 static const int kNodeIsIndependentShift = 4; |
| 5410 static const int kNodeIsPartiallyDependentShift = 5; | 5426 static const int kNodeIsPartiallyDependentShift = 5; |
| 5411 | 5427 |
| (...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6439 */ | 6455 */ |
| 6440 | 6456 |
| 6441 | 6457 |
| 6442 } // namespace v8 | 6458 } // namespace v8 |
| 6443 | 6459 |
| 6444 | 6460 |
| 6445 #undef TYPE_CHECK | 6461 #undef TYPE_CHECK |
| 6446 | 6462 |
| 6447 | 6463 |
| 6448 #endif // V8_H_ | 6464 #endif // V8_H_ |
| OLD | NEW |