Permalink
Browse files

Upgrade v8 to 1.3.3

  • Loading branch information...
1 parent 3b0408e commit 79ff085c4a7e4951158912ee502eef807233540c @ry ry committed Aug 13, 2009
Showing with 7,229 additions and 1,232 deletions.
  1. +21 −0 deps/v8/.gitignore
  2. +18 −0 deps/v8/ChangeLog
  3. +6 −0 deps/v8/LICENSE
  4. +6 −4 deps/v8/SConstruct
  5. +11 −0 deps/v8/include/v8.h
  6. +33 −3 deps/v8/src/api.cc
  7. +185 −8 deps/v8/src/arm/cfg-arm.cc
  8. +31 −0 deps/v8/src/arm/codegen-arm-inl.h
  9. +59 −242 deps/v8/src/arm/codegen-arm.cc
  10. +99 −18 deps/v8/src/arm/codegen-arm.h
  11. +125 −211 deps/v8/src/arm/jump-target-arm.cc
  12. +32 −94 deps/v8/src/arm/virtual-frame-arm.cc
  13. +31 −42 deps/v8/src/arm/virtual-frame-arm.h
  14. +353 −75 deps/v8/src/cfg.cc
  15. +550 −64 deps/v8/src/cfg.h
  16. +11 −5 deps/v8/src/d8.cc
  17. +1 −0 deps/v8/src/d8.h
  18. +8 −0 deps/v8/src/execution.cc
  19. +5 −5 deps/v8/src/heap.cc
  20. +6 −8 deps/v8/src/ia32/builtins-ia32.cc
  21. +186 −8 deps/v8/src/ia32/cfg-ia32.cc
  22. +12 −60 deps/v8/src/ia32/codegen-ia32.cc
  23. +51 −0 deps/v8/src/ia32/codegen-ia32.h
  24. +13 −0 deps/v8/src/ia32/cpu-ia32.cc
  25. +64 −0 deps/v8/src/ia32/jump-target-ia32.cc
  26. +27 −21 deps/v8/src/ia32/macro-assembler-ia32.cc
  27. +11 −9 deps/v8/src/ia32/regexp-macro-assembler-ia32.cc
  28. +1 −0 deps/v8/src/ia32/regexp-macro-assembler-ia32.h
  29. +1 −0 deps/v8/src/ia32/virtual-frame-ia32.cc
  30. +0 −61 deps/v8/src/jump-target.cc
  31. +2 −2 deps/v8/src/log.cc
  32. +19 −0 deps/v8/src/objects-inl.h
  33. +0 −18 deps/v8/src/objects.cc
  34. +3 −3 deps/v8/src/objects.h
  35. +17 −19 deps/v8/src/platform-macos.cc
  36. +9 −10 deps/v8/src/spaces-inl.h
  37. +12 −7 deps/v8/src/spaces.cc
  38. +7 −4 deps/v8/src/spaces.h
  39. +3,924 −0 deps/v8/src/third_party/valgrind/valgrind.h
  40. +1 −1 deps/v8/src/version.cc
  41. +20 −0 deps/v8/src/x64/assembler-x64.cc
  42. +2 −0 deps/v8/src/x64/assembler-x64.h
  43. +150 −3 deps/v8/src/x64/builtins-x64.cc
  44. +186 −9 deps/v8/src/x64/cfg-x64.cc
  45. +560 −181 deps/v8/src/x64/codegen-x64.cc
  46. +60 −0 deps/v8/src/x64/codegen-x64.h
  47. +162 −0 deps/v8/src/x64/ic-x64.cc
  48. +64 −0 deps/v8/src/x64/jump-target-x64.cc
  49. +26 −19 deps/v8/src/x64/macro-assembler-x64.cc
  50. +1 −0 deps/v8/src/x64/virtual-frame-x64.cc
  51. +47 −0 deps/v8/test/cctest/test-api.cc
  52. +0 −18 deps/v8/test/mozilla/mozilla.status
View
@@ -0,0 +1,21 @@
+*.a
+*.exe
+*.lib
+*.log
+*.map
+*.mk
+*.ncb
+*.pyc
+*.scons*
+*.suo
+*.user
+*.xcodeproj
+d8
+d8_g
+shell
+shell_g
+/obj/
+/tools/visual_studio/Debug
+/tools/visual_studio/Release
+/xcodebuild/
+TAGS
View
@@ -1,3 +1,21 @@
+2009-08-12: Version 1.3.3
+
+ Fix issue 417: incorrect %t placeholder expansion.
+
+ Add .gitignore file similar to Chromium's one.
+
+ Fix SConstruct file to build with new logging code for Android.
+
+ API: added function to find instance of template in prototype
+ chain. Inlined Object::IsInstanceOf.
+
+ Land change to notify valgrind when we modify code on x86.
+
+ Add api call to determine whether a string can be externalized.
+
+ Add a write() command to d8.
+
+
2009-08-05: Version 1.3.2
Started new compiler infrastructure for two-pass compilation using a
View
@@ -20,6 +20,12 @@ are:
copyrighted by Douglas Crockford and Baruch Even and released under
an MIT license.
+ - Valgrind client API header, located at third_party/valgrind/valgrind.h
+ This is release under the BSD license.
+
+ - Valgrind client API header, located at third_party/valgrind/valgrind.h
+ This is release under the BSD license.
+
These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.
View
@@ -79,7 +79,9 @@ ANDROID_INCLUDES = [ANDROID_TOP + '/bionic/libc/arch-arm/include',
ANDROID_TOP + '/bionic/libc/kernel/arch-arm',
ANDROID_TOP + '/bionic/libm/include',
ANDROID_TOP + '/bionic/libm/include/arch/arm',
- ANDROID_TOP + '/bionic/libthread_db/include']
+ ANDROID_TOP + '/bionic/libthread_db/include',
+ ANDROID_TOP + '/frameworks/base/include',
+ ANDROID_TOP + '/system/core/include']
ANDROID_LINKFLAGS = ['-nostdlib',
'-Bdynamic',
@@ -331,7 +333,7 @@ CCTEST_EXTRA_FLAGS = {
'CPPPATH': ANDROID_INCLUDES,
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'],
'LINKFLAGS': ANDROID_LINKFLAGS,
- 'LIBS': ['c', 'stdc++', 'm'],
+ 'LIBS': ['log', 'c', 'stdc++', 'm'],
'mode:release': {
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
@@ -382,7 +384,7 @@ SAMPLE_FLAGS = {
'CPPPATH': ANDROID_INCLUDES,
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'],
'LINKFLAGS': ANDROID_LINKFLAGS,
- 'LIBS': ['c', 'stdc++', 'm'],
+ 'LIBS': ['log', 'c', 'stdc++', 'm'],
'mode:release': {
'CPPDEFINES': ['SK_RELEASE', 'NDEBUG']
}
@@ -470,7 +472,7 @@ D8_FLAGS = {
'os:android': {
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib'],
'LINKFLAGS': ANDROID_LINKFLAGS,
- 'LIBS': ['c', 'stdc++', 'm'],
+ 'LIBS': ['log', 'c', 'stdc++', 'm'],
},
'os:win32': {
'LIBS': ['winmm', 'ws2_32'],
View
@@ -901,6 +901,11 @@ class V8EXPORT String : public Primitive {
*/
bool MakeExternal(ExternalAsciiStringResource* resource);
+ /**
+ * Returns true if this string can be made external.
+ */
+ bool CanMakeExternal();
+
/** Creates an undetectable string from the supplied ascii or utf-8 data.*/
static Local<String> NewUndetectable(const char* data, int length = -1);
@@ -1099,6 +1104,12 @@ class V8EXPORT Object : public Value {
Local<Value> GetPrototype();
/**
+ * Finds an instance of the given function template in the prototype
+ * chain.
+ */
+ Local<Object> FindInstanceInPrototypeChain(Handle<FunctionTemplate> tmpl);
+
+ /**
* Call builtin Object.prototype.toString on this object.
* This is different from Value::ToString() that may call
* user-defined toString function. This one does not.
View
@@ -1928,6 +1928,22 @@ Local<Value> v8::Object::GetPrototype() {
}
+Local<Object> v8::Object::FindInstanceInPrototypeChain(
+ v8::Handle<FunctionTemplate> tmpl) {
+ ON_BAILOUT("v8::Object::FindInstanceInPrototypeChain()",
+ return Local<v8::Object>());
+ ENTER_V8;
+ i::JSObject* object = *Utils::OpenHandle(this);
+ i::FunctionTemplateInfo* tmpl_info = *Utils::OpenHandle(*tmpl);
+ while (!object->IsInstanceOf(tmpl_info)) {
+ i::Object* prototype = object->GetPrototype();
+ if (!prototype->IsJSObject()) return Local<Object>();
+ object = i::JSObject::cast(prototype);
+ }
+ return Utils::ToLocal(i::Handle<i::JSObject>(object));
+}
+
+
Local<Array> v8::Object::GetPropertyNames() {
ON_BAILOUT("v8::Object::GetPropertyNames()", return Local<v8::Array>());
ENTER_V8;
@@ -2573,9 +2589,12 @@ Persistent<Context> v8::Context::New(
i::Handle<i::Context> env;
{
ENTER_V8;
+#if defined(ANDROID)
+ // On mobile devices, full GC is expensive.
+#else
// Give the heap a chance to cleanup if we've disposed contexts.
i::Heap::CollectAllGarbageIfContextDisposed();
-
+#endif
v8::Handle<ObjectTemplate> proxy_template = global_template;
i::Handle<i::FunctionTemplateInfo> proxy_constructor;
i::Handle<i::FunctionTemplateInfo> global_constructor;
@@ -2967,7 +2986,7 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
if (IsDeadCheck("v8::String::MakeExternal()")) return false;
if (this->IsExternal()) return false; // Already an external string.
ENTER_V8;
- i::Handle <i::String> obj = Utils::OpenHandle(this);
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
bool result = obj->MakeExternal(resource);
if (result && !obj->IsSymbol()) {
// Operation was successful and the string is not a symbol. In this case
@@ -3003,7 +3022,7 @@ bool v8::String::MakeExternal(
if (IsDeadCheck("v8::String::MakeExternal()")) return false;
if (this->IsExternal()) return false; // Already an external string.
ENTER_V8;
- i::Handle <i::String> obj = Utils::OpenHandle(this);
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
bool result = obj->MakeExternal(resource);
if (result && !obj->IsSymbol()) {
// Operation was successful and the string is not a symbol. In this case
@@ -3018,6 +3037,17 @@ bool v8::String::MakeExternal(
}
+bool v8::String::CanMakeExternal() {
+ if (IsDeadCheck("v8::String::CanMakeExternal()")) return false;
+ i::Handle<i::String> obj = Utils::OpenHandle(this);
+ int size = obj->Size(); // Byte size of the original string.
+ if (size < i::ExternalString::kSize)
+ return false;
+ i::StringShape shape(*obj);
+ return !shape.IsExternal();
+}
+
+
Local<v8::Object> v8::Object::New() {
EnsureInitialized("v8::Object::New()");
LOG_API("Object::New");
Oops, something went wrong.

0 comments on commit 79ff085

Please sign in to comment.