| 
									
										
										
										
											2020-04-04 23:13:13 +02:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (c) 2020, Andreas Kling <kling@serenityos.org> | 
					
						
							|  |  |  |  * | 
					
						
							| 
									
										
										
										
											2021-04-22 01:24:48 -07:00
										 |  |  |  * SPDX-License-Identifier: BSD-2-Clause | 
					
						
							| 
									
										
										
										
											2020-04-04 23:13:13 +02:00
										 |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-17 18:55:53 +02:00
										 |  |  | #include <LibJS/Runtime/GlobalObject.h>
 | 
					
						
							| 
									
										
										
										
											2020-04-04 23:13:13 +02:00
										 |  |  | #include <LibJS/Runtime/NumberObject.h>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | namespace JS { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-04-17 18:55:53 +02:00
										 |  |  | NumberObject* NumberObject::create(GlobalObject& global_object, double value) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2020-06-20 15:40:48 +02:00
										 |  |  |     return global_object.heap().allocate<NumberObject>(global_object, value, *global_object.number_prototype()); | 
					
						
							| 
									
										
										
										
											2020-04-17 18:55:53 +02:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NumberObject::NumberObject(double value, Object& prototype) | 
					
						
							| 
									
										
										
										
											2020-06-23 17:21:53 +02:00
										 |  |  |     : Object(prototype) | 
					
						
							| 
									
										
										
										
											2020-04-18 10:27:57 +02:00
										 |  |  |     , m_value(value) | 
					
						
							| 
									
										
										
										
											2020-04-04 23:13:13 +02:00
										 |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | NumberObject::~NumberObject() | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | } |