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 7926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7937 | 7937 |
| 7938 void set(AccessorComponent component, Object* value) { | 7938 void set(AccessorComponent component, Object* value) { |
| 7939 ASSERT(component == ACCESSOR_GETTER || component == ACCESSOR_SETTER); | 7939 ASSERT(component == ACCESSOR_GETTER || component == ACCESSOR_SETTER); |
| 7940 if (component == ACCESSOR_GETTER) { | 7940 if (component == ACCESSOR_GETTER) { |
| 7941 set_getter(value); | 7941 set_getter(value); |
| 7942 } else { | 7942 } else { |
| 7943 set_setter(value); | 7943 set_setter(value); |
| 7944 } | 7944 } |
| 7945 } | 7945 } |
| 7946 | 7946 |
| 7947 // Same as get, but returns undefined instead of the hole. | |
| 7948 Object* SafeGet(AccessorComponent component); | |
|
ulan
2012/03/07 09:59:34
Consider marking this function as inline.
| |
| 7949 | |
| 7947 bool ContainsAccessor() { | 7950 bool ContainsAccessor() { |
| 7948 return IsJSAccessor(getter()) || IsJSAccessor(setter()); | 7951 return IsJSAccessor(getter()) || IsJSAccessor(setter()); |
| 7949 } | 7952 } |
| 7950 | 7953 |
| 7951 #ifdef OBJECT_PRINT | 7954 #ifdef OBJECT_PRINT |
| 7952 void AccessorPairPrint(FILE* out = stdout); | 7955 void AccessorPairPrint(FILE* out = stdout); |
| 7953 #endif | 7956 #endif |
| 7954 #ifdef DEBUG | 7957 #ifdef DEBUG |
| 7955 void AccessorPairVerify(); | 7958 void AccessorPairVerify(); |
| 7956 #endif | 7959 #endif |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8461 } else { | 8464 } else { |
| 8462 value &= ~(1 << bit_position); | 8465 value &= ~(1 << bit_position); |
| 8463 } | 8466 } |
| 8464 return value; | 8467 return value; |
| 8465 } | 8468 } |
| 8466 }; | 8469 }; |
| 8467 | 8470 |
| 8468 } } // namespace v8::internal | 8471 } } // namespace v8::internal |
| 8469 | 8472 |
| 8470 #endif // V8_OBJECTS_H_ | 8473 #endif // V8_OBJECTS_H_ |
| OLD | NEW |