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 1716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1727 } | 1727 } |
1728 | 1728 |
1729 | 1729 |
1730 bool Object::IsStringObjectWithCharacterAt(uint32_t index) { | 1730 bool Object::IsStringObjectWithCharacterAt(uint32_t index) { |
1731 if (!this->IsJSValue()) return false; | 1731 if (!this->IsJSValue()) return false; |
1732 | 1732 |
1733 JSValue* js_value = JSValue::cast(this); | 1733 JSValue* js_value = JSValue::cast(this); |
1734 if (!js_value->value()->IsString()) return false; | 1734 if (!js_value->value()->IsString()) return false; |
1735 | 1735 |
1736 String* str = String::cast(js_value->value()); | 1736 String* str = String::cast(js_value->value()); |
1737 if (index >= (uint32_t)str->length()) return false; | 1737 if (index >= static_cast<uint32_t>(str->length())) return false; |
1738 | 1738 |
1739 return true; | 1739 return true; |
1740 } | 1740 } |
1741 | 1741 |
1742 | 1742 |
1743 | 1743 |
1744 void Object::VerifyApiCallResultType() { | 1744 void Object::VerifyApiCallResultType() { |
1745 #if ENABLE_EXTRA_CHECKS | 1745 #if ENABLE_EXTRA_CHECKS |
1746 if (!(IsSmi() || | 1746 if (!(IsSmi() || |
1747 IsString() || | 1747 IsString() || |
(...skipping 4033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5781 #undef WRITE_UINT32_FIELD | 5781 #undef WRITE_UINT32_FIELD |
5782 #undef READ_SHORT_FIELD | 5782 #undef READ_SHORT_FIELD |
5783 #undef WRITE_SHORT_FIELD | 5783 #undef WRITE_SHORT_FIELD |
5784 #undef READ_BYTE_FIELD | 5784 #undef READ_BYTE_FIELD |
5785 #undef WRITE_BYTE_FIELD | 5785 #undef WRITE_BYTE_FIELD |
5786 | 5786 |
5787 | 5787 |
5788 } } // namespace v8::internal | 5788 } } // namespace v8::internal |
5789 | 5789 |
5790 #endif // V8_OBJECTS_INL_H_ | 5790 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |