Skip to content

Commit d97920e

Browse files
rmacnak-googlecommit-bot@chromium.org
authored andcommitted
Revert "[vm, compiler] Fix incorrect derivation of a concrete cid from FutureOr."
This reverts commit 9faae80. Reason for revert: Failures on JIT debug bots Original change's description: > [vm, compiler] Fix incorrect derivation of a concrete cid from FutureOr. > > Bug: #34128 > Change-Id: I694b3b7556ee999de3c67c1cd4a8a98654365c24 > Reviewed-on: https://dart-review.googlesource.com/69480 > Commit-Queue: Ryan Macnak <[email protected]> > Reviewed-by: Alexander Markov <[email protected]> > Reviewed-by: Aart Bik <[email protected]> > Reviewed-by: Vyacheslav Egorov <[email protected]> [email protected],[email protected],[email protected],[email protected] Change-Id: Id12351f5c231e6b5ebaa900bf0a1bca7d32cdad5 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: #34128 Reviewed-on: https://dart-review.googlesource.com/69780 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 580f809 commit d97920e

File tree

5 files changed

+1
-29
lines changed

5 files changed

+1
-29
lines changed

runtime/vm/compiler/assembler/assembler_arm.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,12 +1548,6 @@ void Assembler::StoreIntoObjectFilter(Register object,
15481548
// And the result with the negated space bit of the object.
15491549
bic(IP, IP, Operand(object));
15501550
} else {
1551-
#if defined(DEBUG)
1552-
Label okay;
1553-
BranchIfNotSmi(value, &okay);
1554-
Stop("Unexpected Smi!");
1555-
Bind(&okay);
1556-
#endif
15571551
bic(IP, value, Operand(object));
15581552
}
15591553
tst(IP, Operand(kNewObjectAlignmentOffset));

runtime/vm/compiler/assembler/assembler_arm64.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -915,12 +915,6 @@ void Assembler::StoreIntoObjectFilter(Register object,
915915
// Write-barrier triggers if the value is in the new space (has bit set) and
916916
// the object is in the old space (has bit cleared).
917917
if (value_can_be_smi == kValueIsNotSmi) {
918-
#if defined(DEBUG)
919-
Label okay;
920-
BranchIfNotSmi(value, &okay);
921-
Stop("Unexpected Smi!");
922-
Bind(&okay);
923-
#endif
924918
// To check that, we compute value & ~object and skip the write barrier
925919
// if the bit is not set. We can't destroy the object.
926920
bic(TMP, value, Operand(object));
@@ -960,7 +954,7 @@ void Assembler::StoreIntoObject(Register object,
960954
ASSERT(object != value);
961955
str(value, dest);
962956
Label done;
963-
StoreIntoObjectFilter(object, value, &done, can_be_smi, kJumpToNoUpdate);
957+
StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
964958
if (!lr_reserved) Push(LR);
965959
ldr(LR, Address(THR, Thread::update_store_buffer_wrappers_offset(object)));
966960
blr(LR);

runtime/vm/compiler/assembler/assembler_ia32.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,12 +1840,6 @@ void Assembler::StoreIntoObjectFilter(Register object,
18401840
CanBeSmi can_be_smi,
18411841
BarrierFilterMode how_to_jump) {
18421842
if (can_be_smi == kValueIsNotSmi) {
1843-
#if defined(DEBUG)
1844-
Label okay;
1845-
BranchIfNotSmi(value, &okay);
1846-
Stop("Unexpected Smi!");
1847-
Bind(&okay);
1848-
#endif
18491843
COMPILE_ASSERT((kNewObjectAlignmentOffset == kWordSize) &&
18501844
(kOldObjectAlignmentOffset == 0));
18511845
// Write-barrier triggers if the value is in the new space (has bit set) and

runtime/vm/compiler/assembler/assembler_x64.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1224,12 +1224,6 @@ void Assembler::StoreIntoObjectFilter(Register object,
12241224
(kOldObjectAlignmentOffset == 0));
12251225

12261226
if (can_be_smi == kValueIsNotSmi) {
1227-
#if defined(DEBUG)
1228-
Label okay;
1229-
BranchIfNotSmi(value, &okay);
1230-
Stop("Unexpected Smi!");
1231-
Bind(&okay);
1232-
#endif
12331227
// Write-barrier triggers if the value is in the new space (has bit set) and
12341228
// the object is in the old space (has bit cleared).
12351229
// To check that we could compute value & ~object and skip the write barrier

runtime/vm/compiler/backend/type_propagator.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,6 @@ intptr_t CompileType::ToNullableCid() {
662662
cid_ = kClosureCid;
663663
} else if (type_->HasResolvedTypeClass()) {
664664
const Class& type_class = Class::Handle(type_->type_class());
665-
if (type_class.IsFutureOrClass()) {
666-
// FutureOr<T> may be Future<T> or T.
667-
return cid_ = kDynamicCid;
668-
}
669665
Thread* thread = Thread::Current();
670666
CHA* cha = thread->cha();
671667
// Don't infer a cid from an abstract type since there can be multiple

0 commit comments

Comments
 (0)