mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 03:42:44 +00:00 
			
		
		
		
	 a8ccc9580d
			
		
	
	
		a8ccc9580d
		
	
	
	
	
		
			
			Make sure this gets inlined as well, as it's used by the bytecode stream iterator and thus extremely hot.
		
			
				
	
	
		
			28 lines
		
	
	
	
		
			590 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
	
		
			590 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #include <LibJS/Bytecode/Instruction.h>
 | |
| #include <LibJS/Bytecode/Op.h>
 | |
| 
 | |
| namespace JS::Bytecode {
 | |
| 
 | |
| void Instruction::destroy(Instruction& instruction)
 | |
| {
 | |
| #define __BYTECODE_OP(op)                        \
 | |
|     case Type::op:                               \
 | |
|         static_cast<Op::op&>(instruction).~op(); \
 | |
|         return;
 | |
| 
 | |
|     switch (instruction.type()) {
 | |
|         ENUMERATE_BYTECODE_OPS(__BYTECODE_OP)
 | |
|     default:
 | |
|         VERIFY_NOT_REACHED();
 | |
|     }
 | |
| 
 | |
| #undef __BYTECODE_OP
 | |
| }
 | |
| 
 | |
| }
 |