mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:32:44 +00:00 
			
		
		
		
	 b538e15548
			
		
	
	
		b538e15548
		
	
	
	
	
		
			
			This makes debugging wasm code a bit easier, as we now know what fails instead of just "too bad, something went wrong".
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			431 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			431 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibWasm/AbstractMachine/Configuration.h>
 | |
| 
 | |
| namespace Wasm {
 | |
| 
 | |
| struct Interpreter {
 | |
|     virtual ~Interpreter() = default;
 | |
|     virtual void interpret(Configuration&) = 0;
 | |
|     virtual bool did_trap() const = 0;
 | |
|     virtual String trap_reason() const = 0;
 | |
|     virtual void clear_trap() = 0;
 | |
| };
 | |
| 
 | |
| }
 |