diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-08-18 16:59:21 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-08-18 16:59:30 -0700 |
commit | 05e6f318c6ecccea73698367010e51812c5b3862 (patch) | |
tree | 965d1c3bcdd518dd7411d8f39dd45189e1526d3d /deps/v8/src/code-stubs.cc | |
parent | 63607a0304e99259d3b7a24c44f7d29384b93cb4 (diff) | |
download | node-new-05e6f318c6ecccea73698367010e51812c5b3862.tar.gz |
Upgrade V8 to 3.5.6
Diffstat (limited to 'deps/v8/src/code-stubs.cc')
-rw-r--r-- | deps/v8/src/code-stubs.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/deps/v8/src/code-stubs.cc b/deps/v8/src/code-stubs.cc index 0cba275c3e..5535d171be 100644 --- a/deps/v8/src/code-stubs.cc +++ b/deps/v8/src/code-stubs.cc @@ -340,12 +340,11 @@ void ToBooleanStub::Types::Print(StringStream* stream) const { if (IsEmpty()) stream->Add("None"); if (Contains(UNDEFINED)) stream->Add("Undefined"); if (Contains(BOOLEAN)) stream->Add("Bool"); - if (Contains(SMI)) stream->Add("Smi"); if (Contains(NULL_TYPE)) stream->Add("Null"); + if (Contains(SMI)) stream->Add("Smi"); if (Contains(SPEC_OBJECT)) stream->Add("SpecObject"); if (Contains(STRING)) stream->Add("String"); if (Contains(HEAP_NUMBER)) stream->Add("HeapNumber"); - if (Contains(INTERNAL_OBJECT)) stream->Add("InternalObject"); } @@ -385,12 +384,14 @@ bool ToBooleanStub::Types::Record(Handle<Object> object) { return !object->IsUndetectableObject() && String::cast(*object)->length() != 0; } else if (object->IsHeapNumber()) { + ASSERT(!object->IsUndetectableObject()); Add(HEAP_NUMBER); double value = HeapNumber::cast(*object)->value(); - return !object->IsUndetectableObject() && value != 0 && !isnan(value); + return value != 0 && !isnan(value); } else { - Add(INTERNAL_OBJECT); - return !object->IsUndetectableObject(); + // We should never see an internal object at runtime here! + UNREACHABLE(); + return true; } } @@ -398,8 +399,13 @@ bool ToBooleanStub::Types::Record(Handle<Object> object) { bool ToBooleanStub::Types::NeedsMap() const { return Contains(ToBooleanStub::SPEC_OBJECT) || Contains(ToBooleanStub::STRING) - || Contains(ToBooleanStub::HEAP_NUMBER) - || Contains(ToBooleanStub::INTERNAL_OBJECT); + || Contains(ToBooleanStub::HEAP_NUMBER); +} + + +bool ToBooleanStub::Types::CanBeUndetectable() const { + return Contains(ToBooleanStub::SPEC_OBJECT) + || Contains(ToBooleanStub::STRING); } |