| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 bool Object::IsSymbolTable() { | 557 bool Object::IsSymbolTable() { |
| 558 return IsHashTable() && this == Heap::raw_unchecked_symbol_table(); | 558 return IsHashTable() && this == Heap::raw_unchecked_symbol_table(); |
| 559 } | 559 } |
| 560 | 560 |
| 561 | 561 |
| 562 bool Object::IsCompilationCacheTable() { | 562 bool Object::IsCompilationCacheTable() { |
| 563 return IsHashTable(); | 563 return IsHashTable(); |
| 564 } | 564 } |
| 565 | 565 |
| 566 | 566 |
| 567 bool Object::IsCodeCacheHashTable() { |
| 568 return IsHashTable(); |
| 569 } |
| 570 |
| 571 |
| 567 bool Object::IsMapCache() { | 572 bool Object::IsMapCache() { |
| 568 return IsHashTable(); | 573 return IsHashTable(); |
| 569 } | 574 } |
| 570 | 575 |
| 571 | 576 |
| 572 bool Object::IsPrimitive() { | 577 bool Object::IsPrimitive() { |
| 573 return IsOddball() || IsNumber() || IsString(); | 578 return IsOddball() || IsNumber() || IsString(); |
| 574 } | 579 } |
| 575 | 580 |
| 576 | 581 |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1561 | 1566 |
| 1562 | 1567 |
| 1563 // ------------------------------------ | 1568 // ------------------------------------ |
| 1564 // Cast operations | 1569 // Cast operations |
| 1565 | 1570 |
| 1566 | 1571 |
| 1567 CAST_ACCESSOR(FixedArray) | 1572 CAST_ACCESSOR(FixedArray) |
| 1568 CAST_ACCESSOR(DescriptorArray) | 1573 CAST_ACCESSOR(DescriptorArray) |
| 1569 CAST_ACCESSOR(SymbolTable) | 1574 CAST_ACCESSOR(SymbolTable) |
| 1570 CAST_ACCESSOR(CompilationCacheTable) | 1575 CAST_ACCESSOR(CompilationCacheTable) |
| 1576 CAST_ACCESSOR(CodeCacheHashTable) |
| 1571 CAST_ACCESSOR(MapCache) | 1577 CAST_ACCESSOR(MapCache) |
| 1572 CAST_ACCESSOR(String) | 1578 CAST_ACCESSOR(String) |
| 1573 CAST_ACCESSOR(SeqString) | 1579 CAST_ACCESSOR(SeqString) |
| 1574 CAST_ACCESSOR(SeqAsciiString) | 1580 CAST_ACCESSOR(SeqAsciiString) |
| 1575 CAST_ACCESSOR(SeqTwoByteString) | 1581 CAST_ACCESSOR(SeqTwoByteString) |
| 1576 CAST_ACCESSOR(ConsString) | 1582 CAST_ACCESSOR(ConsString) |
| 1577 CAST_ACCESSOR(ExternalString) | 1583 CAST_ACCESSOR(ExternalString) |
| 1578 CAST_ACCESSOR(ExternalAsciiString) | 1584 CAST_ACCESSOR(ExternalAsciiString) |
| 1579 CAST_ACCESSOR(ExternalTwoByteString) | 1585 CAST_ACCESSOR(ExternalTwoByteString) |
| 1580 CAST_ACCESSOR(JSObject) | 1586 CAST_ACCESSOR(JSObject) |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2251 | 2257 |
| 2252 void Map::set_prototype(Object* value, WriteBarrierMode mode) { | 2258 void Map::set_prototype(Object* value, WriteBarrierMode mode) { |
| 2253 ASSERT(value->IsNull() || value->IsJSObject()); | 2259 ASSERT(value->IsNull() || value->IsJSObject()); |
| 2254 WRITE_FIELD(this, kPrototypeOffset, value); | 2260 WRITE_FIELD(this, kPrototypeOffset, value); |
| 2255 CONDITIONAL_WRITE_BARRIER(this, kPrototypeOffset, mode); | 2261 CONDITIONAL_WRITE_BARRIER(this, kPrototypeOffset, mode); |
| 2256 } | 2262 } |
| 2257 | 2263 |
| 2258 | 2264 |
| 2259 ACCESSORS(Map, instance_descriptors, DescriptorArray, | 2265 ACCESSORS(Map, instance_descriptors, DescriptorArray, |
| 2260 kInstanceDescriptorsOffset) | 2266 kInstanceDescriptorsOffset) |
| 2261 ACCESSORS(Map, code_cache, FixedArray, kCodeCacheOffset) | 2267 ACCESSORS(Map, code_cache, Object, kCodeCacheOffset) |
| 2262 ACCESSORS(Map, constructor, Object, kConstructorOffset) | 2268 ACCESSORS(Map, constructor, Object, kConstructorOffset) |
| 2263 | 2269 |
| 2264 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) | 2270 ACCESSORS(JSFunction, shared, SharedFunctionInfo, kSharedFunctionInfoOffset) |
| 2265 ACCESSORS(JSFunction, literals, FixedArray, kLiteralsOffset) | 2271 ACCESSORS(JSFunction, literals, FixedArray, kLiteralsOffset) |
| 2266 | 2272 |
| 2267 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) | 2273 ACCESSORS(GlobalObject, builtins, JSBuiltinsObject, kBuiltinsOffset) |
| 2268 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) | 2274 ACCESSORS(GlobalObject, global_context, Context, kGlobalContextOffset) |
| 2269 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) | 2275 ACCESSORS(GlobalObject, global_receiver, JSObject, kGlobalReceiverOffset) |
| 2270 | 2276 |
| 2271 ACCESSORS(JSGlobalProxy, context, Object, kContextOffset) | 2277 ACCESSORS(JSGlobalProxy, context, Object, kContextOffset) |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2389 kStartPositionAndTypeOffset) | 2395 kStartPositionAndTypeOffset) |
| 2390 INT_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) | 2396 INT_ACCESSORS(SharedFunctionInfo, end_position, kEndPositionOffset) |
| 2391 INT_ACCESSORS(SharedFunctionInfo, function_token_position, | 2397 INT_ACCESSORS(SharedFunctionInfo, function_token_position, |
| 2392 kFunctionTokenPositionOffset) | 2398 kFunctionTokenPositionOffset) |
| 2393 INT_ACCESSORS(SharedFunctionInfo, compiler_hints, | 2399 INT_ACCESSORS(SharedFunctionInfo, compiler_hints, |
| 2394 kCompilerHintsOffset) | 2400 kCompilerHintsOffset) |
| 2395 INT_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, | 2401 INT_ACCESSORS(SharedFunctionInfo, this_property_assignments_count, |
| 2396 kThisPropertyAssignmentsCountOffset) | 2402 kThisPropertyAssignmentsCountOffset) |
| 2397 | 2403 |
| 2398 | 2404 |
| 2405 ACCESSORS(CodeCache, default_cache, FixedArray, kDefaultCacheOffset) |
| 2406 ACCESSORS(CodeCache, normal_type_cache, Object, kNormalTypeCacheOffset) |
| 2407 |
| 2399 bool Script::HasValidSource() { | 2408 bool Script::HasValidSource() { |
| 2400 Object* src = this->source(); | 2409 Object* src = this->source(); |
| 2401 if (!src->IsString()) return true; | 2410 if (!src->IsString()) return true; |
| 2402 String* src_str = String::cast(src); | 2411 String* src_str = String::cast(src); |
| 2403 if (!StringShape(src_str).IsExternal()) return true; | 2412 if (!StringShape(src_str).IsExternal()) return true; |
| 2404 if (src_str->IsAsciiRepresentation()) { | 2413 if (src_str->IsAsciiRepresentation()) { |
| 2405 return ExternalAsciiString::cast(src)->resource() != NULL; | 2414 return ExternalAsciiString::cast(src)->resource() != NULL; |
| 2406 } else if (src_str->IsTwoByteRepresentation()) { | 2415 } else if (src_str->IsTwoByteRepresentation()) { |
| 2407 return ExternalTwoByteString::cast(src)->resource() != NULL; | 2416 return ExternalTwoByteString::cast(src)->resource() != NULL; |
| 2408 } | 2417 } |
| (...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3053 #undef WRITE_INT_FIELD | 3062 #undef WRITE_INT_FIELD |
| 3054 #undef READ_SHORT_FIELD | 3063 #undef READ_SHORT_FIELD |
| 3055 #undef WRITE_SHORT_FIELD | 3064 #undef WRITE_SHORT_FIELD |
| 3056 #undef READ_BYTE_FIELD | 3065 #undef READ_BYTE_FIELD |
| 3057 #undef WRITE_BYTE_FIELD | 3066 #undef WRITE_BYTE_FIELD |
| 3058 | 3067 |
| 3059 | 3068 |
| 3060 } } // namespace v8::internal | 3069 } } // namespace v8::internal |
| 3061 | 3070 |
| 3062 #endif // V8_OBJECTS_INL_H_ | 3071 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |