Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(58)

Side by Side Diff: include/v8.h

Issue 154283002: V8 Microtask Queue & API (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: cleanup Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3840 matching lines...) Expand 10 before | Expand all | Expand 10 after
3851 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree 3851 kAllocationActionAll = kAllocationActionAllocate | kAllocationActionFree
3852 }; 3852 };
3853 3853
3854 typedef void (*MemoryAllocationCallback)(ObjectSpace space, 3854 typedef void (*MemoryAllocationCallback)(ObjectSpace space,
3855 AllocationAction action, 3855 AllocationAction action,
3856 int size); 3856 int size);
3857 3857
3858 // --- Leave Script Callback --- 3858 // --- Leave Script Callback ---
3859 typedef void (*CallCompletedCallback)(); 3859 typedef void (*CallCompletedCallback)();
3860 3860
3861 // --- External Microtask Callback ---
3862 typedef void (*ExternalMicrotaskCallback)(Isolate* isolate);
3863
3861 // --- Failed Access Check Callback --- 3864 // --- Failed Access Check Callback ---
3862 typedef void (*FailedAccessCheckCallback)(Local<Object> target, 3865 typedef void (*FailedAccessCheckCallback)(Local<Object> target,
3863 AccessType type, 3866 AccessType type,
3864 Local<Value> data); 3867 Local<Value> data);
3865 3868
3866 // --- AllowCodeGenerationFromStrings callbacks --- 3869 // --- AllowCodeGenerationFromStrings callbacks ---
3867 3870
3868 /** 3871 /**
3869 * Callback to check if code generation from strings is allowed. See 3872 * Callback to check if code generation from strings is allowed. See
3870 * Context::AllowCodeGenerationFromStrings. 3873 * Context::AllowCodeGenerationFromStrings.
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
4572 * further callbacks. 4575 * further callbacks.
4573 */ 4576 */
4574 static void AddCallCompletedCallback(CallCompletedCallback callback); 4577 static void AddCallCompletedCallback(CallCompletedCallback callback);
4575 4578
4576 /** 4579 /**
4577 * Removes callback that was installed by AddCallCompletedCallback. 4580 * Removes callback that was installed by AddCallCompletedCallback.
4578 */ 4581 */
4579 static void RemoveCallCompletedCallback(CallCompletedCallback callback); 4582 static void RemoveCallCompletedCallback(CallCompletedCallback callback);
4580 4583
4581 /** 4584 /**
4585 * Experimental: Runs the Microtask Work Queue until empty
4586 */
4587 static void RunMicrotasks(Isolate* isolate);
4588
4589 /**
4590 * Experimental: Enqueues the callback to the Microtask Work Queue
4591 */
4592 static void EnqueueExternalMicrotask(Isolate* isolate,
4593 ExternalMicrotaskCallback callback);
4594
4595 /**
4596 * Experimental: Controls whether the Microtask Work Queue is automatically
4597 * run when the script call depth decrements to zero.
4598 */
4599 static void SetAutorunMicrotasks(Isolate *source, bool autorun);
4600
4601 /**
4582 * Initializes from snapshot if possible. Otherwise, attempts to 4602 * Initializes from snapshot if possible. Otherwise, attempts to
4583 * initialize from scratch. This function is called implicitly if 4603 * initialize from scratch. This function is called implicitly if
4584 * you use the API without calling it first. 4604 * you use the API without calling it first.
4585 */ 4605 */
4586 static bool Initialize(); 4606 static bool Initialize();
4587 4607
4588 /** 4608 /**
4589 * Allows the host application to provide a callback which can be used 4609 * Allows the host application to provide a callback which can be used
4590 * as a source of entropy for random number generators. 4610 * as a source of entropy for random number generators.
4591 */ 4611 */
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
5391 static const int kStringEncodingMask = 0x4; 5411 static const int kStringEncodingMask = 0x4;
5392 static const int kExternalTwoByteRepresentationTag = 0x02; 5412 static const int kExternalTwoByteRepresentationTag = 0x02;
5393 static const int kExternalAsciiRepresentationTag = 0x06; 5413 static const int kExternalAsciiRepresentationTag = 0x06;
5394 5414
5395 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; 5415 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize;
5396 static const int kIsolateRootsOffset = 5 * kApiPointerSize; 5416 static const int kIsolateRootsOffset = 5 * kApiPointerSize;
5397 static const int kUndefinedValueRootIndex = 5; 5417 static const int kUndefinedValueRootIndex = 5;
5398 static const int kNullValueRootIndex = 7; 5418 static const int kNullValueRootIndex = 7;
5399 static const int kTrueValueRootIndex = 8; 5419 static const int kTrueValueRootIndex = 8;
5400 static const int kFalseValueRootIndex = 9; 5420 static const int kFalseValueRootIndex = 9;
5401 static const int kEmptyStringRootIndex = 147; 5421 static const int kEmptyStringRootIndex = 148;
dcarney 2014/02/11 07:47:13 did you run make grokdump and commit the changes?
rafaelw 2014/02/11 20:37:43 I didn't, but I have now, although I have no idea
dcarney 2014/02/12 07:17:15 any time you add or remove an instancetype or add
rafaelw 2014/02/12 21:25:03 Got it. Thanks. What is grokdump used for? On 201
5402 5422
5403 static const int kNodeClassIdOffset = 1 * kApiPointerSize; 5423 static const int kNodeClassIdOffset = 1 * kApiPointerSize;
5404 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; 5424 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
5405 static const int kNodeStateMask = 0xf; 5425 static const int kNodeStateMask = 0xf;
5406 static const int kNodeStateIsWeakValue = 2; 5426 static const int kNodeStateIsWeakValue = 2;
5407 static const int kNodeStateIsPendingValue = 3; 5427 static const int kNodeStateIsPendingValue = 3;
5408 static const int kNodeStateIsNearDeathValue = 4; 5428 static const int kNodeStateIsNearDeathValue = 4;
5409 static const int kNodeIsIndependentShift = 4; 5429 static const int kNodeIsIndependentShift = 4;
5410 static const int kNodeIsPartiallyDependentShift = 5; 5430 static const int kNodeIsPartiallyDependentShift = 5;
5411 5431
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
6439 */ 6459 */
6440 6460
6441 6461
6442 } // namespace v8 6462 } // namespace v8
6443 6463
6444 6464
6445 #undef TYPE_CHECK 6465 #undef TYPE_CHECK
6446 6466
6447 6467
6448 #endif // V8_H_ 6468 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698