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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 return true; | 253 return true; |
254 } | 254 } |
255 | 255 |
256 Object* GetLazyValue() { | 256 Object* GetLazyValue() { |
257 switch (type()) { | 257 switch (type()) { |
258 case FIELD: | 258 case FIELD: |
259 return holder()->FastPropertyAt(GetFieldIndex()); | 259 return holder()->FastPropertyAt(GetFieldIndex()); |
260 case NORMAL: { | 260 case NORMAL: { |
261 Object* value; | 261 Object* value; |
262 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry()); | 262 value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry()); |
263 if (holder()->IsJSGlobalObject()) { | 263 if (holder()->IsGlobalObject()) { |
264 value = JSGlobalPropertyCell::cast(value)->value(); | 264 value = JSGlobalPropertyCell::cast(value)->value(); |
265 } | 265 } |
266 return value; | 266 return value; |
267 } | 267 } |
268 case CONSTANT_FUNCTION: | 268 case CONSTANT_FUNCTION: |
269 return GetConstantFunction(); | 269 return GetConstantFunction(); |
270 default: | 270 default: |
271 return Smi::FromInt(0); | 271 return Smi::FromInt(0); |
272 } | 272 } |
273 } | 273 } |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 | 406 |
407 // Append a descriptor to this stream. | 407 // Append a descriptor to this stream. |
408 void Write(Descriptor* desc); | 408 void Write(Descriptor* desc); |
409 // Read a descriptor from the reader and append it to this stream. | 409 // Read a descriptor from the reader and append it to this stream. |
410 void WriteFrom(DescriptorReader* reader); | 410 void WriteFrom(DescriptorReader* reader); |
411 }; | 411 }; |
412 | 412 |
413 } } // namespace v8::internal | 413 } } // namespace v8::internal |
414 | 414 |
415 #endif // V8_PROPERTY_H_ | 415 #endif // V8_PROPERTY_H_ |
OLD | NEW |