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 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2075 JSValue* js_value = JSValue::cast(this); | 2075 JSValue* js_value = JSValue::cast(this); |
2076 if (!js_value->value()->IsString()) return false; | 2076 if (!js_value->value()->IsString()) return false; |
2077 | 2077 |
2078 String* str = String::cast(js_value->value()); | 2078 String* str = String::cast(js_value->value()); |
2079 if (index >= static_cast<uint32_t>(str->length())) return false; | 2079 if (index >= static_cast<uint32_t>(str->length())) return false; |
2080 | 2080 |
2081 return true; | 2081 return true; |
2082 } | 2082 } |
2083 | 2083 |
2084 | 2084 |
2085 | |
2086 void Object::VerifyApiCallResultType() { | 2085 void Object::VerifyApiCallResultType() { |
2087 #if ENABLE_EXTRA_CHECKS | 2086 #if ENABLE_EXTRA_CHECKS |
2088 if (!(IsSmi() || | 2087 if (!(IsSmi() || |
2089 IsString() || | 2088 IsString() || |
2090 IsSpecObject() || | 2089 IsSpecObject() || |
2091 IsHeapNumber() || | 2090 IsHeapNumber() || |
2092 IsUndefined() || | 2091 IsUndefined() || |
2093 IsTrue() || | 2092 IsTrue() || |
2094 IsFalse() || | 2093 IsFalse() || |
2095 IsNull())) { | 2094 IsNull())) { |
(...skipping 4641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6737 #undef READ_UINT32_FIELD | 6736 #undef READ_UINT32_FIELD |
6738 #undef WRITE_UINT32_FIELD | 6737 #undef WRITE_UINT32_FIELD |
6739 #undef READ_SHORT_FIELD | 6738 #undef READ_SHORT_FIELD |
6740 #undef WRITE_SHORT_FIELD | 6739 #undef WRITE_SHORT_FIELD |
6741 #undef READ_BYTE_FIELD | 6740 #undef READ_BYTE_FIELD |
6742 #undef WRITE_BYTE_FIELD | 6741 #undef WRITE_BYTE_FIELD |
6743 | 6742 |
6744 } } // namespace v8::internal | 6743 } } // namespace v8::internal |
6745 | 6744 |
6746 #endif // V8_OBJECTS_INL_H_ | 6745 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |