Permalink
Browse files

deps: backport 3297130 from upstream V8

This fixes a build failure on Windows.

Original commit message:

    Rename TypeFeedbackVector to FeedbackVector.

    ... and TypeFeedbackMetadata to FeedbackMetadata.

    BUG=

    Change-Id: I2556d1c2a8f37b8cf3d532cc98d973b6dc7e9e6c
    Reviewed-on: https://chromium-review.googlesource.com/439244
    Commit-Queue: Igor Sheludko <ishell@chromium.org>
    Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
    Reviewed-by: Michael Stanton <mvstanton@chromium.org>
    Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Reviewed-by: Hannes Payer <hpayer@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#42999}

Refs: nodejs/v8#4
PR-URL: #11752
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
  • Loading branch information...
targos committed Mar 23, 2017
1 parent 07088e6 commit 9c9e2d7f4a576310eb652a620db090f00a320243
Showing with 846 additions and 928 deletions.
  1. +3 −3 deps/v8/BUILD.gn
  2. +4 −4 deps/v8/src/arm/code-stubs-arm.cc
  3. +1 −2 deps/v8/src/arm/macro-assembler-arm.cc
  4. +1 −1 deps/v8/src/arm/macro-assembler-arm.h
  5. +4 −4 deps/v8/src/arm64/code-stubs-arm64.cc
  6. +1 −2 deps/v8/src/arm64/macro-assembler-arm64.cc
  7. +1 −1 deps/v8/src/arm64/macro-assembler-arm64.h
  8. +3 −3 deps/v8/src/ast/context-slot-cache.cc
  9. +4 −4 deps/v8/src/builtins/arm/builtins-arm.cc
  10. +5 −5 deps/v8/src/builtins/arm64/builtins-arm64.cc
  11. +5 −5 deps/v8/src/builtins/ia32/builtins-ia32.cc
  12. +4 −4 deps/v8/src/builtins/mips/builtins-mips.cc
  13. +4 −4 deps/v8/src/builtins/mips64/builtins-mips64.cc
  14. +5 −5 deps/v8/src/builtins/ppc/builtins-ppc.cc
  15. +5 −5 deps/v8/src/builtins/s390/builtins-s390.cc
  16. +2 −3 deps/v8/src/builtins/x64/builtins-x64.cc
  17. +5 −5 deps/v8/src/builtins/x87/builtins-x87.cc
  18. +4 −6 deps/v8/src/code-stub-assembler.cc
  19. +2 −3 deps/v8/src/code-stub-assembler.h
  20. +15 −13 deps/v8/src/code-stubs.cc
  21. +2 −2 deps/v8/src/code-stubs.h
  22. +1 −1 deps/v8/src/compiler.cc
  23. +4 −4 deps/v8/src/compiler/ast-graph-builder.cc
  24. +4 −4 deps/v8/src/compiler/bytecode-graph-builder.cc
  25. +3 −3 deps/v8/src/compiler/bytecode-graph-builder.h
  26. +2 −2 deps/v8/src/compiler/js-call-reducer.cc
  27. +3 −3 deps/v8/src/compiler/js-native-context-specialization.cc
  28. +3 −3 deps/v8/src/compiler/js-native-context-specialization.h
  29. +2 −2 deps/v8/src/compiler/js-operator.cc
  30. +4 −5 deps/v8/src/compiler/js-operator.h
  31. +4 −6 deps/v8/src/crankshaft/hydrogen-instructions.h
  32. +9 −10 deps/v8/src/crankshaft/hydrogen.cc
  33. +1 −1 deps/v8/src/crankshaft/hydrogen.h
  34. +4 −4 deps/v8/src/debug/liveedit.cc
  35. +2 −2 deps/v8/src/factory.cc
  36. +1 −1 deps/v8/src/factory.h
  37. +40 −49 deps/v8/src/{type-feedback-vector-inl.h → feedback-vector-inl.h}
  38. +83 −108 deps/v8/src/{type-feedback-vector.cc → feedback-vector.cc}
  39. +62 −73 deps/v8/src/{type-feedback-vector.h → feedback-vector.h}
  40. +9 −9 deps/v8/src/full-codegen/arm/full-codegen-arm.cc
  41. +9 −9 deps/v8/src/full-codegen/arm64/full-codegen-arm64.cc
  42. +2 −3 deps/v8/src/full-codegen/full-codegen.cc
  43. +1 −1 deps/v8/src/full-codegen/full-codegen.h
  44. +6 −6 deps/v8/src/full-codegen/ia32/full-codegen-ia32.cc
  45. +8 −8 deps/v8/src/full-codegen/mips/full-codegen-mips.cc
  46. +8 −8 deps/v8/src/full-codegen/mips64/full-codegen-mips64.cc
  47. +9 −10 deps/v8/src/full-codegen/ppc/full-codegen-ppc.cc
  48. +9 −10 deps/v8/src/full-codegen/s390/full-codegen-s390.cc
  49. +6 −7 deps/v8/src/full-codegen/x64/full-codegen-x64.cc
  50. +6 −6 deps/v8/src/full-codegen/x87/full-codegen-x87.cc
  51. +1 −1 deps/v8/src/globals.h
  52. +1 −1 deps/v8/src/heap/heap-inl.h
  53. +19 −19 deps/v8/src/heap/heap.cc
  54. +3 −3 deps/v8/src/heap/heap.h
  55. +5 −5 deps/v8/src/heap/object-stats.cc
  56. +6 −7 deps/v8/src/ia32/code-stubs-ia32.cc
  57. +1 −2 deps/v8/src/ia32/macro-assembler-ia32.cc
  58. +1 −1 deps/v8/src/ia32/macro-assembler-ia32.h
  59. +5 −5 deps/v8/src/ic/accessor-assembler.cc
  60. +9 −9 deps/v8/src/ic/ic.cc
  61. +1 −1 deps/v8/src/ic/ic.h
  62. +1 −1 deps/v8/src/interpreter/bytecode-generator.cc
  63. +29 −31 deps/v8/src/interpreter/interpreter-assembler.cc
  64. +5 −5 deps/v8/src/interpreter/interpreter-assembler.h
  65. +52 −53 deps/v8/src/interpreter/interpreter.cc
  66. +4 −4 deps/v8/src/mips/code-stubs-mips.cc
  67. +1 −2 deps/v8/src/mips/macro-assembler-mips.cc
  68. +1 −1 deps/v8/src/mips/macro-assembler-mips.h
  69. +4 −4 deps/v8/src/mips64/code-stubs-mips64.cc
  70. +1 −1 deps/v8/src/mips64/macro-assembler-mips64.cc
  71. +1 −1 deps/v8/src/mips64/macro-assembler-mips64.h
  72. +10 −10 deps/v8/src/objects-inl.h
  73. +15 −19 deps/v8/src/objects-printer.cc
  74. +3 −3 deps/v8/src/objects.cc
  75. +13 −13 deps/v8/src/objects.h
  76. +4 −4 deps/v8/src/ppc/code-stubs-ppc.cc
  77. +1 −2 deps/v8/src/ppc/macro-assembler-ppc.cc
  78. +1 −1 deps/v8/src/ppc/macro-assembler-ppc.h
  79. +1 −1 deps/v8/src/profiler/heap-snapshot-generator.cc
  80. +1 −1 deps/v8/src/runtime-profiler.cc
  81. +1 −1 deps/v8/src/runtime/runtime-object.cc
  82. +4 −5 deps/v8/src/runtime/runtime-scopes.cc
  83. +4 −4 deps/v8/src/s390/code-stubs-s390.cc
  84. +1 −1 deps/v8/src/s390/macro-assembler-s390.cc
  85. +1 −1 deps/v8/src/s390/macro-assembler-s390.h
  86. +7 −8 deps/v8/src/type-info.cc
  87. +2 −2 deps/v8/src/type-info.h
  88. +3 −3 deps/v8/src/v8.gyp
  89. +6 −7 deps/v8/src/x64/code-stubs-x64.cc
  90. +1 −2 deps/v8/src/x64/macro-assembler-x64.cc
  91. +1 −1 deps/v8/src/x64/macro-assembler-x64.h
  92. +6 −7 deps/v8/src/x87/code-stubs-x87.cc
  93. +1 −2 deps/v8/src/x87/macro-assembler-x87.cc
  94. +1 −1 deps/v8/src/x87/macro-assembler-x87.h
  95. +3 −3 deps/v8/test/cctest/compiler/test-js-constant-cache.cc
  96. +3 −3 deps/v8/test/cctest/compiler/test-js-typed-lowering.cc
  97. +3 −3 deps/v8/test/cctest/compiler/test-run-jsobjects.cc
  98. +3 −3 deps/v8/test/cctest/heap/test-compaction.cc
  99. +10 −11 deps/v8/test/cctest/heap/test-heap.cc
  100. +3 −3 deps/v8/test/cctest/heap/test-page-promotion.cc
  101. +3 −3 deps/v8/test/cctest/interpreter/interpreter-tester.cc
  102. +6 −4 deps/v8/test/cctest/interpreter/interpreter-tester.h
  103. +94 −101 deps/v8/test/cctest/interpreter/test-interpreter.cc
  104. +1 −1 deps/v8/test/cctest/parsing/test-scanner-streams.cc
  105. +3 −3 deps/v8/test/cctest/test-array-list.cc
  106. +3 −3 deps/v8/test/cctest/test-ast-types.cc
  107. +3 −3 deps/v8/test/cctest/test-code-cache.cc
  108. +3 −3 deps/v8/test/cctest/test-code-layout.cc
  109. +1 −1 deps/v8/test/cctest/test-compiler.cc
  110. +3 −3 deps/v8/test/cctest/test-conversions.cc
  111. +40 −40 deps/v8/test/cctest/test-feedback-vector.cc
  112. +7 −8 deps/v8/test/cctest/test-feedback-vector.h
  113. +3 −3 deps/v8/test/cctest/test-identity-map.cc
  114. +3 −3 deps/v8/test/cctest/test-mementos.cc
  115. +3 −3 deps/v8/test/cctest/test-simd.cc
  116. +3 −3 deps/v8/test/cctest/test-symbols.cc
  117. +3 −3 deps/v8/test/cctest/test-types.cc
  118. +3 −3 deps/v8/test/cctest/test-unique.cc
  119. +3 −3 deps/v8/test/cctest/test-weakmaps.cc
  120. +3 −3 deps/v8/test/cctest/test-weaksets.cc
  121. 0 deps/v8/test/mjsunit/compiler/{type-feedback-after-throw.js → feedback-after-throw.js}
  122. +4 −5 deps/v8/test/unittests/compiler/js-create-lowering-unittest.cc
  123. +2 −2 deps/v8/test/unittests/interpreter/interpreter-assembler-unittest.cc
View
@@ -1377,6 +1377,9 @@ v8_source_set("v8_base") {
"src/fast-accessor-assembler.h",
"src/fast-dtoa.cc",
"src/fast-dtoa.h",
"src/feedback-vector-inl.h",
"src/feedback-vector.cc",
"src/feedback-vector.h",
"src/field-index-inl.h",
"src/field-index.h",
"src/field-type.cc",
@@ -1748,9 +1751,6 @@ v8_source_set("v8_base") {
"src/transitions.cc",
"src/transitions.h",
"src/trap-handler/trap-handler.h",
"src/type-feedback-vector-inl.h",
"src/type-feedback-vector.cc",
"src/type-feedback-vector.h",
"src/type-hints.cc",
"src/type-hints.h",
"src/type-info.cc",
@@ -1623,9 +1623,9 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// r3 : slot in feedback vector (Smi)
Label initialize, done, miss, megamorphic, not_array_function;
DCHECK_EQ(*TypeFeedbackVector::MegamorphicSentinel(masm->isolate()),
DCHECK_EQ(*FeedbackVector::MegamorphicSentinel(masm->isolate()),
masm->isolate()->heap()->megamorphic_symbol());
DCHECK_EQ(*TypeFeedbackVector::UninitializedSentinel(masm->isolate()),
DCHECK_EQ(*FeedbackVector::UninitializedSentinel(masm->isolate()),
masm->isolate()->heap()->uninitialized_symbol());
// Load the cache state into r5.
@@ -1635,7 +1635,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// A monomorphic cache hit or an already megamorphic state: invoke the
// function without changing the state.
// We don't know if r5 is a WeakCell or a Symbol, but it's harmless to read at
// this position in a symbol (see static asserts in type-feedback-vector.h).
// this position in a symbol (see static asserts in feedback-vector.h).
Label check_allocation_site;
Register feedback_map = r6;
Register weak_value = r9;
@@ -2925,7 +2925,7 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
}
void CallICTrampolineStub::Generate(MacroAssembler* masm) {
__ EmitLoadTypeFeedbackVector(r2);
__ EmitLoadFeedbackVector(r2);
CallICStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
@@ -1429,8 +1429,7 @@ void MacroAssembler::Prologue(bool code_pre_aging) {
}
}
void MacroAssembler::EmitLoadTypeFeedbackVector(Register vector) {
void MacroAssembler::EmitLoadFeedbackVector(Register vector) {
ldr(vector, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
ldr(vector, FieldMemOperand(vector, JSFunction::kLiteralsOffset));
ldr(vector, FieldMemOperand(vector, LiteralsArray::kFeedbackVectorOffset));
@@ -1385,7 +1385,7 @@ class MacroAssembler: public Assembler {
}
// Load the type feedback vector from a JavaScript frame.
void EmitLoadTypeFeedbackVector(Register vector);
void EmitLoadFeedbackVector(Register vector);
// Activation support.
void EnterFrame(StackFrame::Type type,
@@ -1826,9 +1826,9 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, Register argc,
// index : slot in feedback vector (smi)
Label initialize, done, miss, megamorphic, not_array_function;
DCHECK_EQ(*TypeFeedbackVector::MegamorphicSentinel(masm->isolate()),
DCHECK_EQ(*FeedbackVector::MegamorphicSentinel(masm->isolate()),
masm->isolate()->heap()->megamorphic_symbol());
DCHECK_EQ(*TypeFeedbackVector::UninitializedSentinel(masm->isolate()),
DCHECK_EQ(*FeedbackVector::UninitializedSentinel(masm->isolate()),
masm->isolate()->heap()->uninitialized_symbol());
// Load the cache state.
@@ -1843,7 +1843,7 @@ static void GenerateRecordCallTarget(MacroAssembler* masm, Register argc,
// function without changing the state.
// We don't know if feedback value is a WeakCell or a Symbol, but it's
// harmless to read at this position in a symbol (see static asserts in
// type-feedback-vector.h).
// feedback-vector.h).
Label check_allocation_site;
__ Ldr(feedback_value, FieldMemOperand(feedback, WeakCell::kValueOffset));
__ Cmp(function, feedback_value);
@@ -2967,7 +2967,7 @@ void StubFailureTrampolineStub::Generate(MacroAssembler* masm) {
}
void CallICTrampolineStub::Generate(MacroAssembler* masm) {
__ EmitLoadTypeFeedbackVector(x2);
__ EmitLoadFeedbackVector(x2);
CallICStub stub(isolate(), state());
__ Jump(stub.GetCode(), RelocInfo::CODE_TARGET);
}
@@ -2634,8 +2634,7 @@ void MacroAssembler::Prologue(bool code_pre_aging) {
}
}
void MacroAssembler::EmitLoadTypeFeedbackVector(Register vector) {
void MacroAssembler::EmitLoadFeedbackVector(Register vector) {
Ldr(vector, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset));
Ldr(vector, FieldMemOperand(vector, JSFunction::kLiteralsOffset));
Ldr(vector, FieldMemOperand(vector, LiteralsArray::kFeedbackVectorOffset));
@@ -1541,7 +1541,7 @@ class MacroAssembler : public Assembler {
// Frames.
// Load the type feedback vector from a JavaScript frame.
void EmitLoadTypeFeedbackVector(Register vector);
void EmitLoadFeedbackVector(Register vector);
// Activation support.
void EnterFrame(StackFrame::Type type);
@@ -12,9 +12,9 @@
// (disallowed) include: src/factory.h -> src/objects-inl.h
#include "src/objects-inl.h"
// FIXME(mstarzinger, marja): This is weird, but required because of the missing
// (disallowed) include: src/type-feedback-vector.h ->
// src/type-feedback-vector-inl.h
#include "src/type-feedback-vector-inl.h"
// (disallowed) include: src/feedback-vector.h ->
// src/feedback-vector-inl.h
#include "src/feedback-vector-inl.h"
namespace v8 {
namespace internal {
@@ -1019,12 +1019,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ ldr(r2, FieldMemOperand(r1, JSFunction::kLiteralsOffset));
__ ldr(r2, FieldMemOperand(r2, LiteralsArray::kFeedbackVectorOffset));
__ ldr(r9, FieldMemOperand(
r2, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
r2, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
__ add(r9, r9, Operand(Smi::FromInt(1)));
__ str(r9, FieldMemOperand(
r2, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
r2, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -1022,13 +1022,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// Increment invocation count for the function.
__ Ldr(x11, FieldMemOperand(x1, JSFunction::kLiteralsOffset));
__ Ldr(x11, FieldMemOperand(x11, LiteralsArray::kFeedbackVectorOffset));
__ Ldr(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
__ Ldr(x10, FieldMemOperand(x11, FeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize));
FeedbackVector::kHeaderSize));
__ Add(x10, x10, Operand(Smi::FromInt(1)));
__ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize));
__ Str(x10, FieldMemOperand(
x11, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -548,11 +548,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ j(not_equal, &switch_to_different_code_kind);
// Increment invocation count for the function.
__ EmitLoadTypeFeedbackVector(ecx);
__ add(FieldOperand(ecx,
TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize),
Immediate(Smi::FromInt(1)));
__ EmitLoadFeedbackVector(ecx);
__ add(
FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize),
Immediate(Smi::FromInt(1)));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -1021,12 +1021,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ lw(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset));
__ lw(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset));
__ lw(t0, FieldMemOperand(
a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
a0, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
__ Addu(t0, t0, Operand(Smi::FromInt(1)));
__ sw(t0, FieldMemOperand(
a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
a0, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -1012,12 +1012,12 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ ld(a0, FieldMemOperand(a1, JSFunction::kLiteralsOffset));
__ ld(a0, FieldMemOperand(a0, LiteralsArray::kFeedbackVectorOffset));
__ ld(a4, FieldMemOperand(
a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
a0, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
__ Daddu(a4, a4, Operand(Smi::FromInt(1)));
__ sd(a4, FieldMemOperand(
a0, TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize));
a0, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -1035,13 +1035,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// Increment invocation count for the function.
__ LoadP(r7, FieldMemOperand(r4, JSFunction::kLiteralsOffset));
__ LoadP(r7, FieldMemOperand(r7, LiteralsArray::kFeedbackVectorOffset));
__ LoadP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex *
__ LoadP(r8, FieldMemOperand(r7, FeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize));
FeedbackVector::kHeaderSize));
__ AddSmiLiteral(r8, r8, Smi::FromInt(1), r0);
__ StoreP(r8, FieldMemOperand(r7, TypeFeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize),
__ StoreP(r8, FieldMemOperand(
r7, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize),
r0);
// Check function data field is actually a BytecodeArray object.
@@ -1040,13 +1040,13 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
// Increment invocation count for the function.
__ LoadP(r6, FieldMemOperand(r3, JSFunction::kLiteralsOffset));
__ LoadP(r6, FieldMemOperand(r6, LiteralsArray::kFeedbackVectorOffset));
__ LoadP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex *
__ LoadP(r1, FieldMemOperand(r6, FeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize));
FeedbackVector::kHeaderSize));
__ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0);
__ StoreP(r1, FieldMemOperand(r6, TypeFeedbackVector::kInvocationCountIndex *
kPointerSize +
TypeFeedbackVector::kHeaderSize));
__ StoreP(r1, FieldMemOperand(
r6, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -628,9 +628,8 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ movp(rcx, FieldOperand(rdi, JSFunction::kLiteralsOffset));
__ movp(rcx, FieldOperand(rcx, LiteralsArray::kFeedbackVectorOffset));
__ SmiAddConstant(
FieldOperand(rcx,
TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize),
FieldOperand(rcx, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize),
Smi::FromInt(1));
// Check function data field is actually a BytecodeArray object.
@@ -549,11 +549,11 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
__ j(not_equal, &switch_to_different_code_kind);
// Increment invocation count for the function.
__ EmitLoadTypeFeedbackVector(ecx);
__ add(FieldOperand(ecx,
TypeFeedbackVector::kInvocationCountIndex * kPointerSize +
TypeFeedbackVector::kHeaderSize),
Immediate(Smi::FromInt(1)));
__ EmitLoadFeedbackVector(ecx);
__ add(
FieldOperand(ecx, FeedbackVector::kInvocationCountIndex * kPointerSize +
FeedbackVector::kHeaderSize),
Immediate(Smi::FromInt(1)));
// Check function data field is actually a BytecodeArray object.
if (FLAG_debug_code) {
@@ -5461,23 +5461,21 @@ Node* CodeStubAssembler::ElementOffsetFromIndex(Node* index_node,
return IntPtrAdd(IntPtrConstant(base_size), shifted_index);
}
Node* CodeStubAssembler::LoadTypeFeedbackVectorForStub() {
Node* CodeStubAssembler::LoadFeedbackVectorForStub() {
Node* function =
LoadFromParentFrame(JavaScriptFrameConstants::kFunctionOffset);
Node* literals = LoadObjectField(function, JSFunction::kLiteralsOffset);
return LoadObjectField(literals, LiteralsArray::kFeedbackVectorOffset);
}
void CodeStubAssembler::UpdateFeedback(Node* feedback,
Node* type_feedback_vector,
void CodeStubAssembler::UpdateFeedback(Node* feedback, Node* feedback_vector,
Node* slot_id) {
// This method is used for binary op and compare feedback. These
// vector nodes are initialized with a smi 0, so we can simply OR
// our new feedback in place.
Node* previous_feedback =
LoadFixedArrayElement(type_feedback_vector, slot_id);
Node* previous_feedback = LoadFixedArrayElement(feedback_vector, slot_id);
Node* combined_feedback = SmiOr(previous_feedback, feedback);
StoreFixedArrayElement(type_feedback_vector, slot_id, combined_feedback,
StoreFixedArrayElement(feedback_vector, slot_id, combined_feedback,
SKIP_WRITE_BARRIER);
}
@@ -988,11 +988,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* OrdinaryHasInstance(Node* context, Node* callable, Node* object);
// Load type feedback vector from the stub caller's frame.
Node* LoadTypeFeedbackVectorForStub();
Node* LoadFeedbackVectorForStub();
// Update the type feedback vector.
void UpdateFeedback(Node* feedback, Node* type_feedback_vector,
Node* slot_id);
void UpdateFeedback(Node* feedback, Node* feedback_vector, Node* slot_id);
Node* LoadReceiverMap(Node* receiver);
Oops, something went wrong.

1 comment on commit 9c9e2d7

@joaocgreis

This comment has been minimized.

Show comment
Hide comment
@joaocgreis

joaocgreis Apr 11, 2017

Member

This floating patch should no longer be needed with c1670b6 applied.

Member

joaocgreis commented on 9c9e2d7 Apr 11, 2017

This floating patch should no longer be needed with c1670b6 applied.

Please sign in to comment.