Chromium Code Reviews| 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 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2467 | 2467 |
| 2468 // Initialize or change the enum cache, | 2468 // Initialize or change the enum cache, |
| 2469 // using the supplied storage for the small "bridge". | 2469 // using the supplied storage for the small "bridge". |
| 2470 void SetEnumCache(FixedArray* bridge_storage, | 2470 void SetEnumCache(FixedArray* bridge_storage, |
| 2471 FixedArray* new_cache, | 2471 FixedArray* new_cache, |
| 2472 Object* new_index_cache); | 2472 Object* new_index_cache); |
| 2473 | 2473 |
| 2474 // Accessors for fetching instance descriptor at descriptor number. | 2474 // Accessors for fetching instance descriptor at descriptor number. |
| 2475 inline String* GetKey(int descriptor_number); | 2475 inline String* GetKey(int descriptor_number); |
| 2476 inline Object* GetValue(int descriptor_number); | 2476 inline Object* GetValue(int descriptor_number); |
| 2477 inline Object** GetValueSlot(int descriptor_number); | |
| 2477 inline PropertyDetails GetDetails(int descriptor_number); | 2478 inline PropertyDetails GetDetails(int descriptor_number); |
| 2478 | 2479 |
| 2479 inline Object* RawGetValue(int descriptor_number); | 2480 inline Object* RawGetValue(int descriptor_number); |
| 2480 inline PropertyDetails RawGetDetails(int descriptor_number); | 2481 inline PropertyDetails RawGetDetails(int descriptor_number); |
| 2481 | 2482 |
| 2482 inline PropertyType GetType(int descriptor_number); | 2483 inline PropertyType GetType(int descriptor_number); |
| 2483 inline int GetFieldIndex(int descriptor_number); | 2484 inline int GetFieldIndex(int descriptor_number); |
| 2484 inline JSFunction* GetConstantFunction(int descriptor_number); | 2485 inline JSFunction* GetConstantFunction(int descriptor_number); |
| 2485 inline Object* GetCallbacksObject(int descriptor_number); | 2486 inline Object* GetCallbacksObject(int descriptor_number); |
| 2486 inline AccessorDescriptor* GetCallbacks(int descriptor_number); | 2487 inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
| 2487 inline bool IsProperty(int descriptor_number); | 2488 inline bool IsProperty(int descriptor_number); |
| 2488 inline bool IsTransitionOnly(int descriptor_number); | 2489 inline bool IsTransitionOnly(int descriptor_number); |
| 2489 inline bool IsNullDescriptor(int descriptor_number); | 2490 inline bool IsNullDescriptor(int descriptor_number); |
| 2490 | 2491 |
| 2492 // WhitenessWitness is used to prove that a specific descriptor array is white | |
| 2493 // (unmarked), so potentially unique heap objects can be freely assigned | |
|
Michael Starzinger
2012/05/24 14:28:54
The reasoning is slightly off, I would replace it
Toon Verwaest
2012/05/25 12:27:26
Done.
| |
| 2494 // without potentially causing memory leaks. A witness is always | |
| 2495 // stack-allocated right after creating a descriptor array. By allocating a wi tness, | |
|
Michael Starzinger
2012/05/24 14:28:54
More than 80 characters.
Toon Verwaest
2012/05/25 12:27:26
Done.
| |
| 2496 // incremental marking is globally disabled. The witness is then passed along | |
| 2497 // wherever needed to statically prove that the descriptor array is known to | |
| 2498 // be white. | |
| 2491 class WhitenessWitness { | 2499 class WhitenessWitness { |
| 2492 public: | 2500 public: |
| 2493 inline explicit WhitenessWitness(DescriptorArray* array); | 2501 inline explicit WhitenessWitness(DescriptorArray* array); |
| 2494 inline ~WhitenessWitness(); | 2502 inline ~WhitenessWitness(); |
| 2495 | 2503 |
| 2496 private: | 2504 private: |
| 2497 IncrementalMarking* marking_; | 2505 IncrementalMarking* marking_; |
| 2498 }; | 2506 }; |
| 2499 | 2507 |
| 2500 // Accessor for complete descriptor. | 2508 // Accessor for complete descriptor. |
| (...skipping 6151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8652 } else { | 8660 } else { |
| 8653 value &= ~(1 << bit_position); | 8661 value &= ~(1 << bit_position); |
| 8654 } | 8662 } |
| 8655 return value; | 8663 return value; |
| 8656 } | 8664 } |
| 8657 }; | 8665 }; |
| 8658 | 8666 |
| 8659 } } // namespace v8::internal | 8667 } } // namespace v8::internal |
| 8660 | 8668 |
| 8661 #endif // V8_OBJECTS_H_ | 8669 #endif // V8_OBJECTS_H_ |
| OLD | NEW |