OLD | NEW |
1 // Copyright 2006-2008 Google Inc. All Rights Reserved. | 1 // Copyright 2006-2008 Google Inc. 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 bool Object::IsDictionary() { | 307 bool Object::IsDictionary() { |
308 return IsHashTable() && this != Heap::symbol_table(); | 308 return IsHashTable() && this != Heap::symbol_table(); |
309 } | 309 } |
310 | 310 |
311 | 311 |
312 bool Object::IsSymbolTable() { | 312 bool Object::IsSymbolTable() { |
313 return IsHashTable() && this == Heap::symbol_table(); | 313 return IsHashTable() && this == Heap::symbol_table(); |
314 } | 314 } |
315 | 315 |
316 | 316 |
| 317 bool Object::IsEvalCache() { |
| 318 return IsHashTable() && |
| 319 (this == Heap::eval_cache_global() || |
| 320 this == Heap::eval_cache_non_global()); |
| 321 } |
| 322 |
| 323 |
317 bool Object::IsPrimitive() { | 324 bool Object::IsPrimitive() { |
318 return IsOddball() || IsNumber() || IsString(); | 325 return IsOddball() || IsNumber() || IsString(); |
319 } | 326 } |
320 | 327 |
321 | 328 |
322 bool Object::IsGlobalObject() { | 329 bool Object::IsGlobalObject() { |
323 return IsHeapObject() && | 330 return IsHeapObject() && |
324 ((HeapObject::cast(this)->map()->instance_type() == | 331 ((HeapObject::cast(this)->map()->instance_type() == |
325 JS_GLOBAL_OBJECT_TYPE) || | 332 JS_GLOBAL_OBJECT_TYPE) || |
326 (HeapObject::cast(this)->map()->instance_type() == | 333 (HeapObject::cast(this)->map()->instance_type() == |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1082 | 1089 |
1083 | 1090 |
1084 // ------------------------------------ | 1091 // ------------------------------------ |
1085 // Cast operations | 1092 // Cast operations |
1086 | 1093 |
1087 | 1094 |
1088 CAST_ACCESSOR(FixedArray) | 1095 CAST_ACCESSOR(FixedArray) |
1089 CAST_ACCESSOR(DescriptorArray) | 1096 CAST_ACCESSOR(DescriptorArray) |
1090 CAST_ACCESSOR(Dictionary) | 1097 CAST_ACCESSOR(Dictionary) |
1091 CAST_ACCESSOR(SymbolTable) | 1098 CAST_ACCESSOR(SymbolTable) |
| 1099 CAST_ACCESSOR(EvalCache) |
1092 CAST_ACCESSOR(String) | 1100 CAST_ACCESSOR(String) |
1093 CAST_ACCESSOR(SeqString) | 1101 CAST_ACCESSOR(SeqString) |
1094 CAST_ACCESSOR(AsciiString) | 1102 CAST_ACCESSOR(AsciiString) |
1095 CAST_ACCESSOR(TwoByteString) | 1103 CAST_ACCESSOR(TwoByteString) |
1096 CAST_ACCESSOR(ConsString) | 1104 CAST_ACCESSOR(ConsString) |
1097 CAST_ACCESSOR(SlicedString) | 1105 CAST_ACCESSOR(SlicedString) |
1098 CAST_ACCESSOR(ExternalString) | 1106 CAST_ACCESSOR(ExternalString) |
1099 CAST_ACCESSOR(ExternalAsciiString) | 1107 CAST_ACCESSOR(ExternalAsciiString) |
1100 CAST_ACCESSOR(ExternalTwoByteString) | 1108 CAST_ACCESSOR(ExternalTwoByteString) |
1101 CAST_ACCESSOR(JSObject) | 1109 CAST_ACCESSOR(JSObject) |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2113 #undef WRITE_INT_FIELD | 2121 #undef WRITE_INT_FIELD |
2114 #undef READ_SHORT_FIELD | 2122 #undef READ_SHORT_FIELD |
2115 #undef WRITE_SHORT_FIELD | 2123 #undef WRITE_SHORT_FIELD |
2116 #undef READ_BYTE_FIELD | 2124 #undef READ_BYTE_FIELD |
2117 #undef WRITE_BYTE_FIELD | 2125 #undef WRITE_BYTE_FIELD |
2118 | 2126 |
2119 | 2127 |
2120 } } // namespace v8::internal | 2128 } } // namespace v8::internal |
2121 | 2129 |
2122 #endif // V8_OBJECTS_INL_H_ | 2130 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |