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

Upgrade V8 to 3.9.2

  • Loading branch information
isaacs committed Feb 6, 2012
1 parent 23514fc commit 8be699494ec67c3ba895bd8e1c9e3e73b02311d3
Showing with 4,435 additions and 1,705 deletions.
  1. +1 −0 deps/v8/AUTHORS
  2. +29 −0 deps/v8/ChangeLog
  3. +6 −0 deps/v8/build/common.gypi
  4. +12 −1 deps/v8/include/v8-profiler.h
  5. +6 −0 deps/v8/include/v8.h
  6. +0 −10 deps/v8/src/accessors.cc
  7. +15 −1 deps/v8/src/api.cc
  8. +8 −45 deps/v8/src/arm/builtins-arm.cc
  9. +127 −80 deps/v8/src/arm/code-stubs-arm.cc
  10. +12 −12 deps/v8/src/arm/codegen-arm.cc
  11. +32 −8 deps/v8/src/arm/debug-arm.cc
  12. +17 −4 deps/v8/src/arm/full-codegen-arm.cc
  13. +55 −7 deps/v8/src/arm/ic-arm.cc
  14. +11 −21 deps/v8/src/arm/lithium-arm.cc
  15. +0 −3 deps/v8/src/arm/lithium-arm.h
  16. +26 −28 deps/v8/src/arm/lithium-codegen-arm.cc
  17. +57 −0 deps/v8/src/arm/macro-assembler-arm.cc
  18. +24 −0 deps/v8/src/arm/macro-assembler-arm.h
  19. +3 −3 deps/v8/src/arm/regexp-macro-assembler-arm.cc
  20. +46 −16 deps/v8/src/arm/stub-cache-arm.cc
  21. +17 −18 deps/v8/src/ast.cc
  22. +17 −29 deps/v8/src/bootstrapper.cc
  23. +77 −149 deps/v8/src/builtins.cc
  24. +24 −23 deps/v8/src/builtins.h
  25. +4 −12 deps/v8/src/checks.h
  26. +6 −0 deps/v8/src/code-stubs.cc
  27. +28 −21 deps/v8/src/code-stubs.h
  28. +2 −2 deps/v8/src/compiler.cc
  29. +19 −3 deps/v8/src/contexts.h
  30. +8 −0 deps/v8/src/d8.cc
  31. +25 −21 deps/v8/src/debug.cc
  32. +3 −1 deps/v8/src/debug.h
  33. +6 −0 deps/v8/src/deoptimizer.cc
  34. +10 −1 deps/v8/src/deoptimizer.h
  35. +1 −1 deps/v8/src/execution.cc
  36. +1 −1 deps/v8/src/extensions/gc-extension.cc
  37. +19 −15 deps/v8/src/factory.cc
  38. +3 −1 deps/v8/src/factory.h
  39. +8 −15 deps/v8/src/flag-definitions.h
  40. +24 −2 deps/v8/src/full-codegen.cc
  41. +13 −1 deps/v8/src/full-codegen.h
  42. +94 −8 deps/v8/src/heap-inl.h
  43. +231 −54 deps/v8/src/heap.cc
  44. +104 −98 deps/v8/src/heap.h
  45. +9 −1 deps/v8/src/hydrogen-instructions.cc
  46. +1 −0 deps/v8/src/hydrogen-instructions.h
  47. +18 −15 deps/v8/src/hydrogen.cc
  48. +6 −0 deps/v8/src/hydrogen.h
  49. +0 −2 deps/v8/src/ia32/assembler-ia32.h
  50. +12 −52 deps/v8/src/ia32/builtins-ia32.cc
  51. +85 −59 deps/v8/src/ia32/code-stubs-ia32.cc
  52. +38 −14 deps/v8/src/ia32/debug-ia32.cc
  53. +24 −19 deps/v8/src/ia32/full-codegen-ia32.cc
  54. +53 −5 deps/v8/src/ia32/ic-ia32.cc
  55. +2 −2 deps/v8/src/ia32/lithium-codegen-ia32.cc
  56. +8 −16 deps/v8/src/ia32/lithium-ia32.cc
  57. +0 −3 deps/v8/src/ia32/lithium-ia32.h
  58. +40 −0 deps/v8/src/ia32/macro-assembler-ia32.cc
  59. +16 −0 deps/v8/src/ia32/macro-assembler-ia32.h
  60. +1 −0 deps/v8/src/isolate.cc
  61. +7 −0 deps/v8/src/isolate.h
  62. +44 −47 deps/v8/src/lithium-allocator.cc
  63. +14 −13 deps/v8/src/lithium-allocator.h
  64. +0 −6 deps/v8/src/lithium.cc
  65. +7 −6 deps/v8/src/lithium.h
  66. +6 −3 deps/v8/src/log.cc
  67. +1 −0 deps/v8/src/mark-compact-inl.h
  68. +163 −15 deps/v8/src/mark-compact.cc
  69. +3 −1 deps/v8/src/mark-compact.h
  70. +9 −47 deps/v8/src/mips/builtins-mips.cc
  71. +114 −60 deps/v8/src/mips/code-stubs-mips.cc
  72. +10 −8 deps/v8/src/mips/codegen-mips.cc
  73. +8 −4 deps/v8/src/mips/cpu-mips.cc
  74. +32 −8 deps/v8/src/mips/debug-mips.cc
  75. +110 −13 deps/v8/src/mips/deoptimizer-mips.cc
  76. +5 −0 deps/v8/src/mips/frames-mips.h
  77. +16 −3 deps/v8/src/mips/full-codegen-mips.cc
  78. +37 −32 deps/v8/src/mips/lithium-codegen-mips.cc
  79. +22 −24 deps/v8/src/mips/lithium-mips.cc
  80. +0 −3 deps/v8/src/mips/lithium-mips.h
  81. +83 −0 deps/v8/src/mips/macro-assembler-mips.cc
  82. +23 −26 deps/v8/src/mips/macro-assembler-mips.h
  83. +1 −1 deps/v8/src/mksnapshot.cc
  84. +127 −5 deps/v8/src/objects-inl.h
  85. +6 −2 deps/v8/src/objects-printer.cc
  86. +4 −0 deps/v8/src/objects-visiting-inl.h
  87. +185 −108 deps/v8/src/objects.cc
  88. +66 −11 deps/v8/src/objects.h
  89. +3 −3 deps/v8/src/parser.cc
  90. +32 −0 deps/v8/src/platform-linux.cc
  91. +128 −71 deps/v8/src/profile-generator.cc
  92. +10 −1 deps/v8/src/profile-generator.h
  93. +1 −27 deps/v8/src/property-details.h
  94. +28 −1 deps/v8/src/property.cc
  95. +6 −2 deps/v8/src/property.h
  96. +51 −45 deps/v8/src/runtime.cc
  97. +3 −5 deps/v8/src/scopes.cc
  98. +2 −44 deps/v8/src/spaces.h
  99. +4 −2 deps/v8/src/stub-cache.h
  100. +23 −13 deps/v8/src/type-info.cc
  101. +3 −0 deps/v8/src/type-info.h
  102. +2 −2 deps/v8/src/version.cc
  103. +7 −47 deps/v8/src/x64/builtins-x64.cc
  104. +77 −11 deps/v8/src/x64/code-stubs-x64.cc
  105. +36 −13 deps/v8/src/x64/debug-x64.cc
  106. +16 −3 deps/v8/src/x64/full-codegen-x64.cc
  107. +51 −3 deps/v8/src/x64/ic-x64.cc
  108. +2 −2 deps/v8/src/x64/lithium-codegen-x64.cc
  109. +6 −16 deps/v8/src/x64/lithium-x64.cc
  110. +0 −3 deps/v8/src/x64/lithium-x64.h
  111. +40 −0 deps/v8/src/x64/macro-assembler-x64.cc
  112. +16 −0 deps/v8/src/x64/macro-assembler-x64.h
  113. +5 −2 deps/v8/src/zone-inl.h
  114. +3 −3 deps/v8/src/zone.cc
  115. +6 −1 deps/v8/src/zone.h
  116. +4 −0 deps/v8/test/cctest/test-api.cc
  117. +61 −0 deps/v8/test/cctest/test-debug.cc
  118. +86 −10 deps/v8/test/cctest/test-heap-profiler.cc
  119. +5 −5 deps/v8/test/cctest/test-heap.cc
  120. +1 −1 deps/v8/test/cctest/test-mark-compact.cc
  121. +2 −2 deps/v8/test/mjsunit/array-construct-transition.js
  122. +62 −0 deps/v8/test/mjsunit/compiler/inline-arity-mismatch.js
  123. +16 −12 deps/v8/test/mjsunit/elements-kind.js
  124. +2 −2 deps/v8/test/mjsunit/elements-transition.js
  125. +4 −4 deps/v8/test/mjsunit/regress/regress-1229.js
  126. +64 −0 deps/v8/test/mjsunit/regress/regress-crbug-107996.js
  127. +47 −0 deps/v8/test/mjsunit/regress/regress-debug-code-recompilation.js
  128. +478 −0 deps/v8/tools/gen-postmortem-metadata.py
  129. +34 −0 deps/v8/tools/gyp/v8.gyp
  130. +361 −0 deps/v8/tools/merge-to-branch.sh
@@ -8,6 +8,7 @@ Sigma Designs Inc.
ARM Ltd.
Hewlett-Packard Development Company, LP
Igalia, S.L.
Joyent, Inc.

Akinori MUSHA <knu@FreeBSD.org>
Alexander Botero-Lowry <alexbl@FreeBSD.org>
@@ -1,3 +1,32 @@
2012-02-06: Version 3.9.2

Add timestamp to --trace-gc output. (issue 1932)

Heap profiler reports implicit references.

Optionally export metadata with libv8 to enable debuggers to inspect V8
state.


2012-02-02: Version 3.9.1

Fixed memory leak in NativeObjectsExplorer::FindOrAddGroupInfo
(Chromium issue 112315).

Fixed a crash in dev tools (Chromium issue 107996).

Added 'dependencies_traverse': 1 to v8 GYP target.

Performance and stability improvements on all platforms.


2012-02-01: Version 3.9.0

Reduce memory use immediately after starting V8.

Stability fixes and performance improvements on all platforms.


2012-01-26: Version 3.8.9

Flush number string cache on GC (issue 1605).
@@ -85,6 +85,11 @@
'v8_use_liveobjectlist%': 'false',
'werror%': '-Werror',

# With post mortem support enabled, metadata is embedded into libv8 that
# describes various parameters of the VM for use by debuggers. See
# tools/gen-postmortem-metadata.py for details.
'v8_postmortem_support%': 'false',

# For a shared library build, results in "libv8-<(soname_version).so".
'soname_version%': '',
},
@@ -322,6 +327,7 @@
}], # OS=="mac"
['OS=="win"', {
'msvs_configuration_attributes': {
'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
'CharacterSet': '1',
},
@@ -476,11 +476,22 @@ class V8EXPORT RetainedObjectInfo { // NOLINT
virtual intptr_t GetHash() = 0;

/**
* Returns human-readable label. It must be a NUL-terminated UTF-8
* Returns human-readable label. It must be a null-terminated UTF-8
* encoded string. V8 copies its contents during a call to GetLabel.
*/
virtual const char* GetLabel() = 0;

/**
* Returns human-readable group label. It must be a null-terminated UTF-8
* encoded string. V8 copies its contents during a call to GetGroupLabel.
* Heap snapshot generator will collect all the group names, create
* top level entries with these names and attach the objects to the
* corresponding top level group objects. There is a default
* implementation which is required because embedders don't have their
* own implementation yet.
*/
virtual const char* GetGroupLabel() { return GetLabel(); }

/**
* Returns element count in case if a global handle retains
* a subgraph by holding one of its nodes.
@@ -3538,6 +3538,12 @@ class V8EXPORT Context {
*/
void AllowCodeGenerationFromStrings(bool allow);

/**
* Returns true if code generation from strings is allowed for the context.
* For more details see AllowCodeGenerationFromStrings(bool) documentation.
*/
bool IsCodeGenerationFromStringsAllowed();

/**
* Stack-allocated class which sets the execution context for all
* operations executed within a local scope.
@@ -487,16 +487,6 @@ MaybeObject* Accessors::FunctionSetPrototype(JSObject* object,
NONE);
}

if (function->has_initial_map()) {
// If the function has allocated the initial map
// replace it with a copy containing the new prototype.
Object* new_map;
{ MaybeObject* maybe_new_map =
function->initial_map()->CopyDropTransitions();
if (!maybe_new_map->ToObject(&new_map)) return maybe_new_map;
}
function->set_initial_map(Map::cast(new_map));
}
Object* prototype;
{ MaybeObject* maybe_prototype = function->SetPrototype(value);
if (!maybe_prototype->ToObject(&prototype)) return maybe_prototype;
@@ -4077,7 +4077,7 @@ bool v8::V8::IdleNotification(int hint) {
void v8::V8::LowMemoryNotification() {
i::Isolate* isolate = i::Isolate::Current();
if (isolate == NULL || !isolate->IsInitialized()) return;
isolate->heap()->CollectAllAvailableGarbage();
isolate->heap()->CollectAllAvailableGarbage("low memory notification");
}


@@ -4313,6 +4313,20 @@ void Context::AllowCodeGenerationFromStrings(bool allow) {
}


bool Context::IsCodeGenerationFromStringsAllowed() {
i::Isolate* isolate = i::Isolate::Current();
if (IsDeadCheck(isolate,
"v8::Context::IsCodeGenerationFromStringsAllowed()")) {
return false;
}
ENTER_V8(isolate);
i::Object** ctx = reinterpret_cast<i::Object**>(this);
i::Handle<i::Context> context =
i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
return !context->allow_code_gen_from_strings()->IsFalse();
}


void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) {
i::GlobalHandles::SetWrapperClassId(global_handle, class_id);
}
@@ -114,9 +114,7 @@ static void AllocateEmptyJSArray(MacroAssembler* masm,
Label* gc_required) {
const int initial_capacity = JSArray::kPreallocatedArrayElements;
STATIC_ASSERT(initial_capacity >= 0);
// Load the initial map from the array function.
__ ldr(scratch1, FieldMemOperand(array_function,
JSFunction::kPrototypeOrInitialMapOffset));
__ LoadInitialArrayMap(array_function, scratch2, scratch1);

// Allocate the JSArray object together with space for a fixed array with the
// requested elements.
@@ -210,9 +208,7 @@ static void AllocateJSArray(MacroAssembler* masm,
bool fill_with_hole,
Label* gc_required) {
// Load the initial map from the array function.
__ ldr(elements_array_storage,
FieldMemOperand(array_function,
JSFunction::kPrototypeOrInitialMapOffset));
__ LoadInitialArrayMap(array_function, scratch2, elements_array_storage);

if (FLAG_debug_code) { // Assert that array size is not zero.
__ tst(array_size, array_size);
@@ -667,50 +663,16 @@ void Builtins::Generate_StringConstructCode(MacroAssembler* masm) {
}


void Builtins::Generate_JSConstructCall(MacroAssembler* masm) {
static void Generate_JSConstructStubHelper(MacroAssembler* masm,
bool is_api_function,
bool count_constructions) {
// ----------- S t a t e -------------
// -- r0 : number of arguments
// -- r1 : constructor function
// -- lr : return address
// -- sp[...]: constructor arguments
// -----------------------------------

Label slow, non_function_call;
// Check that the function is not a smi.
__ JumpIfSmi(r1, &non_function_call);
// Check that the function is a JSFunction.
__ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE);
__ b(ne, &slow);

// Jump to the function-specific construct stub.
__ ldr(r2, FieldMemOperand(r1, JSFunction::kSharedFunctionInfoOffset));
__ ldr(r2, FieldMemOperand(r2, SharedFunctionInfo::kConstructStubOffset));
__ add(pc, r2, Operand(Code::kHeaderSize - kHeapObjectTag));

// r0: number of arguments
// r1: called object
// r2: object type
Label do_call;
__ bind(&slow);
__ cmp(r2, Operand(JS_FUNCTION_PROXY_TYPE));
__ b(ne, &non_function_call);
__ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY_AS_CONSTRUCTOR);
__ jmp(&do_call);

__ bind(&non_function_call);
__ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION_AS_CONSTRUCTOR);
__ bind(&do_call);
// Set expected number of arguments to zero (not changing r0).
__ mov(r2, Operand(0, RelocInfo::NONE));
__ SetCallKind(r5, CALL_AS_METHOD);
__ Jump(masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(),
RelocInfo::CODE_TARGET);
}


static void Generate_JSConstructStubHelper(MacroAssembler* masm,
bool is_api_function,
bool count_constructions) {
// Should never count constructions for api objects.
ASSERT(!is_api_function || !count_constructions);

@@ -1117,7 +1079,8 @@ static void Generate_JSEntryTrampolineHelper(MacroAssembler* masm,
// Invoke the code and pass argc as r0.
__ mov(r0, Operand(r3));
if (is_construct) {
__ Call(masm->isolate()->builtins()->JSConstructCall());
CallConstructStub stub(NO_CALL_FUNCTION_FLAGS);
__ CallStub(&stub);
} else {
ParameterCount actual(r0);
__ InvokeFunction(r1, actual, CALL_FUNCTION,
@@ -1297,7 +1260,7 @@ void Builtins::Generate_FunctionCall(MacroAssembler* masm) {
// 1. Make sure we have at least one argument.
// r0: actual number of arguments
{ Label done;
__ tst(r0, Operand(r0));
__ cmp(r0, Operand(0));
__ b(ne, &done);
__ LoadRoot(r2, Heap::kUndefinedValueRootIndex);
__ push(r2);

0 comments on commit 8be6994

Please sign in to comment.
You can’t perform that action at this time.