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

Side by Side Diff: include/v8.h

Issue 6815029: Merge (7180:7265] from bleeding_edge to the experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 8 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 | « SConstruct ('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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
1699 class Array : public Object { 1699 class Array : public Object {
1700 public: 1700 public:
1701 V8EXPORT uint32_t Length() const; 1701 V8EXPORT uint32_t Length() const;
1702 1702
1703 /** 1703 /**
1704 * Clones an element at index |index|. Returns an empty 1704 * Clones an element at index |index|. Returns an empty
1705 * handle if cloning fails (for any reason). 1705 * handle if cloning fails (for any reason).
1706 */ 1706 */
1707 V8EXPORT Local<Object> CloneElementAt(uint32_t index); 1707 V8EXPORT Local<Object> CloneElementAt(uint32_t index);
1708 1708
1709 /**
1710 * Creates a JavaScript array with the given length. If the length
1711 * is negative the returned array will have length 0.
1712 */
1709 V8EXPORT static Local<Array> New(int length = 0); 1713 V8EXPORT static Local<Array> New(int length = 0);
1714
1710 static inline Array* Cast(Value* obj); 1715 static inline Array* Cast(Value* obj);
1711 private: 1716 private:
1712 V8EXPORT Array(); 1717 V8EXPORT Array();
1713 static void CheckCast(Value* obj); 1718 static void CheckCast(Value* obj);
1714 }; 1719 };
1715 1720
1716 1721
1717 /** 1722 /**
1718 * A JavaScript function object (ECMA-262, 15.3). 1723 * A JavaScript function object (ECMA-262, 15.3).
1719 */ 1724 */
(...skipping 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 * intended to be used in the before-garbage-collection callback 2716 * intended to be used in the before-garbage-collection callback
2712 * function, for instance to simulate DOM tree connections among JS 2717 * function, for instance to simulate DOM tree connections among JS
2713 * wrapper objects. 2718 * wrapper objects.
2714 * See v8-profiler.h for RetainedObjectInfo interface description. 2719 * See v8-profiler.h for RetainedObjectInfo interface description.
2715 */ 2720 */
2716 static void AddObjectGroup(Persistent<Value>* objects, 2721 static void AddObjectGroup(Persistent<Value>* objects,
2717 size_t length, 2722 size_t length,
2718 RetainedObjectInfo* info = NULL); 2723 RetainedObjectInfo* info = NULL);
2719 2724
2720 /** 2725 /**
2726 * Allows the host application to declare implicit references between
2727 * the objects: if |parent| is alive, all |children| are alive too.
2728 * After each garbage collection, all implicit references
2729 * are removed. It is intended to be used in the before-garbage-collection
2730 * callback function.
2731 */
2732 static void AddImplicitReferences(Persistent<Object> parent,
2733 Persistent<Value>* children,
2734 size_t length);
2735
2736 /**
2721 * Initializes from snapshot if possible. Otherwise, attempts to 2737 * Initializes from snapshot if possible. Otherwise, attempts to
2722 * initialize from scratch. This function is called implicitly if 2738 * initialize from scratch. This function is called implicitly if
2723 * you use the API without calling it first. 2739 * you use the API without calling it first.
2724 */ 2740 */
2725 static bool Initialize(); 2741 static bool Initialize();
2726 2742
2727 /** 2743 /**
2728 * Adjusts the amount of registered external memory. Used to give 2744 * Adjusts the amount of registered external memory. Used to give
2729 * V8 an indication of the amount of externally allocated memory 2745 * V8 an indication of the amount of externally allocated memory
2730 * that is kept alive by JavaScript objects. V8 uses this to decide 2746 * that is kept alive by JavaScript objects. V8 uses this to decide
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3855 3871
3856 3872
3857 } // namespace v8 3873 } // namespace v8
3858 3874
3859 3875
3860 #undef V8EXPORT 3876 #undef V8EXPORT
3861 #undef TYPE_CHECK 3877 #undef TYPE_CHECK
3862 3878
3863 3879
3864 #endif // V8_H_ 3880 #endif // V8_H_
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698