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

Update v8 to 3.8.9

  • Loading branch information...
isaacs committed Feb 1, 2012
1 parent bd21038 commit 05471f5c2aee3d264a5ae65dc3ad140ca85eb9dd
Showing with 2,226 additions and 1,185 deletions.
  1. +18 −0 deps/v8/ChangeLog
  2. +1 −1 deps/v8/build/common.gypi
  3. +12 −2 deps/v8/include/v8.h
  4. +2 −1 deps/v8/include/v8stdint.h
  5. +13 −10 deps/v8/src/accessors.cc
  6. +2 −1 deps/v8/src/accessors.h
  7. +5 −4 deps/v8/src/allocation.cc
  8. +1 −2 deps/v8/src/allocation.h
  9. +16 −8 deps/v8/src/api.cc
  10. +7 −3 deps/v8/src/api.h
  11. +1 −0 deps/v8/src/arm/assembler-arm-inl.h
  12. +7 −5 deps/v8/src/arm/assembler-arm.h
  13. +1 −0 deps/v8/src/arm/builtins-arm.cc
  14. +111 −14 deps/v8/src/arm/deoptimizer-arm.cc
  15. +22 −12 deps/v8/src/arm/disasm-arm.cc
  16. +6 −1 deps/v8/src/arm/frames-arm.h
  17. +33 −26 deps/v8/src/arm/ic-arm.cc
  18. +15 −9 deps/v8/src/arm/lithium-arm.cc
  19. +10 −2 deps/v8/src/arm/lithium-codegen-arm.cc
  20. +29 −12 deps/v8/src/assembler.cc
  21. +9 −1 deps/v8/src/assembler.h
  22. +8 −3 deps/v8/src/ast.cc
  23. +31 −10 deps/v8/src/ast.h
  24. +4 −3 deps/v8/src/cpu-profiler.cc
  25. +24 −5 deps/v8/src/d8.cc
  26. +22 −0 deps/v8/src/d8.h
  27. +172 −111 deps/v8/src/debug.cc
  28. +221 −92 deps/v8/src/deoptimizer.cc
  29. +48 −20 deps/v8/src/deoptimizer.h
  30. +14 −11 deps/v8/src/frames.cc
  31. +8 −6 deps/v8/src/full-codegen.cc
  32. +0 −1 deps/v8/src/heap-inl.h
  33. +73 −45 deps/v8/src/heap.cc
  34. +33 −9 deps/v8/src/heap.h
  35. +17 −0 deps/v8/src/hydrogen-instructions.cc
  36. +7 −0 deps/v8/src/hydrogen-instructions.h
  37. +57 −19 deps/v8/src/hydrogen.cc
  38. +17 −0 deps/v8/src/hydrogen.h
  39. +3 −1 deps/v8/src/ia32/assembler-ia32-inl.h
  40. +2 −1 deps/v8/src/ia32/builtins-ia32.cc
  41. +111 −15 deps/v8/src/ia32/deoptimizer-ia32.cc
  42. +6 −2 deps/v8/src/ia32/frames-ia32.h
  43. +34 −25 deps/v8/src/ia32/ic-ia32.cc
  44. +10 −2 deps/v8/src/ia32/lithium-codegen-ia32.cc
  45. +15 −9 deps/v8/src/ia32/lithium-ia32.cc
  46. +5 −3 deps/v8/src/jsregexp.h
  47. +6 −6 deps/v8/src/lithium-allocator.cc
  48. +1 −3 deps/v8/src/lithium.cc
  49. +11 −10 deps/v8/src/lithium.h
  50. +13 −0 deps/v8/src/mark-compact-inl.h
  51. +119 −94 deps/v8/src/mark-compact.cc
  52. +6 −0 deps/v8/src/mark-compact.h
  53. +1 −0 deps/v8/src/mips/assembler-mips-inl.h
  54. +28 −27 deps/v8/src/mips/ic-mips.cc
  55. +1 −2 deps/v8/src/objects-inl.h
  56. +46 −9 deps/v8/src/objects.cc
  57. +4 −7 deps/v8/src/objects.h
  58. +5 −10 deps/v8/src/platform-freebsd.cc
  59. +5 −10 deps/v8/src/platform-linux.cc
  60. +7 −10 deps/v8/src/platform-macos.cc
  61. +5 −10 deps/v8/src/platform-openbsd.cc
  62. +12 −42 deps/v8/src/platform-solaris.cc
  63. +5 −10 deps/v8/src/platform-win32.cc
  64. +11 −5 deps/v8/src/platform.h
  65. +68 −56 deps/v8/src/runtime.cc
  66. +1 −31 deps/v8/src/serialize.cc
  67. +0 −7 deps/v8/src/serialize.h
  68. +11 −11 deps/v8/src/spaces.cc
  69. +1 −1 deps/v8/src/spaces.h
  70. +2 −1 deps/v8/src/type-info.h
  71. +1 −18 deps/v8/src/v8globals.h
  72. +1 −1 deps/v8/src/version.cc
  73. +3 −1 deps/v8/src/x64/assembler-x64-inl.h
  74. +1 −0 deps/v8/src/x64/builtins-x64.cc
  75. +116 −15 deps/v8/src/x64/deoptimizer-x64.cc
  76. +6 −1 deps/v8/src/x64/frames-x64.h
  77. +35 −28 deps/v8/src/x64/ic-x64.cc
  78. +10 −2 deps/v8/src/x64/lithium-codegen-x64.cc
  79. +15 −9 deps/v8/src/x64/lithium-x64.cc
  80. +69 −54 deps/v8/test/cctest/test-api.cc
  81. +2 −3 deps/v8/test/cctest/test-compiler.cc
  82. +12 −18 deps/v8/test/cctest/test-debug.cc
  83. +2 −2 deps/v8/test/cctest/test-deoptimization.cc
  84. +14 −1 deps/v8/test/cctest/test-mark-compact.cc
  85. +2 −2 deps/v8/test/cctest/test-parsing.cc
  86. +12 −8 deps/v8/test/mjsunit/compiler/regress-funarguments.js
  87. +109 −65 deps/v8/test/mjsunit/debug-evaluate-locals-optimized-double.js
  88. +97 −63 deps/v8/test/mjsunit/debug-evaluate-locals-optimized.js
  89. +80 −23 deps/v8/test/mjsunit/regress/regress-1229.js
  90. +3 −2 deps/v8/tools/js2c.py
  91. +4 −0 deps/v8/tools/test.py
@@ -1,3 +1,21 @@
2012-01-26: Version 3.8.9

Flush number string cache on GC (issue 1605).

Provide access to function inferred name with
v8::Function::GetInferredName in V8 public API.

Fix building with Clang (issue 1912).

Reduce the space used by the stack for the profiling thread.

Fix misleading documentation of v8::Locker (issue 542).

Introduce readbinary function in d8 to read binary files.

Performance and stability improvements on all platforms.


2012-01-23: Version 3.8.8

Limited number of loop iterations in Heap::ReserveSpace
@@ -295,7 +295,7 @@
'-O3',
],
'conditions': [
[ 'gcc_version==44', {
[ 'gcc_version==44 and clang==0', {
'cflags': [
# Avoid crashes with gcc 4.4 in the v8 test suite.
'-fno-tree-vrp',
@@ -1731,6 +1731,14 @@ class Function : public Object {
V8EXPORT void SetName(Handle<String> name);
V8EXPORT Handle<Value> GetName() const;

/**
* Name inferred from variable or property assignment of this function.
* Used to facilitate debugging and profiling of JavaScript code written
* in an OO style, where many functions are anonymous but are assigned
* to object properties.
*/
V8EXPORT Handle<Value> GetInferredName() const;

/**
* Returns zero based line number of function body and
* kLineOffsetNotFound if no information available.
@@ -2717,7 +2725,7 @@ class RetainedObjectInfo;
* default isolate is implicitly created and entered. The embedder
* can create additional isolates and use them in parallel in multiple
* threads. An isolate can be entered by at most one thread at any
* given time. The Locker/Unlocker API can be used to synchronize.
* given time. The Locker/Unlocker API must be used to synchronize.
*/
class V8EXPORT Isolate {
public:
@@ -3559,7 +3567,9 @@ class V8EXPORT Context {
* accessing handles or holding onto object pointers obtained
* from V8 handles while in the particular V8 isolate. It is up
* to the user of V8 to ensure (perhaps with locking) that this
* constraint is not violated.
* constraint is not violated. In addition to any other synchronization
* mechanism that may be used, the v8::Locker and v8::Unlocker classes
* must be used to signal thead switches to V8.
*
* v8::Locker is a scoped lock object. While it's
* active (i.e. between its construction and destruction) the current thread is
@@ -1,4 +1,4 @@
// Copyright 2010 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -30,6 +30,7 @@
#ifndef V8STDINT_H_
#define V8STDINT_H_

#include <stddef.h>
#include <stdio.h>

#if defined(_WIN32) && !defined(__MINGW32__)
@@ -1,4 +1,4 @@
// Copyright 2011 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -26,15 +26,16 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "v8.h"

#include "accessors.h"
#include "ast.h"

#include "contexts.h"
#include "deoptimizer.h"
#include "execution.h"
#include "factory.h"
#include "frames-inl.h"
#include "isolate.h"
#include "list-inl.h"
#include "safepoint-table.h"
#include "scopeinfo.h"
#include "property-details.h"

namespace v8 {
namespace internal {
@@ -574,11 +575,12 @@ static MaybeObject* ConstructArgumentsObjectForInlinedFunction(
Handle<JSFunction> inlined_function,
int inlined_frame_index) {
Factory* factory = Isolate::Current()->factory();
int args_count = inlined_function->shared()->formal_parameter_count();
ScopedVector<SlotRef> args_slots(args_count);
SlotRef::ComputeSlotMappingForArguments(frame,
inlined_frame_index,
&args_slots);
Vector<SlotRef> args_slots =
SlotRef::ComputeSlotMappingForArguments(
frame,
inlined_frame_index,
inlined_function->shared()->formal_parameter_count());
int args_count = args_slots.length();
Handle<JSObject> arguments =
factory->NewArgumentsObject(inlined_function, args_count);
Handle<FixedArray> array = factory->NewFixedArray(args_count);
@@ -587,6 +589,7 @@ static MaybeObject* ConstructArgumentsObjectForInlinedFunction(
array->set(i, *value);
}
arguments->set_elements(*array);
args_slots.Dispose();

// Return the freshly allocated arguments object.
return *arguments;
@@ -1,4 +1,4 @@
// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -29,6 +29,7 @@
#define V8_ACCESSORS_H_

#include "allocation.h"
#include "v8globals.h"

namespace v8 {
namespace internal {
@@ -1,4 +1,4 @@
// Copyright 2008 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,10 +25,11 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "../include/v8stdint.h"
#include "globals.h"
#include "checks.h"
#include "allocation.h"

#include <stdlib.h> // For free, malloc.
#include <string.h> // For memcpy.
#include "checks.h"
#include "utils.h"

namespace v8 {
@@ -1,4 +1,4 @@
// Copyright 2011 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -28,7 +28,6 @@
#ifndef V8_ALLOCATION_H_
#define V8_ALLOCATION_H_

#include "checks.h"
#include "globals.h"

namespace v8 {
@@ -25,34 +25,36 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "v8.h"

#include "api.h"

#include "arguments.h"
#include <math.h> // For isnan.
#include <string.h> // For memcpy, strlen.
#include "../include/v8-debug.h"
#include "../include/v8-profiler.h"
#include "../include/v8-testing.h"
#include "bootstrapper.h"
#include "compiler.h"
#include "conversions-inl.h"
#include "counters.h"
#include "debug.h"
#include "deoptimizer.h"
#include "execution.h"
#include "flags.h"
#include "global-handles.h"
#include "heap-profiler.h"
#include "messages.h"
#include "natives.h"
#include "parser.h"
#include "platform.h"
#include "profile-generator-inl.h"
#include "property-details.h"
#include "property.h"
#include "runtime-profiler.h"
#include "scanner-character-streams.h"
#include "serialize.h"
#include "snapshot.h"
#include "unicode-inl.h"
#include "v8threads.h"
#include "version.h"
#include "vm-state-inl.h"

#include "../include/v8-profiler.h"
#include "../include/v8-testing.h"

#define LOG_API(isolate, expr) LOG(isolate, ApiEntryCall(expr))

@@ -3622,6 +3624,12 @@ Handle<Value> Function::GetName() const {
}


Handle<Value> Function::GetInferredName() const {
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
return Utils::ToLocal(i::Handle<i::Object>(func->shared()->inferred_name()));
}


ScriptOrigin Function::GetScriptOrigin() const {
i::Handle<i::JSFunction> func = Utils::OpenHandle(this);
if (func->shared()->script()->IsScript()) {
@@ -1,4 +1,4 @@
// Copyright 2011 the V8 project authors. All rights reserved.
// Copyright 2012 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -28,10 +28,14 @@
#ifndef V8_API_H_
#define V8_API_H_

#include "apiutils.h"
#include "factory.h"
#include "v8.h"

#include "../include/v8-testing.h"
#include "apiutils.h"
#include "contexts.h"
#include "factory.h"
#include "isolate.h"
#include "list-inl.h"

namespace v8 {

@@ -38,6 +38,7 @@
#define V8_ARM_ASSEMBLER_ARM_INL_H_

#include "arm/assembler-arm.h"

#include "cpu.h"
#include "debug.h"

@@ -300,11 +300,13 @@ const DwVfpRegister d13 = { 13 };
const DwVfpRegister d14 = { 14 };
const DwVfpRegister d15 = { 15 };

// Aliases for double registers.
static const DwVfpRegister& kFirstCalleeSavedDoubleReg = d8;
static const DwVfpRegister& kLastCalleeSavedDoubleReg = d15;
static const DwVfpRegister& kDoubleRegZero = d14;
static const DwVfpRegister& kScratchDoubleReg = d15;
// Aliases for double registers. Defined using #define instead of
// "static const DwVfpRegister&" because Clang complains otherwise when a
// compilation unit that includes this header doesn't use the variables.
#define kFirstCalleeSavedDoubleReg d8
#define kLastCalleeSavedDoubleReg d15
#define kDoubleRegZero d14
#define kScratchDoubleReg d15


// Coprocessor register
@@ -1760,6 +1760,7 @@ void Builtins::Generate_ArgumentsAdaptorTrampoline(MacroAssembler* masm) {
__ bind(&invoke);
__ Call(r3);

masm->isolate()->heap()->SetArgumentsAdaptorDeoptPCOffset(masm->pc_offset());
// Exit frame and return.
LeaveArgumentsAdaptorFrame(masm);
__ Jump(lr);

0 comments on commit 05471f5

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