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 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2547 PropertyAttributes JSObject::GetPropertyAttribute(String* key) { | 2547 PropertyAttributes JSObject::GetPropertyAttribute(String* key) { |
2548 return GetPropertyAttributeWithReceiver(this, key); | 2548 return GetPropertyAttributeWithReceiver(this, key); |
2549 } | 2549 } |
2550 | 2550 |
2551 | 2551 |
2552 bool JSObject::HasElement(uint32_t index) { | 2552 bool JSObject::HasElement(uint32_t index) { |
2553 return HasElementWithReceiver(this, index); | 2553 return HasElementWithReceiver(this, index); |
2554 } | 2554 } |
2555 | 2555 |
2556 | 2556 |
2557 Smi* JSObject::InterceptorPropertyLookupHint(String* name) { | |
2558 // TODO(antonm): do we want to do any shortcuts for global object? | |
Kasper Lund
2009/06/02 18:27:16
do -> Do
| |
2559 if (HasFastProperties()) { | |
2560 LookupResult lookup; | |
2561 LocalLookupRealNamedProperty(name, &lookup); | |
2562 if (lookup.IsValid()) { | |
2563 if (lookup.type() == FIELD && lookup.IsCacheable()) { | |
2564 return Smi::FromInt(lookup.GetFieldIndex()); | |
2565 } | |
2566 } else { | |
2567 return Smi::FromInt(kLookupInPrototype); | |
2568 } | |
2569 } | |
2570 | |
2571 return Smi::FromInt(kLookupInHolder); | |
2572 } | |
2573 | |
2574 | |
2557 bool AccessorInfo::all_can_read() { | 2575 bool AccessorInfo::all_can_read() { |
2558 return BooleanBit::get(flag(), kAllCanReadBit); | 2576 return BooleanBit::get(flag(), kAllCanReadBit); |
2559 } | 2577 } |
2560 | 2578 |
2561 | 2579 |
2562 void AccessorInfo::set_all_can_read(bool value) { | 2580 void AccessorInfo::set_all_can_read(bool value) { |
2563 set_flag(BooleanBit::set(flag(), kAllCanReadBit, value)); | 2581 set_flag(BooleanBit::set(flag(), kAllCanReadBit, value)); |
2564 } | 2582 } |
2565 | 2583 |
2566 | 2584 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2646 #undef WRITE_INT_FIELD | 2664 #undef WRITE_INT_FIELD |
2647 #undef READ_SHORT_FIELD | 2665 #undef READ_SHORT_FIELD |
2648 #undef WRITE_SHORT_FIELD | 2666 #undef WRITE_SHORT_FIELD |
2649 #undef READ_BYTE_FIELD | 2667 #undef READ_BYTE_FIELD |
2650 #undef WRITE_BYTE_FIELD | 2668 #undef WRITE_BYTE_FIELD |
2651 | 2669 |
2652 | 2670 |
2653 } } // namespace v8::internal | 2671 } } // namespace v8::internal |
2654 | 2672 |
2655 #endif // V8_OBJECTS_INL_H_ | 2673 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |