| 
									
										
										
										
											2021-10-24 13:30:49 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <LibJS/Bytecode/Executable.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace JS::Bytecode { | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | void Executable::dump() const | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2021-10-24 14:33:56 +02:00
										 |  |  |     dbgln("\033[33;1mJS::Bytecode::Executable\033[0m ({})", name); | 
					
						
							| 
									
										
										
										
											2021-10-24 13:30:49 +02:00
										 |  |  |     for (auto& block : basic_blocks) | 
					
						
							| 
									
										
										
										
											2023-03-06 17:16:25 +01:00
										 |  |  |         block->dump(*this); | 
					
						
							| 
									
										
										
										
											2021-10-24 13:30:49 +02:00
										 |  |  |     if (!string_table->is_empty()) { | 
					
						
							|  |  |  |         outln(); | 
					
						
							|  |  |  |         string_table->dump(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-10-24 15:34:30 +02:00
										 |  |  |     if (!identifier_table->is_empty()) { | 
					
						
							|  |  |  |         outln(); | 
					
						
							|  |  |  |         identifier_table->dump(); | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2021-10-24 13:30:49 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |