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

Side by Side Diff: include/v8.h

Issue 11316: Merged bleeding edge 746:795 into regexp2000. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/regexp2000/
Patch Set: Created 12 years, 1 month 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 | « ChangeLog ('k') | src/api.cc » ('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 2007-2008 the V8 project authors. All rights reserved. 1 // Copyright 2007-2008 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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
1804 class EXPORT Exception { 1804 class EXPORT Exception {
1805 public: 1805 public:
1806 static Local<Value> RangeError(Handle<String> message); 1806 static Local<Value> RangeError(Handle<String> message);
1807 static Local<Value> ReferenceError(Handle<String> message); 1807 static Local<Value> ReferenceError(Handle<String> message);
1808 static Local<Value> SyntaxError(Handle<String> message); 1808 static Local<Value> SyntaxError(Handle<String> message);
1809 static Local<Value> TypeError(Handle<String> message); 1809 static Local<Value> TypeError(Handle<String> message);
1810 static Local<Value> Error(Handle<String> message); 1810 static Local<Value> Error(Handle<String> message);
1811 }; 1811 };
1812 1812
1813 1813
1814 // --- C o u n t e r s C a l l b a c k s 1814 // --- C o u n t e r s C a l l b a c k s ---
1815 1815
1816 typedef int* (*CounterLookupCallback)(const wchar_t* name); 1816 typedef int* (*CounterLookupCallback)(const wchar_t* name);
1817 1817
1818 // --- F a i l e d A c c e s s C h e c k C a l l b a c k --- 1818 // --- F a i l e d A c c e s s C h e c k C a l l b a c k ---
1819 typedef void (*FailedAccessCheckCallback)(Local<Object> target, 1819 typedef void (*FailedAccessCheckCallback)(Local<Object> target,
1820 AccessType type, 1820 AccessType type,
1821 Local<Value> data); 1821 Local<Value> data);
1822 1822
1823 // --- G a r b a g e C o l l e c t i o n C a l l b a c k s 1823 // --- G a r b a g e C o l l e c t i o n C a l l b a c k s
1824 1824
1825 /** 1825 /**
1826 * Applications can register a callback function which is called 1826 * Applications can register a callback function which is called
1827 * before and after a major garbage collection. Allocations are not 1827 * before and after a major garbage collection. Allocations are not
1828 * allowed in the callback function, you therefore cannot manipulate 1828 * allowed in the callback function, you therefore cannot manipulate
1829 * objects (set or delete properties for example) since it is possible 1829 * objects (set or delete properties for example) since it is possible
1830 * such operations will result in the allocation of objects. 1830 * such operations will result in the allocation of objects.
1831 */ 1831 */
1832 typedef void (*GCCallback)(); 1832 typedef void (*GCCallback)();
1833 1833
1834 1834
1835 // --- C o n t e x t G e n e r a t o r 1835 // --- E x t e r n a l S y m b o l C a l l b a c k ---
1836
1837 /**
1838 * Callback used to allocate certain V8 symbols as external strings.
1839 *
1840 * The data passed to the callback is utf8 encoded.
1841 *
1842 * Allocations are not allowed in the callback function, you therefore
1843 * cannot manipulate objects (set or delete properties for example)
1844 * since it is possible such operations will result in the allocation
1845 * of objects.
1846 */
1847 typedef String::ExternalStringResource* (*ExternalSymbolCallback)(
1848 const char* utf8,
1849 size_t length);
1850
1851
1852 // --- C o n t e x t G e n e r a t o r ---
1836 1853
1837 /** 1854 /**
1838 * Applications must provide a callback function which is called to generate 1855 * Applications must provide a callback function which is called to generate
1839 * a context if a context was not deserialized from the snapshot. 1856 * a context if a context was not deserialized from the snapshot.
1840 */ 1857 */
1841 typedef Persistent<Context> (*ContextGenerator)(); 1858 typedef Persistent<Context> (*ContextGenerator)();
1842 1859
1843 1860
1844 /** 1861 /**
1845 * Container class for static utility functions. 1862 * Container class for static utility functions.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1925 /** 1942 /**
1926 * Enables the host application to receive a notification after a 1943 * Enables the host application to receive a notification after a
1927 * major garbage collection. Allocations are not allowed in the 1944 * major garbage collection. Allocations are not allowed in the
1928 * callback function, you therefore cannot manipulate objects (set 1945 * callback function, you therefore cannot manipulate objects (set
1929 * or delete properties for example) since it is possible such 1946 * or delete properties for example) since it is possible such
1930 * operations will result in the allocation of objects. 1947 * operations will result in the allocation of objects.
1931 */ 1948 */
1932 static void SetGlobalGCEpilogueCallback(GCCallback); 1949 static void SetGlobalGCEpilogueCallback(GCCallback);
1933 1950
1934 /** 1951 /**
1952 * Applications can register a callback that will be used when
1953 * allocating most of the V8 symbols. The callback must return an
1954 * external string resource that represents the symbols.
1955 *
1956 * Most often when performing a property lookup the key will be a
1957 * symbol. Allocating symbols as external strings can reduce the
1958 * amount of string conversions needed when using interceptors and
1959 * accessors.
1960 *
1961 * \note This is an experimental feature and it might be removed.
1962 */
1963 static void SetExternalSymbolCallback(ExternalSymbolCallback);
1964
1965 /**
1935 * Allows the host application to group objects together. If one 1966 * Allows the host application to group objects together. If one
1936 * object in the group is alive, all objects in the group are alive. 1967 * object in the group is alive, all objects in the group are alive.
1937 * After each garbage collection, object groups are removed. It is 1968 * After each garbage collection, object groups are removed. It is
1938 * intended to be used in the before-garbage-collection callback 1969 * intended to be used in the before-garbage-collection callback
1939 * function for istance to simulate DOM tree connections among JS 1970 * function for istance to simulate DOM tree connections among JS
1940 * wrapper objects. 1971 * wrapper objects.
1941 */ 1972 */
1942 static void AddObjectToGroup(void* id, Persistent<Object> obj); 1973 static void AddObjectToGroup(void* id, Persistent<Object> obj);
1943 1974
1944 /** 1975 /**
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
2432 2463
2433 } // namespace v8 2464 } // namespace v8
2434 2465
2435 2466
2436 #undef EXPORT 2467 #undef EXPORT
2437 #undef EXPORT_INLINE 2468 #undef EXPORT_INLINE
2438 #undef TYPE_CHECK 2469 #undef TYPE_CHECK
2439 2470
2440 2471
2441 #endif // V8_H_ 2472 #endif // V8_H_
OLDNEW
« no previous file with comments | « ChangeLog ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698