Skip to content

Commit a6ca5e5

Browse files
ofrobotsevanlucas
authored andcommitted
deps: upgrade to V8 5.0.71.47
Pick up the latest set of patch level updates from the V8 5.0 branch. v8/v8@5.0.71.35...5.0.71.47 PR-URL: #6572 Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: JungMinu - Minwoo Jung <[email protected]>
1 parent 16159c2 commit a6ca5e5

39 files changed

+736
-784
lines changed

deps/v8/include/v8-version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 5
1212
#define V8_MINOR_VERSION 0
1313
#define V8_BUILD_NUMBER 71
14-
#define V8_PATCH_LEVEL 35
14+
#define V8_PATCH_LEVEL 47
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

deps/v8/src/arm/code-stubs-arm.cc

Lines changed: 39 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -671,11 +671,19 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
671671

672672
__ bind(&slow);
673673

674-
__ Push(lhs, rhs);
675-
// Figure out which native to call and setup the arguments.
676674
if (cc == eq) {
677-
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
675+
{
676+
FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
677+
__ Push(lhs, rhs);
678+
__ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
679+
}
680+
// Turn true into 0 and false into some non-zero value.
681+
STATIC_ASSERT(EQUAL == 0);
682+
__ LoadRoot(r1, Heap::kTrueValueRootIndex);
683+
__ sub(r0, r0, r1);
684+
__ Ret();
678685
} else {
686+
__ Push(lhs, rhs);
679687
int ncr; // NaN compare result
680688
if (cc == lt || cc == le) {
681689
ncr = GREATER;
@@ -1573,70 +1581,59 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
15731581
__ ldr(subject, MemOperand(sp, kSubjectOffset));
15741582
__ JumpIfSmi(subject, &runtime);
15751583
__ mov(r3, subject); // Make a copy of the original subject string.
1576-
__ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset));
1577-
__ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
15781584
// subject: subject string
15791585
// r3: subject string
1580-
// r0: subject string instance type
15811586
// regexp_data: RegExp data (FixedArray)
15821587
// Handle subject string according to its encoding and representation:
1583-
// (1) Sequential string? If yes, go to (5).
1584-
// (2) Anything but sequential or cons? If yes, go to (6).
1585-
// (3) Cons string. If the string is flat, replace subject with first string.
1586-
// Otherwise bailout.
1587-
// (4) Is subject external? If yes, go to (7).
1588-
// (5) Sequential string. Load regexp code according to encoding.
1588+
// (1) Sequential string? If yes, go to (4).
1589+
// (2) Sequential or cons? If not, go to (5).
1590+
// (3) Cons string. If the string is flat, replace subject with first string
1591+
// and go to (1). Otherwise bail out to runtime.
1592+
// (4) Sequential string. Load regexp code according to encoding.
15891593
// (E) Carry on.
15901594
/// [...]
15911595

15921596
// Deferred code at the end of the stub:
1593-
// (6) Not a long external string? If yes, go to (8).
1594-
// (7) External string. Make it, offset-wise, look like a sequential string.
1595-
// Go to (5).
1596-
// (8) Short external string or not a string? If yes, bail out to runtime.
1597-
// (9) Sliced string. Replace subject with parent. Go to (4).
1597+
// (5) Long external string? If not, go to (7).
1598+
// (6) External string. Make it, offset-wise, look like a sequential string.
1599+
// Go to (4).
1600+
// (7) Short external string or not a string? If yes, bail out to runtime.
1601+
// (8) Sliced string. Replace subject with parent. Go to (1).
15981602

1599-
Label seq_string /* 5 */, external_string /* 7 */,
1600-
check_underlying /* 4 */, not_seq_nor_cons /* 6 */,
1601-
not_long_external /* 8 */;
1603+
Label seq_string /* 4 */, external_string /* 6 */, check_underlying /* 1 */,
1604+
not_seq_nor_cons /* 5 */, not_long_external /* 7 */;
16021605

1603-
// (1) Sequential string? If yes, go to (5).
1606+
__ bind(&check_underlying);
1607+
__ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset));
1608+
__ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
1609+
1610+
// (1) Sequential string? If yes, go to (4).
16041611
__ and_(r1,
16051612
r0,
16061613
Operand(kIsNotStringMask |
16071614
kStringRepresentationMask |
16081615
kShortExternalStringMask),
16091616
SetCC);
16101617
STATIC_ASSERT((kStringTag | kSeqStringTag) == 0);
1611-
__ b(eq, &seq_string); // Go to (5).
1618+
__ b(eq, &seq_string); // Go to (4).
16121619

1613-
// (2) Anything but sequential or cons? If yes, go to (6).
1620+
// (2) Sequential or cons? If not, go to (5).
16141621
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
16151622
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
16161623
STATIC_ASSERT(kIsNotStringMask > kExternalStringTag);
16171624
STATIC_ASSERT(kShortExternalStringTag > kExternalStringTag);
16181625
__ cmp(r1, Operand(kExternalStringTag));
1619-
__ b(ge, &not_seq_nor_cons); // Go to (6).
1626+
__ b(ge, &not_seq_nor_cons); // Go to (5).
16201627

16211628
// (3) Cons string. Check that it's flat.
16221629
// Replace subject with first string and reload instance type.
16231630
__ ldr(r0, FieldMemOperand(subject, ConsString::kSecondOffset));
16241631
__ CompareRoot(r0, Heap::kempty_stringRootIndex);
16251632
__ b(ne, &runtime);
16261633
__ ldr(subject, FieldMemOperand(subject, ConsString::kFirstOffset));
1634+
__ jmp(&check_underlying);
16271635

1628-
// (4) Is subject external? If yes, go to (7).
1629-
__ bind(&check_underlying);
1630-
__ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset));
1631-
__ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
1632-
STATIC_ASSERT(kSeqStringTag == 0);
1633-
__ tst(r0, Operand(kStringRepresentationMask));
1634-
// The underlying external string is never a short external string.
1635-
STATIC_ASSERT(ExternalString::kMaxShortLength < ConsString::kMinLength);
1636-
STATIC_ASSERT(ExternalString::kMaxShortLength < SlicedString::kMinLength);
1637-
__ b(ne, &external_string); // Go to (7).
1638-
1639-
// (5) Sequential string. Load regexp code according to encoding.
1636+
// (4) Sequential string. Load regexp code according to encoding.
16401637
__ bind(&seq_string);
16411638
// subject: sequential subject string (or look-alike, external string)
16421639
// r3: original subject string
@@ -1869,12 +1866,12 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
18691866
__ TailCallRuntime(Runtime::kRegExpExec);
18701867

18711868
// Deferred code for string handling.
1872-
// (6) Not a long external string? If yes, go to (8).
1869+
// (5) Long external string? If not, go to (7).
18731870
__ bind(&not_seq_nor_cons);
18741871
// Compare flags are still set.
1875-
__ b(gt, &not_long_external); // Go to (8).
1872+
__ b(gt, &not_long_external); // Go to (7).
18761873

1877-
// (7) External string. Make it, offset-wise, look like a sequential string.
1874+
// (6) External string. Make it, offset-wise, look like a sequential string.
18781875
__ bind(&external_string);
18791876
__ ldr(r0, FieldMemOperand(subject, HeapObject::kMapOffset));
18801877
__ ldrb(r0, FieldMemOperand(r0, Map::kInstanceTypeOffset));
@@ -1891,15 +1888,15 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
18911888
__ sub(subject,
18921889
subject,
18931890
Operand(SeqTwoByteString::kHeaderSize - kHeapObjectTag));
1894-
__ jmp(&seq_string); // Go to (5).
1891+
__ jmp(&seq_string); // Go to (4).
18951892

1896-
// (8) Short external string or not a string? If yes, bail out to runtime.
1893+
// (7) Short external string or not a string? If yes, bail out to runtime.
18971894
__ bind(&not_long_external);
18981895
STATIC_ASSERT(kNotStringTag != 0 && kShortExternalStringTag !=0);
18991896
__ tst(r1, Operand(kIsNotStringMask | kShortExternalStringMask));
19001897
__ b(ne, &runtime);
19011898

1902-
// (9) Sliced string. Replace subject with parent. Go to (4).
1899+
// (8) Sliced string. Replace subject with parent. Go to (4).
19031900
// Load offset into r9 and replace subject string with parent.
19041901
__ ldr(r9, FieldMemOperand(subject, SlicedString::kOffsetOffset));
19051902
__ SmiUntag(r9);

deps/v8/src/arm64/code-stubs-arm64.cc

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,19 @@ void CompareICStub::GenerateGeneric(MacroAssembler* masm) {
628628

629629
__ Bind(&slow);
630630

631-
__ Push(lhs, rhs);
632-
// Figure out which native to call and setup the arguments.
633631
if (cond == eq) {
634-
__ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals);
632+
{
633+
FrameScope scope(masm, StackFrame::INTERNAL);
634+
__ Push(lhs, rhs);
635+
__ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual);
636+
}
637+
// Turn true into 0 and false into some non-zero value.
638+
STATIC_ASSERT(EQUAL == 0);
639+
__ LoadRoot(x1, Heap::kTrueValueRootIndex);
640+
__ Sub(x0, x0, x1);
641+
__ Ret();
635642
} else {
643+
__ Push(lhs, rhs);
636644
int ncr; // NaN compare result
637645
if ((cond == lt) || (cond == le)) {
638646
ncr = GREATER;
@@ -1739,35 +1747,35 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
17391747
__ Peek(subject, kSubjectOffset);
17401748
__ JumpIfSmi(subject, &runtime);
17411749

1742-
__ Ldr(x10, FieldMemOperand(subject, HeapObject::kMapOffset));
1743-
__ Ldrb(string_type, FieldMemOperand(x10, Map::kInstanceTypeOffset));
1744-
17451750
__ Ldr(jsstring_length, FieldMemOperand(subject, String::kLengthOffset));
17461751

17471752
// Handle subject string according to its encoding and representation:
1748-
// (1) Sequential string? If yes, go to (5).
1749-
// (2) Anything but sequential or cons? If yes, go to (6).
1750-
// (3) Cons string. If the string is flat, replace subject with first string.
1751-
// Otherwise bailout.
1752-
// (4) Is subject external? If yes, go to (7).
1753-
// (5) Sequential string. Load regexp code according to encoding.
1753+
// (1) Sequential string? If yes, go to (4).
1754+
// (2) Sequential or cons? If not, go to (5).
1755+
// (3) Cons string. If the string is flat, replace subject with first string
1756+
// and go to (1). Otherwise bail out to runtime.
1757+
// (4) Sequential string. Load regexp code according to encoding.
17541758
// (E) Carry on.
17551759
/// [...]
17561760

17571761
// Deferred code at the end of the stub:
1758-
// (6) Not a long external string? If yes, go to (8).
1759-
// (7) External string. Make it, offset-wise, look like a sequential string.
1760-
// Go to (5).
1761-
// (8) Short external string or not a string? If yes, bail out to runtime.
1762-
// (9) Sliced string. Replace subject with parent. Go to (4).
1763-
1764-
Label check_underlying; // (4)
1765-
Label seq_string; // (5)
1766-
Label not_seq_nor_cons; // (6)
1767-
Label external_string; // (7)
1768-
Label not_long_external; // (8)
1769-
1770-
// (1) Sequential string? If yes, go to (5).
1762+
// (5) Long external string? If not, go to (7).
1763+
// (6) External string. Make it, offset-wise, look like a sequential string.
1764+
// Go to (4).
1765+
// (7) Short external string or not a string? If yes, bail out to runtime.
1766+
// (8) Sliced string. Replace subject with parent. Go to (1).
1767+
1768+
Label check_underlying; // (1)
1769+
Label seq_string; // (4)
1770+
Label not_seq_nor_cons; // (5)
1771+
Label external_string; // (6)
1772+
Label not_long_external; // (7)
1773+
1774+
__ Bind(&check_underlying);
1775+
__ Ldr(x10, FieldMemOperand(subject, HeapObject::kMapOffset));
1776+
__ Ldrb(string_type, FieldMemOperand(x10, Map::kInstanceTypeOffset));
1777+
1778+
// (1) Sequential string? If yes, go to (4).
17711779
__ And(string_representation,
17721780
string_type,
17731781
kIsNotStringMask |
@@ -1784,36 +1792,24 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
17841792
// is a String
17851793
STATIC_ASSERT((kStringTag | kSeqStringTag) == 0);
17861794
STATIC_ASSERT(kShortExternalStringTag != 0);
1787-
__ Cbz(string_representation, &seq_string); // Go to (5).
1795+
__ Cbz(string_representation, &seq_string); // Go to (4).
17881796

1789-
// (2) Anything but sequential or cons? If yes, go to (6).
1797+
// (2) Sequential or cons? If not, go to (5).
17901798
STATIC_ASSERT(kConsStringTag < kExternalStringTag);
17911799
STATIC_ASSERT(kSlicedStringTag > kExternalStringTag);
17921800
STATIC_ASSERT(kIsNotStringMask > kExternalStringTag);
17931801
STATIC_ASSERT(kShortExternalStringTag > kExternalStringTag);
17941802
__ Cmp(string_representation, kExternalStringTag);
1795-
__ B(ge, &not_seq_nor_cons); // Go to (6).
1803+
__ B(ge, &not_seq_nor_cons); // Go to (5).
17961804

17971805
// (3) Cons string. Check that it's flat.
17981806
__ Ldr(x10, FieldMemOperand(subject, ConsString::kSecondOffset));
17991807
__ JumpIfNotRoot(x10, Heap::kempty_stringRootIndex, &runtime);
18001808
// Replace subject with first string.
18011809
__ Ldr(subject, FieldMemOperand(subject, ConsString::kFirstOffset));
1810+
__ B(&check_underlying);
18021811

1803-
// (4) Is subject external? If yes, go to (7).
1804-
__ Bind(&check_underlying);
1805-
// Reload the string type.
1806-
__ Ldr(x10, FieldMemOperand(subject, HeapObject::kMapOffset));
1807-
__ Ldrb(string_type, FieldMemOperand(x10, Map::kInstanceTypeOffset));
1808-
STATIC_ASSERT(kSeqStringTag == 0);
1809-
// The underlying external string is never a short external string.
1810-
STATIC_ASSERT(ExternalString::kMaxShortLength < ConsString::kMinLength);
1811-
STATIC_ASSERT(ExternalString::kMaxShortLength < SlicedString::kMinLength);
1812-
__ TestAndBranchIfAnySet(string_type.X(),
1813-
kStringRepresentationMask,
1814-
&external_string); // Go to (7).
1815-
1816-
// (5) Sequential string. Load regexp code according to encoding.
1812+
// (4) Sequential string. Load regexp code according to encoding.
18171813
__ Bind(&seq_string);
18181814

18191815
// Check that the third argument is a positive smi less than the subject
@@ -2083,12 +2079,12 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
20832079
__ TailCallRuntime(Runtime::kRegExpExec);
20842080

20852081
// Deferred code for string handling.
2086-
// (6) Not a long external string? If yes, go to (8).
2082+
// (5) Long external string? If not, go to (7).
20872083
__ Bind(&not_seq_nor_cons);
20882084
// Compare flags are still set.
2089-
__ B(ne, &not_long_external); // Go to (8).
2085+
__ B(ne, &not_long_external); // Go to (7).
20902086

2091-
// (7) External string. Make it, offset-wise, look like a sequential string.
2087+
// (6) External string. Make it, offset-wise, look like a sequential string.
20922088
__ Bind(&external_string);
20932089
if (masm->emit_debug_code()) {
20942090
// Assert that we do not have a cons or slice (indirect strings) here.
@@ -2106,21 +2102,21 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
21062102
// Move the pointer so that offset-wise, it looks like a sequential string.
21072103
STATIC_ASSERT(SeqTwoByteString::kHeaderSize == SeqOneByteString::kHeaderSize);
21082104
__ Sub(subject, subject, SeqTwoByteString::kHeaderSize - kHeapObjectTag);
2109-
__ B(&seq_string); // Go to (5).
2105+
__ B(&seq_string); // Go to (4).
21102106

2111-
// (8) If this is a short external string or not a string, bail out to
2107+
// (7) If this is a short external string or not a string, bail out to
21122108
// runtime.
21132109
__ Bind(&not_long_external);
21142110
STATIC_ASSERT(kShortExternalStringTag != 0);
21152111
__ TestAndBranchIfAnySet(string_representation,
21162112
kShortExternalStringMask | kIsNotStringMask,
21172113
&runtime);
21182114

2119-
// (9) Sliced string. Replace subject with parent.
2115+
// (8) Sliced string. Replace subject with parent.
21202116
__ Ldr(sliced_string_offset,
21212117
UntagSmiFieldMemOperand(subject, SlicedString::kOffsetOffset));
21222118
__ Ldr(subject, FieldMemOperand(subject, SlicedString::kParentOffset));
2123-
__ B(&check_underlying); // Go to (4).
2119+
__ B(&check_underlying); // Go to (1).
21242120
#endif
21252121
}
21262122

deps/v8/src/compiler/ia32/instruction-selector-ia32.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,10 @@ void VisitDiv(InstructionSelector* selector, Node* node, ArchOpcode opcode) {
530530

531531
void VisitMod(InstructionSelector* selector, Node* node, ArchOpcode opcode) {
532532
IA32OperandGenerator g(selector);
533+
InstructionOperand temps[] = {g.TempRegister(eax)};
533534
selector->Emit(opcode, g.DefineAsFixed(node, edx),
534535
g.UseFixed(node->InputAt(0), eax),
535-
g.UseUnique(node->InputAt(1)));
536+
g.UseUnique(node->InputAt(1)), arraysize(temps), temps);
536537
}
537538

538539
void EmitLea(InstructionSelector* selector, Node* result, Node* index,

0 commit comments

Comments
 (0)