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

Side by Side Diff: include/v8.h

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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 | « build/toolchain.gypi ('k') | include/v8-profiler.h » ('j') | no next file with comments »
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 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 * \param options Various options that might affect performance of this or 1621 * \param options Various options that might affect performance of this or
1622 * subsequent operations. 1622 * subsequent operations.
1623 * \return The number of characters copied to the buffer excluding the null 1623 * \return The number of characters copied to the buffer excluding the null
1624 * terminator. For WriteUtf8: The number of bytes copied to the buffer 1624 * terminator. For WriteUtf8: The number of bytes copied to the buffer
1625 * including the null terminator (if written). 1625 * including the null terminator (if written).
1626 */ 1626 */
1627 enum WriteOptions { 1627 enum WriteOptions {
1628 NO_OPTIONS = 0, 1628 NO_OPTIONS = 0,
1629 HINT_MANY_WRITES_EXPECTED = 1, 1629 HINT_MANY_WRITES_EXPECTED = 1,
1630 NO_NULL_TERMINATION = 2, 1630 NO_NULL_TERMINATION = 2,
1631 PRESERVE_ASCII_NULL = 4 1631 PRESERVE_ASCII_NULL = 4,
1632 // Used by WriteUtf8 to replace orphan surrogate code units with the
1633 // unicode replacement character. Needs to be set to guarantee valid UTF-8
1634 // output.
1635 REPLACE_INVALID_UTF8 = 8
1632 }; 1636 };
1633 1637
1634 // 16-bit character codes. 1638 // 16-bit character codes.
1635 int Write(uint16_t* buffer, 1639 int Write(uint16_t* buffer,
1636 int start = 0, 1640 int start = 0,
1637 int length = -1, 1641 int length = -1,
1638 int options = NO_OPTIONS) const; 1642 int options = NO_OPTIONS) const;
1639 // One byte characters. 1643 // One byte characters.
1640 int WriteOneByte(uint8_t* buffer, 1644 int WriteOneByte(uint8_t* buffer,
1641 int start = 0, 1645 int start = 0,
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1989 1993
1990 1994
1991 enum PropertyAttribute { 1995 enum PropertyAttribute {
1992 None = 0, 1996 None = 0,
1993 ReadOnly = 1 << 0, 1997 ReadOnly = 1 << 0,
1994 DontEnum = 1 << 1, 1998 DontEnum = 1 << 1,
1995 DontDelete = 1 << 2 1999 DontDelete = 1 << 2
1996 }; 2000 };
1997 2001
1998 enum ExternalArrayType { 2002 enum ExternalArrayType {
1999 kExternalByteArray = 1, 2003 kExternalInt8Array = 1,
2000 kExternalUnsignedByteArray, 2004 kExternalUint8Array,
2001 kExternalShortArray, 2005 kExternalInt16Array,
2002 kExternalUnsignedShortArray, 2006 kExternalUint16Array,
2003 kExternalIntArray, 2007 kExternalInt32Array,
2004 kExternalUnsignedIntArray, 2008 kExternalUint32Array,
2005 kExternalFloatArray, 2009 kExternalFloat32Array,
2006 kExternalDoubleArray, 2010 kExternalFloat64Array,
2007 kExternalPixelArray 2011 kExternalUint8ClampedArray,
2012
2013 // Legacy constant names
2014 kExternalByteArray = kExternalInt8Array,
2015 kExternalUnsignedByteArray = kExternalUint8Array,
2016 kExternalShortArray = kExternalInt16Array,
2017 kExternalUnsignedShortArray = kExternalUint16Array,
2018 kExternalIntArray = kExternalInt32Array,
2019 kExternalUnsignedIntArray = kExternalUint32Array,
2020 kExternalFloatArray = kExternalFloat32Array,
2021 kExternalDoubleArray = kExternalFloat64Array,
2022 kExternalPixelArray = kExternalUint8ClampedArray
2008 }; 2023 };
2009 2024
2010 /** 2025 /**
2011 * Accessor[Getter|Setter] are used as callback functions when 2026 * Accessor[Getter|Setter] are used as callback functions when
2012 * setting|getting a particular property. See Object and ObjectTemplate's 2027 * setting|getting a particular property. See Object and ObjectTemplate's
2013 * method SetAccessor. 2028 * method SetAccessor.
2014 */ 2029 */
2015 typedef void (*AccessorGetterCallback)( 2030 typedef void (*AccessorGetterCallback)(
2016 Local<String> property, 2031 Local<String> property,
2017 const PropertyCallbackInfo<Value>& info); 2032 const PropertyCallbackInfo<Value>& info);
(...skipping 2539 matching lines...) Expand 10 before | Expand all | Expand 10 after
4557 * further callbacks. 4572 * further callbacks.
4558 */ 4573 */
4559 static void AddCallCompletedCallback(CallCompletedCallback callback); 4574 static void AddCallCompletedCallback(CallCompletedCallback callback);
4560 4575
4561 /** 4576 /**
4562 * Removes callback that was installed by AddCallCompletedCallback. 4577 * Removes callback that was installed by AddCallCompletedCallback.
4563 */ 4578 */
4564 static void RemoveCallCompletedCallback(CallCompletedCallback callback); 4579 static void RemoveCallCompletedCallback(CallCompletedCallback callback);
4565 4580
4566 /** 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 /**
4567 * Initializes from snapshot if possible. Otherwise, attempts to 4598 * Initializes from snapshot if possible. Otherwise, attempts to
4568 * initialize from scratch. This function is called implicitly if 4599 * initialize from scratch. This function is called implicitly if
4569 * you use the API without calling it first. 4600 * you use the API without calling it first.
4570 */ 4601 */
4571 static bool Initialize(); 4602 static bool Initialize();
4572 4603
4573 /** 4604 /**
4574 * 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
4575 * as a source of entropy for random number generators. 4606 * as a source of entropy for random number generators.
4576 */ 4607 */
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
5376 static const int kStringEncodingMask = 0x4; 5407 static const int kStringEncodingMask = 0x4;
5377 static const int kExternalTwoByteRepresentationTag = 0x02; 5408 static const int kExternalTwoByteRepresentationTag = 0x02;
5378 static const int kExternalAsciiRepresentationTag = 0x06; 5409 static const int kExternalAsciiRepresentationTag = 0x06;
5379 5410
5380 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize; 5411 static const int kIsolateEmbedderDataOffset = 0 * kApiPointerSize;
5381 static const int kIsolateRootsOffset = 5 * kApiPointerSize; 5412 static const int kIsolateRootsOffset = 5 * kApiPointerSize;
5382 static const int kUndefinedValueRootIndex = 5; 5413 static const int kUndefinedValueRootIndex = 5;
5383 static const int kNullValueRootIndex = 7; 5414 static const int kNullValueRootIndex = 7;
5384 static const int kTrueValueRootIndex = 8; 5415 static const int kTrueValueRootIndex = 8;
5385 static const int kFalseValueRootIndex = 9; 5416 static const int kFalseValueRootIndex = 9;
5386 static const int kEmptyStringRootIndex = 145; 5417 static const int kEmptyStringRootIndex = 141;
5387 5418
5388 static const int kNodeClassIdOffset = 1 * kApiPointerSize; 5419 static const int kNodeClassIdOffset = 1 * kApiPointerSize;
5389 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3; 5420 static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
5390 static const int kNodeStateMask = 0xf; 5421 static const int kNodeStateMask = 0xf;
5391 static const int kNodeStateIsWeakValue = 2; 5422 static const int kNodeStateIsWeakValue = 2;
5392 static const int kNodeStateIsPendingValue = 3; 5423 static const int kNodeStateIsPendingValue = 3;
5393 static const int kNodeStateIsNearDeathValue = 4; 5424 static const int kNodeStateIsNearDeathValue = 4;
5394 static const int kNodeIsIndependentShift = 4; 5425 static const int kNodeIsIndependentShift = 4;
5395 static const int kNodeIsPartiallyDependentShift = 5; 5426 static const int kNodeIsPartiallyDependentShift = 5;
5396 5427
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after
6424 */ 6455 */
6425 6456
6426 6457
6427 } // namespace v8 6458 } // namespace v8
6428 6459
6429 6460
6430 #undef TYPE_CHECK 6461 #undef TYPE_CHECK
6431 6462
6432 6463
6433 #endif // V8_H_ 6464 #endif // V8_H_
OLDNEW
« no previous file with comments | « build/toolchain.gypi ('k') | include/v8-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698