Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 204 // STRING_TYPE (if it is not a symbol). | 204 // STRING_TYPE (if it is not a symbol). |
| 205 // | 205 // |
| 206 // NOTE: The following things are some that depend on the string types having | 206 // NOTE: The following things are some that depend on the string types having |
| 207 // instance_types that are less than those of all other types: | 207 // instance_types that are less than those of all other types: |
| 208 // HeapObject::Size, HeapObject::IterateBody, the typeof operator, and | 208 // HeapObject::Size, HeapObject::IterateBody, the typeof operator, and |
| 209 // Object::IsString. | 209 // Object::IsString. |
| 210 // | 210 // |
| 211 // NOTE: Everything following JS_VALUE_TYPE is considered a | 211 // NOTE: Everything following JS_VALUE_TYPE is considered a |
| 212 // JSObject for GC purposes. The first four entries here have typeof | 212 // JSObject for GC purposes. The first four entries here have typeof |
| 213 // 'object', whereas JS_FUNCTION_TYPE has typeof 'function'. | 213 // 'object', whereas JS_FUNCTION_TYPE has typeof 'function'. |
| 214 #define INSTANCE_TYPE_LIST(V) \ | 214 #define INSTANCE_TYPE_LIST_ALL(V) \ |
| 215 V(SHORT_SYMBOL_TYPE) \ | 215 V(SHORT_SYMBOL_TYPE) \ |
| 216 V(MEDIUM_SYMBOL_TYPE) \ | 216 V(MEDIUM_SYMBOL_TYPE) \ |
| 217 V(LONG_SYMBOL_TYPE) \ | 217 V(LONG_SYMBOL_TYPE) \ |
| 218 V(SHORT_ASCII_SYMBOL_TYPE) \ | 218 V(SHORT_ASCII_SYMBOL_TYPE) \ |
| 219 V(MEDIUM_ASCII_SYMBOL_TYPE) \ | 219 V(MEDIUM_ASCII_SYMBOL_TYPE) \ |
| 220 V(LONG_ASCII_SYMBOL_TYPE) \ | 220 V(LONG_ASCII_SYMBOL_TYPE) \ |
| 221 V(SHORT_CONS_SYMBOL_TYPE) \ | 221 V(SHORT_CONS_SYMBOL_TYPE) \ |
| 222 V(MEDIUM_CONS_SYMBOL_TYPE) \ | 222 V(MEDIUM_CONS_SYMBOL_TYPE) \ |
| 223 V(LONG_CONS_SYMBOL_TYPE) \ | 223 V(LONG_CONS_SYMBOL_TYPE) \ |
| 224 V(SHORT_CONS_ASCII_SYMBOL_TYPE) \ | 224 V(SHORT_CONS_ASCII_SYMBOL_TYPE) \ |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 \ | 275 \ |
| 276 V(ACCESSOR_INFO_TYPE) \ | 276 V(ACCESSOR_INFO_TYPE) \ |
| 277 V(ACCESS_CHECK_INFO_TYPE) \ | 277 V(ACCESS_CHECK_INFO_TYPE) \ |
| 278 V(INTERCEPTOR_INFO_TYPE) \ | 278 V(INTERCEPTOR_INFO_TYPE) \ |
| 279 V(SHARED_FUNCTION_INFO_TYPE) \ | 279 V(SHARED_FUNCTION_INFO_TYPE) \ |
| 280 V(CALL_HANDLER_INFO_TYPE) \ | 280 V(CALL_HANDLER_INFO_TYPE) \ |
| 281 V(FUNCTION_TEMPLATE_INFO_TYPE) \ | 281 V(FUNCTION_TEMPLATE_INFO_TYPE) \ |
| 282 V(OBJECT_TEMPLATE_INFO_TYPE) \ | 282 V(OBJECT_TEMPLATE_INFO_TYPE) \ |
| 283 V(SIGNATURE_INFO_TYPE) \ | 283 V(SIGNATURE_INFO_TYPE) \ |
| 284 V(TYPE_SWITCH_INFO_TYPE) \ | 284 V(TYPE_SWITCH_INFO_TYPE) \ |
| 285 V(DEBUG_INFO_TYPE) \ | |
| 286 V(BREAK_POINT_INFO_TYPE) \ | |
| 287 V(SCRIPT_TYPE) \ | 285 V(SCRIPT_TYPE) \ |
| 288 \ | 286 \ |
| 289 V(JS_VALUE_TYPE) \ | 287 V(JS_VALUE_TYPE) \ |
| 290 V(JS_OBJECT_TYPE) \ | 288 V(JS_OBJECT_TYPE) \ |
| 291 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ | 289 V(JS_CONTEXT_EXTENSION_OBJECT_TYPE) \ |
| 292 V(JS_GLOBAL_OBJECT_TYPE) \ | 290 V(JS_GLOBAL_OBJECT_TYPE) \ |
| 293 V(JS_BUILTINS_OBJECT_TYPE) \ | 291 V(JS_BUILTINS_OBJECT_TYPE) \ |
| 294 V(JS_GLOBAL_PROXY_TYPE) \ | 292 V(JS_GLOBAL_PROXY_TYPE) \ |
| 295 V(JS_ARRAY_TYPE) \ | 293 V(JS_ARRAY_TYPE) \ |
| 296 V(JS_REGEXP_TYPE) \ | 294 V(JS_REGEXP_TYPE) \ |
| 297 \ | 295 \ |
| 298 V(JS_FUNCTION_TYPE) \ | 296 V(JS_FUNCTION_TYPE) \ |
| 299 | 297 |
| 298 #ifdef ENABLE_DEBUGGER_SUPPORT | |
| 299 #define INSTANCE_TYPE_LIST_DEBUGGER(V) \ | |
| 300 V(DEBUG_INFO_TYPE) \ | |
| 301 V(BREAK_POINT_INFO_TYPE) | |
| 302 #else | |
| 303 #define INSTANCE_TYPE_LIST_DEBUGGER(V) | |
| 304 #endif | |
| 305 | |
| 306 #define INSTANCE_TYPE_LIST(V) \ | |
| 307 INSTANCE_TYPE_LIST_ALL(V) \ | |
| 308 INSTANCE_TYPE_LIST_DEBUGGER(V) | |
|
Erik Corry
2009/09/29 09:01:16
I don't think you can do this. The comments indic
Søren Thygesen Gjesse
2009/09/29 09:20:51
The ordering refers to the actual enum InstanceTyp
| |
| 300 | 309 |
| 301 | 310 |
| 302 // Since string types are not consecutive, this macro is used to | 311 // Since string types are not consecutive, this macro is used to |
| 303 // iterate over them. | 312 // iterate over them. |
| 304 #define STRING_TYPE_LIST(V) \ | 313 #define STRING_TYPE_LIST(V) \ |
| 305 V(SHORT_SYMBOL_TYPE, \ | 314 V(SHORT_SYMBOL_TYPE, \ |
| 306 SeqTwoByteString::kAlignedSize, \ | 315 SeqTwoByteString::kAlignedSize, \ |
| 307 short_symbol, \ | 316 short_symbol, \ |
| 308 ShortSymbol) \ | 317 ShortSymbol) \ |
| 309 V(MEDIUM_SYMBOL_TYPE, \ | 318 V(MEDIUM_SYMBOL_TYPE, \ |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 666 | 675 |
| 667 ACCESSOR_INFO_TYPE, | 676 ACCESSOR_INFO_TYPE, |
| 668 ACCESS_CHECK_INFO_TYPE, | 677 ACCESS_CHECK_INFO_TYPE, |
| 669 INTERCEPTOR_INFO_TYPE, | 678 INTERCEPTOR_INFO_TYPE, |
| 670 SHARED_FUNCTION_INFO_TYPE, | 679 SHARED_FUNCTION_INFO_TYPE, |
| 671 CALL_HANDLER_INFO_TYPE, | 680 CALL_HANDLER_INFO_TYPE, |
| 672 FUNCTION_TEMPLATE_INFO_TYPE, | 681 FUNCTION_TEMPLATE_INFO_TYPE, |
| 673 OBJECT_TEMPLATE_INFO_TYPE, | 682 OBJECT_TEMPLATE_INFO_TYPE, |
| 674 SIGNATURE_INFO_TYPE, | 683 SIGNATURE_INFO_TYPE, |
| 675 TYPE_SWITCH_INFO_TYPE, | 684 TYPE_SWITCH_INFO_TYPE, |
| 685 #ifdef ENABLE_DEBUGGER_SUPPORT | |
| 676 DEBUG_INFO_TYPE, | 686 DEBUG_INFO_TYPE, |
| 677 BREAK_POINT_INFO_TYPE, | 687 BREAK_POINT_INFO_TYPE, |
| 688 #endif | |
| 678 SCRIPT_TYPE, | 689 SCRIPT_TYPE, |
| 679 | 690 |
| 680 JS_VALUE_TYPE, | 691 JS_VALUE_TYPE, |
| 681 JS_OBJECT_TYPE, | 692 JS_OBJECT_TYPE, |
| 682 JS_CONTEXT_EXTENSION_OBJECT_TYPE, | 693 JS_CONTEXT_EXTENSION_OBJECT_TYPE, |
| 683 JS_GLOBAL_OBJECT_TYPE, | 694 JS_GLOBAL_OBJECT_TYPE, |
| 684 JS_BUILTINS_OBJECT_TYPE, | 695 JS_BUILTINS_OBJECT_TYPE, |
| 685 JS_GLOBAL_PROXY_TYPE, | 696 JS_GLOBAL_PROXY_TYPE, |
| 686 JS_ARRAY_TYPE, | 697 JS_ARRAY_TYPE, |
| 687 JS_REGEXP_TYPE, | 698 JS_REGEXP_TYPE, |
| (...skipping 4159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4847 } else { | 4858 } else { |
| 4848 value &= ~(1 << bit_position); | 4859 value &= ~(1 << bit_position); |
| 4849 } | 4860 } |
| 4850 return value; | 4861 return value; |
| 4851 } | 4862 } |
| 4852 }; | 4863 }; |
| 4853 | 4864 |
| 4854 } } // namespace v8::internal | 4865 } } // namespace v8::internal |
| 4855 | 4866 |
| 4856 #endif // V8_OBJECTS_H_ | 4867 #endif // V8_OBJECTS_H_ |
| OLD | NEW |