| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2331 return pattern; | 2331 return pattern; |
| 2332 } | 2332 } |
| 2333 | 2333 |
| 2334 | 2334 |
| 2335 Object* JSRegExp::DataAt(int index) { | 2335 Object* JSRegExp::DataAt(int index) { |
| 2336 ASSERT(TypeTag() != NOT_COMPILED); | 2336 ASSERT(TypeTag() != NOT_COMPILED); |
| 2337 return FixedArray::cast(data())->get(index); | 2337 return FixedArray::cast(data())->get(index); |
| 2338 } | 2338 } |
| 2339 | 2339 |
| 2340 | 2340 |
| 2341 void JSRegExp::SetDataAt(int index, Object* value) { |
| 2342 ASSERT(TypeTag() != NOT_COMPILED); |
| 2343 ASSERT(index >= kDataIndex); // Only implementation data can be set this way. |
| 2344 FixedArray::cast(data())->set(index, value); |
| 2345 } |
| 2346 |
| 2347 |
| 2341 bool JSObject::HasFastElements() { | 2348 bool JSObject::HasFastElements() { |
| 2342 return !elements()->IsDictionary(); | 2349 return !elements()->IsDictionary(); |
| 2343 } | 2350 } |
| 2344 | 2351 |
| 2345 | 2352 |
| 2346 bool JSObject::HasNamedInterceptor() { | 2353 bool JSObject::HasNamedInterceptor() { |
| 2347 return map()->has_named_interceptor(); | 2354 return map()->has_named_interceptor(); |
| 2348 } | 2355 } |
| 2349 | 2356 |
| 2350 | 2357 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2553 #undef WRITE_INT_FIELD | 2560 #undef WRITE_INT_FIELD |
| 2554 #undef READ_SHORT_FIELD | 2561 #undef READ_SHORT_FIELD |
| 2555 #undef WRITE_SHORT_FIELD | 2562 #undef WRITE_SHORT_FIELD |
| 2556 #undef READ_BYTE_FIELD | 2563 #undef READ_BYTE_FIELD |
| 2557 #undef WRITE_BYTE_FIELD | 2564 #undef WRITE_BYTE_FIELD |
| 2558 | 2565 |
| 2559 | 2566 |
| 2560 } } // namespace v8::internal | 2567 } } // namespace v8::internal |
| 2561 | 2568 |
| 2562 #endif // V8_OBJECTS_INL_H_ | 2569 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |