Showing with 5,439 additions and 3,411 deletions.
  1. +33 −0 deps/v8/ChangeLog
  2. +16 −4 deps/v8/include/v8-profiler.h
  3. +8 −8 deps/v8/include/v8.h
  4. +20 −17 deps/v8/src/api.cc
  5. +57 −39 deps/v8/src/arm/lithium-arm.cc
  6. +42 −26 deps/v8/src/arm/lithium-arm.h
  7. +109 −170 deps/v8/src/arm/lithium-codegen-arm.cc
  8. +16 −13 deps/v8/src/arm/lithium-codegen-arm.h
  9. +6 −9 deps/v8/src/arm/macro-assembler-arm.cc
  10. +9 −0 deps/v8/src/assert-scope.h
  11. +2 −1 deps/v8/src/ast.cc
  12. +25 −4 deps/v8/src/ast.h
  13. +11 −10 deps/v8/src/code-stubs-hydrogen.cc
  14. +3 −0 deps/v8/src/code-stubs.cc
  15. +16 −3 deps/v8/src/compiler.cc
  16. +13 −4 deps/v8/src/compiler.h
  17. +1 −1 deps/v8/src/cpu-profiler.cc
  18. +1 −1 deps/v8/src/cpu-profiler.h
  19. +7 −0 deps/v8/src/debug.cc
  20. +240 −57 deps/v8/src/deoptimizer.cc
  21. +53 −4 deps/v8/src/deoptimizer.h
  22. +361 −0 deps/v8/src/effects.h
  23. +3 −1 deps/v8/src/execution.cc
  24. +0 −366 deps/v8/src/extensions/i18n/collator.cc
  25. +4 −7 deps/v8/src/extensions/i18n/collator.js
  26. +0 −18 deps/v8/src/extensions/i18n/i18n-extension.cc
  27. +0 −418 deps/v8/src/extensions/i18n/number-format.cc
  28. +5 −11 deps/v8/src/extensions/i18n/number-format.js
  29. +9 −4 deps/v8/src/factory.cc
  30. +5 −1 deps/v8/src/factory.h
  31. +2 −0 deps/v8/src/flag-definitions.h
  32. +149 −380 deps/v8/src/global-handles.cc
  33. +7 −57 deps/v8/src/global-handles.h
  34. +33 −16 deps/v8/src/heap.cc
  35. +4 −5 deps/v8/src/heap.h
  36. +3 −1 deps/v8/src/hydrogen-dce.cc
  37. +230 −0 deps/v8/src/hydrogen-escape-analysis.cc
  38. +33 −2 deps/v8/src/hydrogen-escape-analysis.h
  39. +1 −1 deps/v8/src/hydrogen-gvn.h
  40. +42 −180 deps/v8/src/hydrogen-instructions.cc
  41. +118 −79 deps/v8/src/hydrogen-instructions.h
  42. +21 −8 deps/v8/src/hydrogen-mark-deoptimize.cc
  43. +12 −0 deps/v8/src/hydrogen-mark-deoptimize.h
  44. +1 −0 deps/v8/src/hydrogen-osr.cc
  45. +3 −7 deps/v8/src/hydrogen-representation-changes.cc
  46. +210 −73 deps/v8/src/hydrogen.cc
  47. +38 −41 deps/v8/src/hydrogen.h
  48. +666 −25 deps/v8/src/i18n.cc
  49. +50 −0 deps/v8/src/i18n.h
  50. +12 −43 deps/v8/src/ia32/code-stubs-ia32.cc
  51. +132 −210 deps/v8/src/ia32/lithium-codegen-ia32.cc
  52. +13 −9 deps/v8/src/ia32/lithium-codegen-ia32.h
  53. +67 −55 deps/v8/src/ia32/lithium-ia32.cc
  54. +38 −25 deps/v8/src/ia32/lithium-ia32.h
  55. +54 −15 deps/v8/src/ia32/macro-assembler-ia32.cc
  56. +9 −4 deps/v8/src/ia32/macro-assembler-ia32.h
  57. +2 −0 deps/v8/src/ia32/stub-cache-ia32.cc
  58. +0 −1 deps/v8/src/isolate.cc
  59. +3 −14 deps/v8/src/isolate.h
  60. +1 −0 deps/v8/src/json-stringifier.h
  61. +46 −2 deps/v8/src/lithium.h
  62. +1 −0 deps/v8/src/liveedit.cc
  63. +1 −1 deps/v8/src/mips/codegen-mips.cc
  64. +66 −114 deps/v8/src/mips/lithium-codegen-mips.cc
  65. +10 −9 deps/v8/src/mips/lithium-codegen-mips.h
  66. +50 −41 deps/v8/src/mips/lithium-mips.cc
  67. +27 −24 deps/v8/src/mips/lithium-mips.h
  68. +29 −3 deps/v8/src/mips/macro-assembler-mips.cc
  69. +0 −14 deps/v8/src/mips/macro-assembler-mips.h
  70. +5 −79 deps/v8/src/objects-printer.cc
  71. +12 −5 deps/v8/src/objects.cc
  72. +4 −2 deps/v8/src/objects.h
  73. +66 −16 deps/v8/src/optimizing-compiler-thread.cc
  74. +9 −2 deps/v8/src/optimizing-compiler-thread.h
  75. +2 −0 deps/v8/src/profile-generator-inl.h
  76. +5 −1 deps/v8/src/profile-generator.cc
  77. +2 −0 deps/v8/src/profile-generator.h
  78. +219 −12 deps/v8/src/runtime.cc
  79. +9 −0 deps/v8/src/runtime.h
  80. +1 −2 deps/v8/src/sampler.cc
  81. +8 −1 deps/v8/src/splay-tree-inl.h
  82. +11 −3 deps/v8/src/splay-tree.h
  83. +5 −0 deps/v8/src/types.h
  84. +179 −61 deps/v8/src/typing.cc
  85. +17 −0 deps/v8/src/typing.h
  86. +2 −1 deps/v8/src/v8globals.h
  87. +2 −2 deps/v8/src/version.cc
  88. +102 −183 deps/v8/src/x64/lithium-codegen-x64.cc
  89. +14 −11 deps/v8/src/x64/lithium-codegen-x64.h
  90. +57 −39 deps/v8/src/x64/lithium-x64.cc
  91. +41 −26 deps/v8/src/x64/lithium-x64.h
  92. +6 −7 deps/v8/src/x64/stub-cache-x64.cc
  93. +6 −0 deps/v8/src/zone-inl.h
  94. +3 −3 deps/v8/src/zone.h
  95. +0 −53 deps/v8/test/cctest/cctest.h
  96. +12 −2 deps/v8/test/cctest/test-api.cc
  97. +55 −0 deps/v8/test/cctest/test-cpu-profiler.cc
  98. +13 −9 deps/v8/test/cctest/test-deoptimization.cc
  99. +0 −155 deps/v8/test/cctest/test-global-handles.cc
  100. +1 −0 deps/v8/test/cctest/test-heap.cc
  101. +1 −1 deps/v8/test/cctest/test-log-stack-tracer.cc
  102. +52 −0 deps/v8/test/cctest/test-strings.cc
  103. +3 −0 deps/v8/test/intl/intl.status
  104. +134 −0 deps/v8/test/mjsunit/compiler/escape-analysis.js
  105. +42 −0 deps/v8/test/mjsunit/constant-compare-nil-value.js
  106. +121 −0 deps/v8/test/mjsunit/debug-evaluate-const.js
  107. +1 −1 deps/v8/test/mjsunit/debug-evaluate-locals.js
  108. +142 −0 deps/v8/test/mjsunit/debug-stepin-positions.js
  109. +2 −3 deps/v8/test/mjsunit/harmony/object-observe.js
  110. +47 −0 deps/v8/test/mjsunit/load_poly_effect.js
  111. +3 −0 deps/v8/test/mjsunit/mjsunit.status
  112. +17 −1 deps/v8/test/mjsunit/object-literal-overwrite.js
  113. +44 −0 deps/v8/test/mjsunit/regress/json-stringifier-emptyhandle.js
  114. +38 −0 deps/v8/test/mjsunit/regress/regress-2836.js
  115. +86 −0 deps/v8/test/mjsunit/regress/regress-convert-hole2.js
  116. +49 −0 deps/v8/test/mjsunit/regress/regress-crbug-272564.js
  117. +39 −0 deps/v8/test/mjsunit/regress/regress-et-clobbers-doubles.js
  118. +46 −0 deps/v8/test/mjsunit/regress/regress-freeze.js
  119. +66 −0 deps/v8/test/mjsunit/regress/regress-hoist-load-named-field.js
  120. +48 −0 deps/v8/test/mjsunit/regress/regress-map-invalidation-1.js
  121. +49 −0 deps/v8/test/mjsunit/regress/regress-map-invalidation-2.js
  122. +51 −30 deps/v8/{src/extensions/i18n/collator.h → test/mjsunit/regress/regress-phi-truncation.js}
  123. +62 −0 deps/v8/test/mjsunit/regress/regress-prepare-break-while-recompile.js
  124. +30 −32 deps/v8/{src/extensions/i18n/number-format.h → test/mjsunit/regress/regress-smi-math-floor-round.js}
  125. +0 −3 deps/v8/test/webkit/webkit.status
  126. +1 −1 deps/v8/tools/gcmole/Makefile
  127. +126 −0 deps/v8/tools/gcmole/bootstrap.sh
  128. +3 −0 deps/v8/tools/gcmole/gcmole.lua
  129. +1 −4 deps/v8/tools/gyp/v8.gyp
  130. +2 −1 deps/v8/tools/tickprocessor.js
  131. +6 −3 deps/v8/tools/v8heapconst.py
@@ -1,3 +1,36 @@
2013-08-14: Version 3.20.17

Fixed Math.round/floor that had bogus Smi representation
(Chromium issue 272564)

Performance and stability improvements on all platforms.


2013-08-13: Version 3.20.16

Fixed bug in HPhi::SimplifyConstantInput (Chromium issue 269679)

Fixed gcmole bugs in i18n code (issue 2745)

ia32: Calls to the TranscendentalCacheStub must ensure that esi is
set (issue 2827)

Made sure polymorphic element access creates non-replaying
phis. (issue 2815)

Allowed HPhis to have an invalid merge index. (issue 2815)

Fixed smi-based math floor. (Chromium issue 270268)

Deprecated self and total time getters and total sample count
getter on CpuProfileNode. (Chromium issue 267595)

Fixed Object.freeze, Object.observe wrt CountOperation and
CompoundAssignment. (issue 2774,2779)

Performance and stability improvements on all platforms.


2013-08-07: Version 3.20.14

Exposed eternal handle api.
@@ -61,20 +61,27 @@ class V8_EXPORT CpuProfileNode {
* Returns total (self + children) execution time of the function,
* in milliseconds, estimated by samples count.
*/
double GetTotalTime() const;
V8_DEPRECATED(double GetTotalTime() const);

/**
* Returns self execution time of the function, in milliseconds,
* estimated by samples count.
*/
double GetSelfTime() const;
V8_DEPRECATED(double GetSelfTime() const);

/** Returns the count of samples where function exists. */
double GetTotalSamplesCount() const;
V8_DEPRECATED(double GetTotalSamplesCount() const);

/** Returns the count of samples where function was currently executing. */
/** DEPRECATED. Please use GetHitCount instead.
* Returns the count of samples where function was currently executing.
*/
double GetSelfSamplesCount() const;

/**
* Returns the count of samples where the function was currently executing.
*/
unsigned GetHitCount() const;

/** Returns function entry UID. */
unsigned GetCallUid() const;

@@ -192,6 +199,11 @@ class V8_EXPORT CpuProfiler {
*/
void DeleteAllCpuProfiles();

/**
* Tells the profiler whether the embedder is idle.
*/
void SetIdle(bool is_idle);

private:
CpuProfiler();
~CpuProfiler();
@@ -1273,13 +1273,13 @@ class V8_EXPORT StackFrame {
class V8_EXPORT JSON {
public:
/**
* Tries to parse the string |json_string| and returns it as object if
* Tries to parse the string |json_string| and returns it as value if
* successful.
*
* \param json_string The string to parse.
* \return The corresponding object if successfully parsed.
* \return The corresponding value if successfully parsed.
*/
static Local<Object> Parse(Local<String> json_string);
static Local<Value> Parse(Local<String> json_string);
};


@@ -5544,14 +5544,14 @@ class Internals {

V8_INLINE(static uint8_t GetNodeFlag(internal::Object** obj, int shift)) {
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
return *addr & (1 << shift);
return *addr & static_cast<uint8_t>(1U << shift);
}

V8_INLINE(static void UpdateNodeFlag(internal::Object** obj,
bool value, int shift)) {
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
uint8_t mask = 1 << shift;
*addr = (*addr & ~mask) | (value << shift);
uint8_t mask = static_cast<uint8_t>(1 << shift);
*addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift));
}

V8_INLINE(static uint8_t GetNodeState(internal::Object** obj)) {
@@ -5562,7 +5562,7 @@ class Internals {
V8_INLINE(static void UpdateNodeState(internal::Object** obj,
uint8_t value)) {
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset;
*addr = (*addr & ~kNodeStateMask) | value;
*addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value);
}

V8_INLINE(static void SetEmbedderData(v8::Isolate* isolate, void* data)) {
@@ -5927,7 +5927,7 @@ void ReturnValue<T>::Set(uint32_t i) {
TYPE_CHECK(T, Integer);
typedef internal::Internals I;
// Can't simply use INT32_MAX here for whatever reason.
bool fits_into_int32_t = (i & (1 << 31)) == 0;
bool fits_into_int32_t = (i & (1U << 31)) == 0;
if (V8_LIKELY(fits_into_int32_t)) {
Set(static_cast<int32_t>(i));
return;
@@ -781,7 +781,6 @@ void Context::Exit() {
i::Context* last_context =
isolate->handle_scope_implementer()->RestoreContext();
isolate->set_context(last_context);
isolate->set_context_exit_happened(true);
}


@@ -2620,7 +2619,7 @@ bool StackFrame::IsConstructor() const {

// --- J S O N ---

Local<Object> JSON::Parse(Local<String> json_string) {
Local<Value> JSON::Parse(Local<String> json_string) {
i::Isolate* isolate = i::Isolate::Current();
EnsureInitializedForIsolate(isolate, "v8::JSON::Parse");
ENTER_V8(isolate);
@@ -2637,7 +2636,7 @@ Local<Object> JSON::Parse(Local<String> json_string) {
has_pending_exception = result.is_null();
EXCEPTION_BAILOUT_CHECK(isolate, Local<Object>());
return Utils::ToLocal(
i::Handle<i::JSObject>::cast(scope.CloseAndEscape(result)));
i::Handle<i::Object>::cast(scope.CloseAndEscape(result)));
}


@@ -7478,8 +7477,6 @@ Handle<String> CpuProfileNode::GetFunctionName() const {


int CpuProfileNode::GetScriptId() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetScriptId");
const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
const i::CodeEntry* entry = node->entry();
return entry->script_id();
@@ -7496,8 +7493,6 @@ Handle<String> CpuProfileNode::GetScriptResourceName() const {


int CpuProfileNode::GetLineNumber() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetLineNumber");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
}

@@ -7530,9 +7525,12 @@ double CpuProfileNode::GetSelfSamplesCount() const {
}


unsigned CpuProfileNode::GetHitCount() const {
return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
}


unsigned CpuProfileNode::GetCallUid() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetCallUid");
return reinterpret_cast<const i::ProfileNode*>(this)->entry()->GetCallUid();
}

@@ -7543,15 +7541,11 @@ unsigned CpuProfileNode::GetNodeId() const {


int CpuProfileNode::GetChildrenCount() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetChildrenCount");
return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
}


const CpuProfileNode* CpuProfileNode::GetChild(int index) const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfileNode::GetChild");
const i::ProfileNode* child =
reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
return reinterpret_cast<const CpuProfileNode*>(child);
@@ -7572,8 +7566,6 @@ void CpuProfile::Delete() {


unsigned CpuProfile::GetUid() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfile::GetUid");
return reinterpret_cast<const i::CpuProfile*>(this)->uid();
}

@@ -7588,8 +7580,6 @@ Handle<String> CpuProfile::GetTitle() const {


const CpuProfileNode* CpuProfile::GetTopDownRoot() const {
i::Isolate* isolate = i::Isolate::Current();
IsDeadCheck(isolate, "v8::CpuProfile::GetTopDownRoot");
const i::CpuProfile* profile = reinterpret_cast<const i::CpuProfile*>(this);
return reinterpret_cast<const CpuProfileNode*>(profile->top_down()->root());
}
@@ -7647,6 +7637,19 @@ void CpuProfiler::DeleteAllCpuProfiles() {
}


void CpuProfiler::SetIdle(bool is_idle) {
i::Isolate* isolate = reinterpret_cast<i::CpuProfiler*>(this)->isolate();
i::StateTag state = isolate->current_vm_state();
ASSERT(state == i::EXTERNAL || state == i::IDLE);
if (isolate->js_entry_sp() != NULL) return;
if (is_idle) {
isolate->set_current_vm_state(i::IDLE);
} else if (state == i::IDLE) {
isolate->set_current_vm_state(i::EXTERNAL);
}
}


static i::HeapGraphEdge* ToInternal(const HeapGraphEdge* edge) {
return const_cast<i::HeapGraphEdge*>(
reinterpret_cast<const i::HeapGraphEdge*>(edge));