OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 case JS_BUILTINS_OBJECT_TYPE: | 141 case JS_BUILTINS_OBJECT_TYPE: |
142 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(out); | 142 JSBuiltinsObject::cast(this)->JSBuiltinsObjectPrint(out); |
143 break; | 143 break; |
144 case JS_VALUE_TYPE: | 144 case JS_VALUE_TYPE: |
145 PrintF(out, "Value wrapper around:"); | 145 PrintF(out, "Value wrapper around:"); |
146 JSValue::cast(this)->value()->Print(out); | 146 JSValue::cast(this)->value()->Print(out); |
147 break; | 147 break; |
148 case CODE_TYPE: | 148 case CODE_TYPE: |
149 Code::cast(this)->CodePrint(out); | 149 Code::cast(this)->CodePrint(out); |
150 break; | 150 break; |
| 151 case JS_PROXY_TYPE: |
| 152 JSProxy::cast(this)->JSProxyPrint(out); |
| 153 break; |
151 case PROXY_TYPE: | 154 case PROXY_TYPE: |
152 Proxy::cast(this)->ProxyPrint(out); | 155 Proxy::cast(this)->ProxyPrint(out); |
153 break; | 156 break; |
154 case SHARED_FUNCTION_INFO_TYPE: | 157 case SHARED_FUNCTION_INFO_TYPE: |
155 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); | 158 SharedFunctionInfo::cast(this)->SharedFunctionInfoPrint(out); |
156 break; | 159 break; |
157 case JS_MESSAGE_OBJECT_TYPE: | 160 case JS_MESSAGE_OBJECT_TYPE: |
158 JSMessageObject::cast(this)->JSMessageObjectPrint(out); | 161 JSMessageObject::cast(this)->JSMessageObjectPrint(out); |
159 break; | 162 break; |
160 case JS_GLOBAL_PROPERTY_CELL_TYPE: | 163 case JS_GLOBAL_PROPERTY_CELL_TYPE: |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; | 404 case EXTERNAL_DOUBLE_ARRAY_TYPE: return "EXTERNAL_DOUBLE_ARRAY"; |
402 case FILLER_TYPE: return "FILLER"; | 405 case FILLER_TYPE: return "FILLER"; |
403 case JS_OBJECT_TYPE: return "JS_OBJECT"; | 406 case JS_OBJECT_TYPE: return "JS_OBJECT"; |
404 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; | 407 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: return "JS_CONTEXT_EXTENSION_OBJECT"; |
405 case ODDBALL_TYPE: return "ODDBALL"; | 408 case ODDBALL_TYPE: return "ODDBALL"; |
406 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; | 409 case JS_GLOBAL_PROPERTY_CELL_TYPE: return "JS_GLOBAL_PROPERTY_CELL"; |
407 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; | 410 case SHARED_FUNCTION_INFO_TYPE: return "SHARED_FUNCTION_INFO"; |
408 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; | 411 case JS_FUNCTION_TYPE: return "JS_FUNCTION"; |
409 case CODE_TYPE: return "CODE"; | 412 case CODE_TYPE: return "CODE"; |
410 case JS_ARRAY_TYPE: return "JS_ARRAY"; | 413 case JS_ARRAY_TYPE: return "JS_ARRAY"; |
| 414 case JS_PROXY_TYPE: return "JS_PROXY"; |
411 case JS_REGEXP_TYPE: return "JS_REGEXP"; | 415 case JS_REGEXP_TYPE: return "JS_REGEXP"; |
412 case JS_VALUE_TYPE: return "JS_VALUE"; | 416 case JS_VALUE_TYPE: return "JS_VALUE"; |
413 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; | 417 case JS_GLOBAL_OBJECT_TYPE: return "JS_GLOBAL_OBJECT"; |
414 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; | 418 case JS_BUILTINS_OBJECT_TYPE: return "JS_BUILTINS_OBJECT"; |
415 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; | 419 case JS_GLOBAL_PROXY_TYPE: return "JS_GLOBAL_PROXY"; |
416 case PROXY_TYPE: return "PROXY"; | 420 case PROXY_TYPE: return "PROXY"; |
417 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; | 421 case JS_MESSAGE_OBJECT_TYPE: return "JS_MESSAGE_OBJECT_TYPE"; |
418 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; | 422 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: return #NAME; |
419 STRUCT_LIST(MAKE_STRUCT_CASE) | 423 STRUCT_LIST(MAKE_STRUCT_CASE) |
420 #undef MAKE_STRUCT_CASE | 424 #undef MAKE_STRUCT_CASE |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 PrintF(out, "%c", Get(i)); | 527 PrintF(out, "%c", Get(i)); |
524 } | 528 } |
525 if (len != length()) { | 529 if (len != length()) { |
526 PrintF(out, "%s", truncated_epilogue); | 530 PrintF(out, "%s", truncated_epilogue); |
527 } | 531 } |
528 | 532 |
529 if (!StringShape(this).IsSymbol()) PrintF(out, "\""); | 533 if (!StringShape(this).IsSymbol()) PrintF(out, "\""); |
530 } | 534 } |
531 | 535 |
532 | 536 |
| 537 void JSProxy::JSProxyPrint(FILE* out) { |
| 538 HeapObject::PrintHeader(out, "JSProxy"); |
| 539 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
| 540 PrintF(out, " - handler = "); |
| 541 handler()->Print(out); |
| 542 PrintF(out, "\n"); |
| 543 } |
| 544 |
| 545 |
533 void JSFunction::JSFunctionPrint(FILE* out) { | 546 void JSFunction::JSFunctionPrint(FILE* out) { |
534 HeapObject::PrintHeader(out, "Function"); | 547 HeapObject::PrintHeader(out, "Function"); |
535 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); | 548 PrintF(out, " - map = 0x%p\n", reinterpret_cast<void*>(map())); |
536 PrintF(out, " - initial_map = "); | 549 PrintF(out, " - initial_map = "); |
537 if (has_initial_map()) { | 550 if (has_initial_map()) { |
538 initial_map()->ShortPrint(out); | 551 initial_map()->ShortPrint(out); |
539 } | 552 } |
540 PrintF(out, "\n - shared_info = "); | 553 PrintF(out, "\n - shared_info = "); |
541 shared()->ShortPrint(out); | 554 shared()->ShortPrint(out); |
542 PrintF(out, "\n - name = "); | 555 PrintF(out, "\n - name = "); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 desc.Print(out); | 820 desc.Print(out); |
808 } | 821 } |
809 PrintF(out, "\n"); | 822 PrintF(out, "\n"); |
810 } | 823 } |
811 | 824 |
812 | 825 |
813 #endif // OBJECT_PRINT | 826 #endif // OBJECT_PRINT |
814 | 827 |
815 | 828 |
816 } } // namespace v8::internal | 829 } } // namespace v8::internal |
OLD | NEW |