Changed all text files to have native svn:eol-style.
Added a few samples and support for building them. The samples include a simple shell that can be used to benchmark and test V8.
Changed V8::GetVersion to return the version as a string.
Added source for lazily loaded scripts to snapshots and made serialization non-destructive.
Improved ARM support by fixing the write barrier code to use aligned loads and stores and by removing premature locals optimization that relied on broken support for callee-saved registers (removed).
Refactored the code for marking live objects during garbage collection and the code for allocating objects in paged spaces. Introduced an abstraction for the map word of a heap-allocated object and changed the memory allocator to allocate executable memory only for spaces that may contain code objects.
Moved StringBuilder to utils.h and ScopedLock to platform.h, where they can be used by debugging and logging modules. Added thread-safe message queues for dealing with debugger events.
Fixed the source code reported by toString for certain builtin empty functions and made sure that the prototype property of a function is enumerable.
Improved performance of converting values to condition flags in generated code.
Merged disassembler-{arch} files.
git-svn-id: http://v8.googlecode.com/svn/trunk@8 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/public/v8.h b/public/v8.h
index 63d2e06..d2412a1 100644
--- a/public/v8.h
+++ b/public/v8.h
@@ -747,7 +747,7 @@
* be careful to supply the length parameter.
* If it is not given, the function calls
* 'strlen' to determine the buffer length, it might be
- * wrong if '\0' character is in the 'data'.
+ * wrong if 'data' contains a null character.
*/
static Local<String> New(const char* data, int length = -1);
@@ -777,10 +777,10 @@
*/
static Local<String> NewExternal(ExternalAsciiStringResource* resource);
- /** Creates an undetectable string from the supplied character.*/
+ /** Creates an undetectable string from the supplied ascii or utf-8 data.*/
static Local<String> NewUndetectable(const char* data, int length = -1);
- /** Creates an undetectable string from the supplied unsigned integer.*/
+ /** Creates an undetectable string from the supplied utf-16 data.*/
static Local<String> NewUndetectable(const uint16_t* data, int length = -1);
/**
@@ -1562,13 +1562,6 @@
};
-/**
- * Ignore
- */
-struct VersionInfo {
- int major, minor, build_major, build_minor, revision;
-};
-
// --- C o u n t e r s C a l l b a c k s
typedef int* (*CounterLookupCallback)(const wchar_t* name);
@@ -1633,8 +1626,8 @@
*/
static void SetFlagsFromString(const char* str, int length);
- /** Sets the version fields in the given VersionInfo struct.*/
- static void GetVersion(VersionInfo* info);
+ /** Get the version string. */
+ static const char* GetVersion();
/**
* Enables the host application to provide a mechanism for recording
@@ -1683,6 +1676,14 @@
*/
static bool Initialize();
+
+ /**
+ * Adjusts the about of registered external memory.
+ * Returns the adjusted value.
+ * Used for triggering a global GC earlier than otherwise.
+ */
+ static int AdjustAmountOfExternalAllocatedMemory(int change_in_bytes);
+
private:
V8();