mirror of
				https://github.com/LadybirdBrowser/ladybird.git
				synced 2025-11-04 07:10:57 +00:00 
			
		
		
		
	This is a specialized string table for storing identifiers only. Identifiers are always FlyStrings, which makes many common operations faster by allowing O(1) comparison.
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			534 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			534 B
		
	
	
	
		
			C++
		
	
	
	
	
	
/*
 | 
						|
 * 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
 | 
						|
{
 | 
						|
    dbgln("\033[33;1mJS::Bytecode::Executable\033[0m ({})", name);
 | 
						|
    for (auto& block : basic_blocks)
 | 
						|
        block.dump(*this);
 | 
						|
    if (!string_table->is_empty()) {
 | 
						|
        outln();
 | 
						|
        string_table->dump();
 | 
						|
    }
 | 
						|
    if (!identifier_table->is_empty()) {
 | 
						|
        outln();
 | 
						|
        identifier_table->dump();
 | 
						|
    }
 | 
						|
}
 | 
						|
 | 
						|
}
 |