Commit b915411c authored by zhengxing.li's avatar zhengxing.li Committed by Commit bot

X87: [compiler] Drop the CompareNilIC.

  port 666aec03 (r34237)

  original commit message:
  Since both null and undefined are also marked as undetectable now, we
  can just test that bit instead of having the CompareNilIC try to collect
  feedback to speed up the general case (without the undetectable bit
  being used).

  Drive-by-fix: Update the type system to match the new handling of
  undetectable in the runtime.

BUG=

Review URL: https://codereview.chromium.org/1731383003

Cr-Commit-Position: refs/heads/master@{#34270}
parent 01d228f3
...@@ -3887,10 +3887,11 @@ void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr, ...@@ -3887,10 +3887,11 @@ void FullCodeGenerator::EmitLiteralCompareNil(CompareOperation* expr,
__ cmp(eax, nil_value); __ cmp(eax, nil_value);
Split(equal, if_true, if_false, fall_through); Split(equal, if_true, if_false, fall_through);
} else { } else {
Handle<Code> ic = CompareNilICStub::GetUninitialized(isolate(), nil); __ JumpIfSmi(eax, if_false);
CallIC(ic, expr->CompareOperationFeedbackId()); __ mov(eax, FieldOperand(eax, HeapObject::kMapOffset));
__ cmp(eax, isolate()->factory()->true_value()); __ test_b(FieldOperand(eax, Map::kBitFieldOffset),
Split(equal, if_true, if_false, fall_through); 1 << Map::kIsUndetectable);
Split(not_zero, if_true, if_false, fall_through);
} }
context()->Plug(if_true, if_false); context()->Plug(if_true, if_false);
} }
......
...@@ -321,13 +321,6 @@ void CompareDescriptor::InitializePlatformSpecific( ...@@ -321,13 +321,6 @@ void CompareDescriptor::InitializePlatformSpecific(
} }
void CompareNilDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) {
Register registers[] = {eax};
data->InitializePlatformSpecific(arraysize(registers), registers, NULL);
}
void ToBooleanDescriptor::InitializePlatformSpecific( void ToBooleanDescriptor::InitializePlatformSpecific(
CallInterfaceDescriptorData* data) { CallInterfaceDescriptorData* data) {
Register registers[] = {eax}; Register registers[] = {eax};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment