This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Revert "Upgrade V8 to 2.0.5"

This reverts commit 20b945d.

Broken on Hagen's Macintosh. Don't have time to investigate.
  • Loading branch information...
1 parent 0981e7f commit a98afdfb2f05d163b2d4145f2d98c4a7ffd13bfd @ry ry committed Dec 19, 2009
Showing with 1,615 additions and 7,621 deletions.
  1. +0 −1 deps/v8/.gitignore
  2. +1 −2 deps/v8/AUTHORS
  3. +9 −41 deps/v8/ChangeLog
  4. +0 −19 deps/v8/SConstruct
  5. +10 −16 deps/v8/include/v8.h
  6. +1 −6 deps/v8/src/SConscript
  7. +90 −4 deps/v8/src/api.cc
  8. +98 −88 deps/v8/src/arm/assembler-arm.cc
  9. +97 −124 deps/v8/src/arm/assembler-arm.h
  10. +0 −267 deps/v8/src/arm/assembler-thumb2-inl.h
  11. +0 −1,821 deps/v8/src/arm/assembler-thumb2.cc
  12. +0 −1,027 deps/v8/src/arm/assembler-thumb2.h
  13. +47 −45 deps/v8/src/arm/codegen-arm.cc
  14. +17 −4 deps/v8/src/arm/codegen-arm.h
  15. +11 −10 deps/v8/src/arm/disasm-arm.cc
  16. +158 −192 deps/v8/src/arm/fast-codegen-arm.cc
  17. +0 −4 deps/v8/src/arm/frames-arm.cc
  18. +6 −4 deps/v8/src/arm/ic-arm.cc
  19. +3 −27 deps/v8/src/arm/macro-assembler-arm.cc
  20. +0 −6 deps/v8/src/arm/macro-assembler-arm.h
  21. +10 −10 deps/v8/src/arm/simulator-arm.cc
  22. +9 −38 deps/v8/src/arm/stub-cache-arm.cc
  23. +3 −0 deps/v8/src/arm/virtual-frame-arm.cc
  24. +1 −0 deps/v8/src/arm/virtual-frame-arm.h
  25. +0 −10 deps/v8/src/assembler.cc
  26. +0 −4 deps/v8/src/assembler.h
  27. +3 −14 deps/v8/src/ast.h
  28. +0 −26 deps/v8/src/bootstrapper.cc
  29. +0 −4 deps/v8/src/bootstrapper.h
  30. +54 −89 deps/v8/src/code-stubs.cc
  31. +0 −19 deps/v8/src/code-stubs.h
  32. +0 −49 deps/v8/src/codegen.h
  33. +44 −34 deps/v8/src/compiler.cc
  34. +0 −6 deps/v8/src/execution.cc
  35. +6 −9 deps/v8/src/factory.cc
  36. +2 −4 deps/v8/src/factory.h
  37. +85 −223 deps/v8/src/fast-codegen.cc
  38. +2 −193 deps/v8/src/fast-codegen.h
  39. +6 −11 deps/v8/src/global-handles.cc
  40. +1 −18 deps/v8/src/globals.h
  41. +0 −69 deps/v8/src/heap-inl.h
  42. +2 −3 deps/v8/src/heap-profiler.cc
  43. +1 −5 deps/v8/src/heap-profiler.h
  44. +29 −130 deps/v8/src/heap.cc
  45. +5 −64 deps/v8/src/heap.h
  46. +0 −11 deps/v8/src/ia32/assembler-ia32.cc
  47. +0 −1 deps/v8/src/ia32/assembler-ia32.h
  48. +22 −25 deps/v8/src/ia32/builtins-ia32.cc
  49. +55 −403 deps/v8/src/ia32/codegen-ia32.cc
  50. +11 −14 deps/v8/src/ia32/codegen-ia32.h
  51. +0 −8 deps/v8/src/ia32/disasm-ia32.cc
  52. +178 −203 deps/v8/src/ia32/fast-codegen-ia32.cc
  53. +44 −121 deps/v8/src/ia32/ic-ia32.cc
  54. +5 −43 deps/v8/src/ia32/macro-assembler-ia32.cc
  55. +2 −20 deps/v8/src/ia32/macro-assembler-ia32.h
  56. +44 −99 deps/v8/src/ia32/stub-cache-ia32.cc
  57. +4 −7 deps/v8/src/ia32/virtual-frame-ia32.cc
  58. +3 −3 deps/v8/src/ia32/virtual-frame-ia32.h
  59. +16 −6 deps/v8/src/ic.cc
  60. +6 −18 deps/v8/src/ic.h
  61. +0 −5 deps/v8/src/macro-assembler.h
  62. +64 −10 deps/v8/src/mark-compact.cc
  63. +11 −24 deps/v8/src/math.js
  64. +0 −5 deps/v8/src/messages.js
  65. +6 −6 deps/v8/src/objects-inl.h
  66. +4 −10 deps/v8/src/objects.cc
  67. +19 −28 deps/v8/src/objects.h
  68. +0 −3 deps/v8/src/parser.cc
  69. +5 −5 deps/v8/src/prettyprinter.cc
  70. +1 −1 deps/v8/src/prettyprinter.h
  71. +1 −1 deps/v8/src/rewriter.cc
  72. +11 −94 deps/v8/src/runtime.cc
  73. +0 −4 deps/v8/src/runtime.h
  74. +0 −6 deps/v8/src/runtime.js
  75. +2 −1 deps/v8/src/scopes.cc
  76. +3 −8 deps/v8/src/scopes.h
  77. +7 −15 deps/v8/src/serialize.cc
  78. +2 −2 deps/v8/src/spaces.cc
  79. +15 −12 deps/v8/src/spaces.h
  80. +2 −2 deps/v8/src/stub-cache.cc
  81. +5 −6 deps/v8/src/stub-cache.h
  82. +2 −0 deps/v8/src/token.cc
  83. +6 −3 deps/v8/src/token.h
  84. +2 −0 deps/v8/src/v8-counters.h
  85. +2 −205 deps/v8/src/v8natives.js
  86. +2 −2 deps/v8/src/variables.cc
  87. +7 −7 deps/v8/src/variables.h
  88. +1 −1 deps/v8/src/version.cc
  89. +19 −257 deps/v8/src/x64/codegen-x64.cc
  90. +3 −35 deps/v8/src/x64/codegen-x64.h
  91. +155 −199 deps/v8/src/x64/fast-codegen-x64.cc
  92. +21 −82 deps/v8/src/x64/ic-x64.cc
  93. +0 −125 deps/v8/src/x64/macro-assembler-x64.cc
  94. +1 −34 deps/v8/src/x64/macro-assembler-x64.h
  95. +11 −36 deps/v8/src/x64/stub-cache-x64.cc
  96. +0 −34 deps/v8/test/cctest/test-api.cc
  97. +0 −33 deps/v8/test/cctest/test-debug.cc
  98. +6 −6 deps/v8/test/cctest/test-macro-assembler-x64.cc
  99. +0 −35 deps/v8/test/mjsunit/compiler/thisfunction.js
  100. +1 −0 deps/v8/test/mjsunit/fuzz-natives.js
  101. +9 −42 deps/v8/test/mjsunit/math-min-max.js
  102. +0 −2 deps/v8/test/mjsunit/mjsunit.status
  103. +0 −250 deps/v8/test/mjsunit/object-create.js
  104. +0 −32 deps/v8/test/mjsunit/regress/regress-524.js
  105. +0 −47 deps/v8/test/mjsunit/regress/regress-540.js
  106. +0 −47 deps/v8/test/mjsunit/regress/regress-545.js
  107. +0 −45 deps/v8/test/mjsunit/try.js
  108. +8 −92 deps/v8/tools/stats-viewer.py
View
@@ -14,7 +14,6 @@
*.pdb
#*#
*~
-.cpplint-cache
d8
d8_g
shell
View
@@ -13,11 +13,10 @@ Daniel James <dnljms@gmail.com>
Jan de Mooij <jandemooij@gmail.com>
Jay Freeman <saurik@saurik.com>
Joel Stanley <joel.stan@gmail.com>
-John Jozwiak <jjozwiak@codeaurora.org>
Matt Hanselman <mjhanselman@gmail.com>
Paolo Giarrusso <p.giarrusso@gmail.com>
Rafal Krypa <rafal@krypa.net>
Rene Rebe <rene@exactcode.de>
Ryan Dahl <coldredlemur@gmail.com>
Patrick Gansterer <paroga@paroga.com>
-Subrato K De <subratokde@codeaurora.org>
+John Jozwiak <jjozwiak@codeaurora.org>
View
@@ -1,35 +1,3 @@
-2009-12-18: Version 2.0.5
-
- Extended to upper limit of map space to allow for 7 times as many map
- to be allocated (issue 524).
-
- Improved performance of code using closures.
-
- Improved performance of some binary operations involving doubles.
-
-
-2009-12-16: Version 2.0.4
-
- Added ECMAScript 5 Object.create.
-
- Improved performance of Math.max and Math.min.
-
- Optimized adding of strings on 64-bit platforms.
-
- Improved handling of external strings by using a separate table
- instead of weak handles. This improves garbage collection
- performance and uses less memory.
-
- Changed code generation for object and array literals in toplevel
- code to be more compact by doing more work in the runtime.
-
- Fixed a crash bug triggered when garbage collection happened during
- generation of a callback load inline cache stub.
-
- Fixed crash bug sometimes triggered when local variables shadowed
- parameters in functions that used the arguments object.
-
-
2009-12-03: Version 2.0.3
Optimized handling and adding of strings, for-in and Array.join.
@@ -67,7 +35,7 @@
Reverted a change which caused Chromium interactive ui test
failures.
-
+
2009-11-18: Version 2.0.0
Added support for VFP on ARM.
@@ -112,7 +80,7 @@
2009-10-16: Version 1.3.16
-
+
X64: Convert smis to holding 32 bits of payload.
Introduce v8::Integer::NewFromUnsigned method.
@@ -257,7 +225,7 @@
notifications when V8 has not yet been initialized.
Fixed ARM simulator compilation problem on Windows.
-
+
2009-08-25: Version 1.3.7
@@ -372,9 +340,9 @@
function is a built-in.
Initial implementation of constructor heap profile for JS objects.
-
+
More fine grained control of profiling aspects through the API.
-
+
Optimized the called as constructor check for API calls.
@@ -399,8 +367,8 @@
Added an external allocation limit to avoid issues where small V8
objects would hold on to large amounts of external memory without
causing garbage collections.
-
- Finished more of the inline caching stubs for x64 targets.
+
+ Finished more of the inline caching stubs for x64 targets.
2009-07-13: Version 1.2.14
@@ -480,9 +448,9 @@
Fixed a bug in the string type inference.
Fixed a bug in the handling of 'constant function' properties.
-
+
Improved overall performance.
-
+
2009-06-16: Version 1.2.8
View
19 deps/v8/SConstruct 100644 → 100755
@@ -143,9 +143,6 @@ LIBRARY_FLAGS = {
},
'os:macos': {
'CCFLAGS': ['-ansi', '-mmacosx-version-min=10.4'],
- 'library:shared': {
- 'CPPDEFINES': ['V8_SHARED']
- }
},
'os:freebsd': {
'CPPPATH' : ['/usr/local/include'],
@@ -181,12 +178,6 @@ LIBRARY_FLAGS = {
'CCFLAGS': ['-m32'],
'LINKFLAGS': ['-m32']
},
- 'armvariant:thumb2': {
- 'CPPDEFINES': ['V8_ARM_VARIANT_THUMB']
- },
- 'armvariant:arm': {
- 'CPPDEFINES': ['V8_ARM_VARIANT_ARM']
- },
'arch:x64': {
'CPPDEFINES': ['V8_TARGET_ARCH_X64'],
'CCFLAGS': ['-m64'],
@@ -252,7 +243,6 @@ V8_EXTRA_FLAGS = {
'gcc': {
'all': {
'WARNINGFLAGS': ['-Wall',
- '-Werror',
'-W',
'-Wno-unused-parameter',
'-Wnon-virtual-dtor']
@@ -665,11 +655,6 @@ SIMPLE_OPTIONS = {
'values': ['default', 'hidden'],
'default': 'hidden',
'help': 'shared library symbol visibility'
- },
- 'armvariant': {
- 'values': ['arm', 'thumb2', 'none'],
- 'default': 'none',
- 'help': 'generate thumb2 instructions instead of arm instructions (default)'
}
}
@@ -853,10 +838,6 @@ def PostprocessOptions(options):
# Print a warning if profiling is enabled without profiling support
print "Warning: forcing profilingsupport on when prof is on"
options['profilingsupport'] = 'on'
- if (options['armvariant'] == 'none' and options['arch'] == 'arm'):
- options['armvariant'] = 'arm'
- if (options['armvariant'] != 'none' and options['arch'] != 'arm'):
- options['armvariant'] = 'none'
def ParseEnvOverrides(arg, imports):
View
@@ -833,26 +833,13 @@ class V8EXPORT String : public Primitive {
* Returns true if the string is both external and ascii
*/
bool IsExternalAscii() const;
-
- class V8EXPORT ExternalStringResourceBase {
- public:
- virtual ~ExternalStringResourceBase() {}
- protected:
- ExternalStringResourceBase() {}
- private:
- // Disallow copying and assigning.
- ExternalStringResourceBase(const ExternalStringResourceBase&);
- void operator=(const ExternalStringResourceBase&);
- };
-
/**
* An ExternalStringResource is a wrapper around a two-byte string
* buffer that resides outside V8's heap. Implement an
* ExternalStringResource to manage the life cycle of the underlying
* buffer. Note that the string data must be immutable.
*/
- class V8EXPORT ExternalStringResource
- : public ExternalStringResourceBase {
+ class V8EXPORT ExternalStringResource { // NOLINT
public:
/**
* Override the destructor to manage the life cycle of the underlying
@@ -865,6 +852,10 @@ class V8EXPORT String : public Primitive {
virtual size_t length() const = 0;
protected:
ExternalStringResource() {}
+ private:
+ // Disallow copying and assigning.
+ ExternalStringResource(const ExternalStringResource&);
+ void operator=(const ExternalStringResource&);
};
/**
@@ -878,8 +869,7 @@ class V8EXPORT String : public Primitive {
* Use String::New or convert to 16 bit data for non-ASCII.
*/
- class V8EXPORT ExternalAsciiStringResource
- : public ExternalStringResourceBase {
+ class V8EXPORT ExternalAsciiStringResource { // NOLINT
public:
/**
* Override the destructor to manage the life cycle of the underlying
@@ -892,6 +882,10 @@ class V8EXPORT String : public Primitive {
virtual size_t length() const = 0;
protected:
ExternalAsciiStringResource() {}
+ private:
+ // Disallow copying and assigning.
+ ExternalAsciiStringResource(const ExternalAsciiStringResource&);
+ void operator=(const ExternalAsciiStringResource&);
};
/**
View
@@ -106,6 +106,7 @@ SOURCES = {
zone.cc
"""),
'arch:arm': Split("""
+ arm/assembler-arm.cc
arm/builtins-arm.cc
arm/codegen-arm.cc
arm/constants-arm.cc
@@ -122,12 +123,6 @@ SOURCES = {
arm/stub-cache-arm.cc
arm/virtual-frame-arm.cc
"""),
- 'armvariant:arm': Split("""
- arm/assembler-arm.cc
- """),
- 'armvariant:thumb2': Split("""
- arm/assembler-thumb2.cc
- """),
'arch:ia32': Split("""
ia32/assembler-ia32.cc
ia32/builtins-ia32.cc
View
@@ -3082,13 +3082,81 @@ i::Handle<i::String> NewExternalAsciiStringHandle(
}
+static void DisposeExternalString(v8::Persistent<v8::Value> obj,
+ void* parameter) {
+ ENTER_V8;
+ i::ExternalTwoByteString* str =
+ i::ExternalTwoByteString::cast(*Utils::OpenHandle(*obj));
+
+ // External symbols are deleted when they are pruned out of the symbol
+ // table. Generally external symbols are not registered with the weak handle
+ // callbacks unless they are upgraded to a symbol after being externalized.
+ if (!str->IsSymbol()) {
+ v8::String::ExternalStringResource* resource =
+ reinterpret_cast<v8::String::ExternalStringResource*>(parameter);
+ if (resource != NULL) {
+ const int total_size =
+ static_cast<int>(resource->length() * sizeof(*resource->data()));
+ i::Counters::total_external_string_memory.Decrement(total_size);
+
+ // The object will continue to live in the JavaScript heap until the
+ // handle is entirely cleaned out by the next GC. For example the
+ // destructor for the resource below could bring it back to life again.
+ // Which is why we make sure to not have a dangling pointer here.
+ str->set_resource(NULL);
+ delete resource;
+ }
+ }
+
+ // In any case we do not need this handle any longer.
+ obj.Dispose();
+}
+
+
+static void DisposeExternalAsciiString(v8::Persistent<v8::Value> obj,
+ void* parameter) {
+ ENTER_V8;
+ i::ExternalAsciiString* str =
+ i::ExternalAsciiString::cast(*Utils::OpenHandle(*obj));
+
+ // External symbols are deleted when they are pruned out of the symbol
+ // table. Generally external symbols are not registered with the weak handle
+ // callbacks unless they are upgraded to a symbol after being externalized.
+ if (!str->IsSymbol()) {
+ v8::String::ExternalAsciiStringResource* resource =
+ reinterpret_cast<v8::String::ExternalAsciiStringResource*>(parameter);
+ if (resource != NULL) {
+ const int total_size =
+ static_cast<int>(resource->length() * sizeof(*resource->data()));
+ i::Counters::total_external_string_memory.Decrement(total_size);
+
+ // The object will continue to live in the JavaScript heap until the
+ // handle is entirely cleaned out by the next GC. For example the
+ // destructor for the resource below could bring it back to life again.
+ // Which is why we make sure to not have a dangling pointer here.
+ str->set_resource(NULL);
+ delete resource;
+ }
+ }
+
+ // In any case we do not need this handle any longer.
+ obj.Dispose();
+}
+
+
Local<String> v8::String::NewExternal(
v8::String::ExternalStringResource* resource) {
EnsureInitialized("v8::String::NewExternal()");
LOG_API("String::NewExternal");
ENTER_V8;
+ const int total_size =
+ static_cast<int>(resource->length() * sizeof(*resource->data()));
+ i::Counters::total_external_string_memory.Increment(total_size);
i::Handle<i::String> result = NewExternalStringHandle(resource);
- i::ExternalStringTable::AddString(*result);
+ i::Handle<i::Object> handle = i::GlobalHandles::Create(*result);
+ i::GlobalHandles::MakeWeak(handle.location(),
+ resource,
+ &DisposeExternalString);
return Utils::ToLocal(result);
}
@@ -3100,7 +3168,13 @@ bool v8::String::MakeExternal(v8::String::ExternalStringResource* resource) {
i::Handle<i::String> obj = Utils::OpenHandle(this);
bool result = obj->MakeExternal(resource);
if (result && !obj->IsSymbol()) {
- i::ExternalStringTable::AddString(*obj);
+ // Operation was successful and the string is not a symbol. In this case
+ // we need to make sure that the we call the destructor for the external
+ // resource when no strong references to the string remain.
+ i::Handle<i::Object> handle = i::GlobalHandles::Create(*obj);
+ i::GlobalHandles::MakeWeak(handle.location(),
+ resource,
+ &DisposeExternalString);
}
return result;
}
@@ -3111,8 +3185,14 @@ Local<String> v8::String::NewExternal(
EnsureInitialized("v8::String::NewExternal()");
LOG_API("String::NewExternal");
ENTER_V8;
+ const int total_size =
+ static_cast<int>(resource->length() * sizeof(*resource->data()));
+ i::Counters::total_external_string_memory.Increment(total_size);
i::Handle<i::String> result = NewExternalAsciiStringHandle(resource);
- i::ExternalStringTable::AddString(*result);
+ i::Handle<i::Object> handle = i::GlobalHandles::Create(*result);
+ i::GlobalHandles::MakeWeak(handle.location(),
+ resource,
+ &DisposeExternalAsciiString);
return Utils::ToLocal(result);
}
@@ -3125,7 +3205,13 @@ bool v8::String::MakeExternal(
i::Handle<i::String> obj = Utils::OpenHandle(this);
bool result = obj->MakeExternal(resource);
if (result && !obj->IsSymbol()) {
- i::ExternalStringTable::AddString(*obj);
+ // Operation was successful and the string is not a symbol. In this case
+ // we need to make sure that the we call the destructor for the external
+ // resource when no strong references to the string remain.
+ i::Handle<i::Object> handle = i::GlobalHandles::Create(*obj);
+ i::GlobalHandles::MakeWeak(handle.location(),
+ resource,
+ &DisposeExternalAsciiString);
}
return result;
}
Oops, something went wrong.

0 comments on commit a98afdf

Please sign in to comment.