Skip to content

Commit b6a0185

Browse files
committed
deps: update V8 to 4.5.103.20
Update to the latest branch-head for V8 4.5. This version unships spread calls and spread arrays and fixes a few issues. Detailed information on the V8 commits contained herein: https://github.com/v8/v8-git-mirror/commits/4.5.103.20 Note that there is a typo in the commit log that mistakenly calls it 4.5.103.15. For posterity, 4.5.103.20 refers to v8/v8@71d2ce6
1 parent 71d9711 commit b6a0185

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+571
-154
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 4
1212
#define V8_MINOR_VERSION 5
1313
#define V8_BUILD_NUMBER 103
14-
#define V8_PATCH_LEVEL 6
14+
#define V8_PATCH_LEVEL 20
1515

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

deps/v8/src/api-natives.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,6 @@ MaybeHandle<JSObject> ConfigureInstance(Isolate* isolate, Handle<JSObject> obj,
151151
PropertyAttributes attributes = details.attributes();
152152
PropertyKind kind = details.kind();
153153

154-
if (obj->map()->owns_descriptors() &&
155-
obj->map()->instance_descriptors()->length() != 0 &&
156-
obj->map()->instance_descriptors()->NumberOfSlackDescriptors() == 0 &&
157-
TransitionArray::SearchTransition(obj->map(), kind, *name,
158-
attributes) == NULL) {
159-
Map::EnsureDescriptorSlack(handle(obj->map()),
160-
data->number_of_properties() - c);
161-
}
162-
163154
if (kind == kData) {
164155
auto prop_data = handle(properties.get(i++), isolate);
165156

deps/v8/src/arm/assembler-arm-inl.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -433,9 +433,7 @@ void Assembler::CheckBuffer() {
433433
if (buffer_space() <= kGap) {
434434
GrowBuffer();
435435
}
436-
if (pc_offset() >= next_buffer_check_) {
437-
CheckConstPool(false, true);
438-
}
436+
MaybeCheckConstPool();
439437
}
440438

441439

deps/v8/src/arm/assembler-arm.cc

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ void Assembler::addrmod5(Instr instr, CRegister crd, const MemOperand& x) {
13081308
}
13091309

13101310

1311-
int Assembler::branch_offset(Label* L, bool jump_elimination_allowed) {
1311+
int Assembler::branch_offset(Label* L) {
13121312
int target_pos;
13131313
if (L->is_bound()) {
13141314
target_pos = L->pos();
@@ -1377,6 +1377,24 @@ void Assembler::bx(Register target, Condition cond) { // v5 and above, plus v4t
13771377
}
13781378

13791379

1380+
void Assembler::b(Label* L, Condition cond) {
1381+
CheckBuffer();
1382+
b(branch_offset(L), cond);
1383+
}
1384+
1385+
1386+
void Assembler::bl(Label* L, Condition cond) {
1387+
CheckBuffer();
1388+
bl(branch_offset(L), cond);
1389+
}
1390+
1391+
1392+
void Assembler::blx(Label* L) {
1393+
CheckBuffer();
1394+
blx(branch_offset(L));
1395+
}
1396+
1397+
13801398
// Data-processing instructions.
13811399

13821400
void Assembler::and_(Register dst, Register src1, const Operand& src2,
@@ -3820,10 +3838,7 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
38203838
bind(&size_check);
38213839

38223840
// Emit jump over constant pool if necessary.
3823-
Label after_pool;
3824-
if (require_jump) {
3825-
b(&after_pool);
3826-
}
3841+
if (require_jump) b(size - kPcLoadDelta);
38273842

38283843
// Put down constant pool marker "Undefined instruction".
38293844
// The data size helps disassembly know what to print.
@@ -3907,10 +3922,6 @@ void Assembler::CheckConstPool(bool force_emit, bool require_jump) {
39073922
RecordComment("]");
39083923

39093924
DCHECK_EQ(size, SizeOfCodeGeneratedSince(&size_check));
3910-
3911-
if (after_pool.is_linked()) {
3912-
bind(&after_pool);
3913-
}
39143925
}
39153926

39163927
// Since a constant pool was just emitted, move the check offset forward by

deps/v8/src/arm/assembler-arm.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ class Assembler : public AssemblerBase {
700700
// Returns the branch offset to the given label from the current code position
701701
// Links the label to the current position if it is still unbound
702702
// Manages the jump elimination optimization if the second parameter is true.
703-
int branch_offset(Label* L, bool jump_elimination_allowed);
703+
int branch_offset(Label* L);
704704

705705
// Returns true if the given pc address is the start of a constant pool load
706706
// instruction sequence.
@@ -806,13 +806,11 @@ class Assembler : public AssemblerBase {
806806
void bx(Register target, Condition cond = al); // v5 and above, plus v4t
807807

808808
// Convenience branch instructions using labels
809-
void b(Label* L, Condition cond = al) {
810-
b(branch_offset(L, cond == al), cond);
811-
}
812-
void b(Condition cond, Label* L) { b(branch_offset(L, cond == al), cond); }
813-
void bl(Label* L, Condition cond = al) { bl(branch_offset(L, false), cond); }
814-
void bl(Condition cond, Label* L) { bl(branch_offset(L, false), cond); }
815-
void blx(Label* L) { blx(branch_offset(L, false)); } // v5 and above
809+
void b(Label* L, Condition cond = al);
810+
void b(Condition cond, Label* L) { b(L, cond); }
811+
void bl(Label* L, Condition cond = al);
812+
void bl(Condition cond, Label* L) { bl(L, cond); }
813+
void blx(Label* L); // v5 and above
816814

817815
// Data-processing instructions
818816

@@ -1492,6 +1490,12 @@ class Assembler : public AssemblerBase {
14921490
// Check if is time to emit a constant pool.
14931491
void CheckConstPool(bool force_emit, bool require_jump);
14941492

1493+
void MaybeCheckConstPool() {
1494+
if (pc_offset() >= next_buffer_check_) {
1495+
CheckConstPool(false, true);
1496+
}
1497+
}
1498+
14951499
int EmitEmbeddedConstantPool() {
14961500
DCHECK(FLAG_enable_embedded_constant_pool);
14971501
return constant_pool_builder_.Emit(this);

deps/v8/src/compiler/arm/code-generator-arm.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ void CodeGenerator::AssembleDeconstructActivationRecord() {
312312
void CodeGenerator::AssembleArchInstruction(Instruction* instr) {
313313
ArmOperandConverter i(this, instr);
314314

315+
masm()->MaybeCheckConstPool();
316+
315317
switch (ArchOpcodeField::decode(instr->opcode())) {
316318
case kArchCallCodeObject: {
317319
EnsureSpaceForLazyDeopt();

deps/v8/src/compiler/mips/code-generator-mips.cc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -907,42 +907,32 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
907907
cc = FlagsConditionToConditionTst(branch->condition);
908908
__ And(at, i.InputRegister(0), i.InputOperand(1));
909909
__ Branch(tlabel, cc, at, Operand(zero_reg));
910-
911910
} else if (instr->arch_opcode() == kMipsAddOvf ||
912911
instr->arch_opcode() == kMipsSubOvf) {
913912
// kMipsAddOvf, SubOvf emit negative result to 'kCompareReg' on overflow.
914913
cc = FlagsConditionToConditionOvf(branch->condition);
915914
__ Branch(tlabel, cc, kCompareReg, Operand(zero_reg));
916-
917915
} else if (instr->arch_opcode() == kMipsCmp) {
918916
cc = FlagsConditionToConditionCmp(branch->condition);
919917
__ Branch(tlabel, cc, i.InputRegister(0), i.InputOperand(1));
920-
921-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
922-
923918
} else if (instr->arch_opcode() == kMipsCmpS) {
924919
if (!convertCondition(branch->condition, cc)) {
925920
UNSUPPORTED_COND(kMips64CmpS, branch->condition);
926921
}
927922
__ BranchF32(tlabel, NULL, cc, i.InputSingleRegister(0),
928923
i.InputSingleRegister(1));
929-
930-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
931-
932924
} else if (instr->arch_opcode() == kMipsCmpD) {
933925
if (!convertCondition(branch->condition, cc)) {
934926
UNSUPPORTED_COND(kMips64CmpD, branch->condition);
935927
}
936928
__ BranchF64(tlabel, NULL, cc, i.InputDoubleRegister(0),
937929
i.InputDoubleRegister(1));
938-
939-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
940-
941930
} else {
942931
PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n",
943932
instr->arch_opcode());
944933
UNIMPLEMENTED();
945934
}
935+
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
946936
}
947937

948938

deps/v8/src/compiler/mips64/code-generator-mips64.cc

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -983,37 +983,30 @@ void CodeGenerator::AssembleArchBranch(Instruction* instr, BranchInfo* branch) {
983983
} else if (instr->arch_opcode() == kMips64Dadd ||
984984
instr->arch_opcode() == kMips64Dsub) {
985985
cc = FlagsConditionToConditionOvf(branch->condition);
986-
987986
__ dsra32(kScratchReg, i.OutputRegister(), 0);
988987
__ sra(at, i.OutputRegister(), 31);
989988
__ Branch(tlabel, cc, at, Operand(kScratchReg));
990989
} else if (instr->arch_opcode() == kMips64Cmp) {
991990
cc = FlagsConditionToConditionCmp(branch->condition);
992991
__ Branch(tlabel, cc, i.InputRegister(0), i.InputOperand(1));
993-
994-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
995992
} else if (instr->arch_opcode() == kMips64CmpS) {
996993
if (!convertCondition(branch->condition, cc)) {
997994
UNSUPPORTED_COND(kMips64CmpS, branch->condition);
998995
}
999996
__ BranchF32(tlabel, NULL, cc, i.InputSingleRegister(0),
1000997
i.InputSingleRegister(1));
1001-
1002-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
1003-
1004998
} else if (instr->arch_opcode() == kMips64CmpD) {
1005999
if (!convertCondition(branch->condition, cc)) {
10061000
UNSUPPORTED_COND(kMips64CmpD, branch->condition);
10071001
}
10081002
__ BranchF64(tlabel, NULL, cc, i.InputDoubleRegister(0),
10091003
i.InputDoubleRegister(1));
1010-
1011-
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
10121004
} else {
10131005
PrintF("AssembleArchBranch Unimplemented arch_opcode: %d\n",
10141006
instr->arch_opcode());
10151007
UNIMPLEMENTED();
10161008
}
1009+
if (!branch->fallthru) __ Branch(flabel); // no fallthru to flabel.
10171010
}
10181011

10191012

deps/v8/src/flag-definitions.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
202202
#define HARMONY_STAGED(V) \
203203
V(harmony_tostring, "harmony toString") \
204204
V(harmony_concat_spreadable, "harmony isConcatSpreadable") \
205-
V(harmony_rest_parameters, "harmony rest parameters")
205+
V(harmony_rest_parameters, "harmony rest parameters") \
206+
V(harmony_spreadcalls, "harmony spread-calls") \
207+
V(harmony_spread_arrays, "harmony spread in array literals")
206208

207209
// Features that are shipping (turned on by default, but internal flag remains).
208210
#define HARMONY_SHIPPING(V) \
209211
V(harmony_arrow_functions, "harmony arrow functions") \
210212
V(harmony_computed_property_names, "harmony computed property names") \
211-
V(harmony_spreadcalls, "harmony spread-calls") \
212-
V(harmony_spread_arrays, "harmony spread in array literals") \
213213
V(harmony_unicode, "harmony unicode escapes") \
214214
V(harmony_object, "harmony Object methods")
215215

deps/v8/src/heap/gc-idle-time-handler.cc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ bool GCIdleTimeHandler::ShouldDoScavenge(
114114
size_t idle_time_in_ms, size_t new_space_size, size_t used_new_space_size,
115115
size_t scavenge_speed_in_bytes_per_ms,
116116
size_t new_space_allocation_throughput_in_bytes_per_ms) {
117+
if (idle_time_in_ms >= kMinBackgroundIdleTime) {
118+
// It is better to do full GC for the background tab.
119+
return false;
120+
}
117121
size_t new_space_allocation_limit =
118122
kMaxScheduledIdleTime * scavenge_speed_in_bytes_per_ms;
119123

@@ -193,7 +197,10 @@ bool GCIdleTimeHandler::ShouldDoOverApproximateWeakClosure(
193197
}
194198

195199

196-
GCIdleTimeAction GCIdleTimeHandler::NothingOrDone() {
200+
GCIdleTimeAction GCIdleTimeHandler::NothingOrDone(double idle_time_in_ms) {
201+
if (idle_time_in_ms >= kMinBackgroundIdleTime) {
202+
return GCIdleTimeAction::Nothing();
203+
}
197204
if (idle_times_which_made_no_progress_ >= kMaxNoProgressIdleTimes) {
198205
return GCIdleTimeAction::Done();
199206
} else {
@@ -232,7 +239,7 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(double idle_time_in_ms,
232239
// get the right idle signal.
233240
if (ShouldDoContextDisposalMarkCompact(heap_state.contexts_disposed,
234241
heap_state.contexts_disposal_rate)) {
235-
return NothingOrDone();
242+
return NothingOrDone(idle_time_in_ms);
236243
}
237244

238245
if (ShouldDoScavenge(
@@ -247,7 +254,7 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(double idle_time_in_ms,
247254
if (heap_state.sweeping_completed) {
248255
return GCIdleTimeAction::FinalizeSweeping();
249256
} else {
250-
return NothingOrDone();
257+
return NothingOrDone(idle_time_in_ms);
251258
}
252259
}
253260

0 commit comments

Comments
 (0)