| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without | 
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are | 
| 4 // met: | 4 // met: | 
| 5 // | 5 // | 
| 6 //     * Redistributions of source code must retain the above copyright | 6 //     * Redistributions of source code must retain the above copyright | 
| 7 //       notice, this list of conditions and the following disclaimer. | 7 //       notice, this list of conditions and the following disclaimer. | 
| 8 //     * Redistributions in binary form must reproduce the above | 8 //     * Redistributions in binary form must reproduce the above | 
| 9 //       copyright notice, this list of conditions and the following | 9 //       copyright notice, this list of conditions and the following | 
| 10 //       disclaimer in the documentation and/or other materials provided | 10 //       disclaimer in the documentation and/or other materials provided | 
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 560     Add(STRING); | 560     Add(STRING); | 
| 561     return !object->IsUndetectableObject() && | 561     return !object->IsUndetectableObject() && | 
| 562         String::cast(*object)->length() != 0; | 562         String::cast(*object)->length() != 0; | 
| 563   } else if (object->IsSymbol()) { | 563   } else if (object->IsSymbol()) { | 
| 564     Add(SYMBOL); | 564     Add(SYMBOL); | 
| 565     return true; | 565     return true; | 
| 566   } else if (object->IsHeapNumber()) { | 566   } else if (object->IsHeapNumber()) { | 
| 567     ASSERT(!object->IsUndetectableObject()); | 567     ASSERT(!object->IsUndetectableObject()); | 
| 568     Add(HEAP_NUMBER); | 568     Add(HEAP_NUMBER); | 
| 569     double value = HeapNumber::cast(*object)->value(); | 569     double value = HeapNumber::cast(*object)->value(); | 
| 570     return value != 0 && !isnan(value); | 570     return value != 0 && !std::isnan(value); | 
| 571   } else { | 571   } else { | 
| 572     // We should never see an internal object at runtime here! | 572     // We should never see an internal object at runtime here! | 
| 573     UNREACHABLE(); | 573     UNREACHABLE(); | 
| 574     return true; | 574     return true; | 
| 575   } | 575   } | 
| 576 } | 576 } | 
| 577 | 577 | 
| 578 | 578 | 
| 579 bool ToBooleanStub::Types::NeedsMap() const { | 579 bool ToBooleanStub::Types::NeedsMap() const { | 
| 580   return Contains(ToBooleanStub::SPEC_OBJECT) | 580   return Contains(ToBooleanStub::SPEC_OBJECT) | 
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 651   // already active, as the hooks won't stack. | 651   // already active, as the hooks won't stack. | 
| 652   if (entry_hook != 0 && entry_hook_ != 0) | 652   if (entry_hook != 0 && entry_hook_ != 0) | 
| 653     return false; | 653     return false; | 
| 654 | 654 | 
| 655   entry_hook_ = entry_hook; | 655   entry_hook_ = entry_hook; | 
| 656   return true; | 656   return true; | 
| 657 } | 657 } | 
| 658 | 658 | 
| 659 | 659 | 
| 660 } }  // namespace v8::internal | 660 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|