OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 2196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2207 | 2207 |
2208 String* str = String::cast(js_value->value()); | 2208 String* str = String::cast(js_value->value()); |
2209 if (index >= static_cast<uint32_t>(str->length())) return false; | 2209 if (index >= static_cast<uint32_t>(str->length())) return false; |
2210 | 2210 |
2211 return true; | 2211 return true; |
2212 } | 2212 } |
2213 | 2213 |
2214 | 2214 |
2215 void Object::VerifyApiCallResultType() { | 2215 void Object::VerifyApiCallResultType() { |
2216 #if DEBUG | 2216 #if DEBUG |
2217 if (!(IsSmi() || IsString() || IsSymbol() || IsSpecObject() || | 2217 if (!(IsSmi() || |
2218 IsHeapNumber() || IsFloat32x4() || IsUndefined() || IsTrue() || | 2218 IsString() || |
2219 IsFalse() || IsNull())) { | 2219 IsSymbol() || |
| 2220 IsSpecObject() || |
| 2221 IsHeapNumber() || |
| 2222 IsUndefined() || |
| 2223 IsTrue() || |
| 2224 IsFalse() || |
| 2225 IsNull())) { |
2220 FATAL("API call returned invalid object"); | 2226 FATAL("API call returned invalid object"); |
2221 } | 2227 } |
2222 #endif // DEBUG | 2228 #endif // DEBUG |
2223 } | 2229 } |
2224 | 2230 |
2225 | 2231 |
2226 Object* FixedArray::get(int index) const { | 2232 Object* FixedArray::get(int index) const { |
2227 SLOW_DCHECK(index >= 0 && index < this->length()); | 2233 SLOW_DCHECK(index >= 0 && index < this->length()); |
2228 return READ_FIELD(this, kHeaderSize + index * kPointerSize); | 2234 return READ_FIELD(this, kHeaderSize + index * kPointerSize); |
2229 } | 2235 } |
(...skipping 5059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7289 #undef READ_SHORT_FIELD | 7295 #undef READ_SHORT_FIELD |
7290 #undef WRITE_SHORT_FIELD | 7296 #undef WRITE_SHORT_FIELD |
7291 #undef READ_BYTE_FIELD | 7297 #undef READ_BYTE_FIELD |
7292 #undef WRITE_BYTE_FIELD | 7298 #undef WRITE_BYTE_FIELD |
7293 #undef NOBARRIER_READ_BYTE_FIELD | 7299 #undef NOBARRIER_READ_BYTE_FIELD |
7294 #undef NOBARRIER_WRITE_BYTE_FIELD | 7300 #undef NOBARRIER_WRITE_BYTE_FIELD |
7295 | 7301 |
7296 } } // namespace v8::internal | 7302 } } // namespace v8::internal |
7297 | 7303 |
7298 #endif // V8_OBJECTS_INL_H_ | 7304 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |