Skip to content

Commit 9303829

Browse files
committed
Add missing implementation od DateTime::NewObject
1 parent 8abddbe commit 9303829

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/CLR/CorLib/corlib_native.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ struct Library_corlib_native_System_DateTime
498498

499499
//--//
500500

501+
static CLR_INT64 *NewObject(CLR_RT_StackFrame &stack);
501502
static CLR_INT64 *GetValuePtr(CLR_RT_StackFrame &stack);
502503
static CLR_INT64 *GetValuePtr(CLR_RT_HeapBlock &ref);
503504

src/CLR/CorLib/corlib_native_System_DateTime.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,19 @@ HRESULT Library_corlib_native_System_DateTime::GetTodayAsTicks___STATIC__I8(CLR_
174174
NANOCLR_NOCLEANUP_NOLABEL();
175175
}
176176

177+
//--//
178+
179+
CLR_INT64 *Library_corlib_native_System_DateTime::NewObject(CLR_RT_StackFrame &stack)
180+
{
181+
NATIVE_PROFILE_CLR_CORE();
182+
CLR_RT_HeapBlock &ref = stack.PushValue();
183+
184+
ref.SetDataId(CLR_RT_HEAPBLOCK_RAW_ID(DATATYPE_DATETIME, 0, 1));
185+
ref.ClearData();
186+
187+
return (CLR_INT64 *)&ref.NumericByRef().s8;
188+
}
189+
177190
CLR_INT64 *Library_corlib_native_System_DateTime::GetValuePtr(CLR_RT_StackFrame &stack)
178191
{
179192
NATIVE_PROFILE_CLR_CORE();

0 commit comments

Comments
 (0)