mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-07-20 23:00:29 -04:00
1.add arraylist and ArkPrivate. 2.add special container in stub. 3.fix Switch
Signed-off-by: xliu <liuxin259@huawei.com> Change-Id: I4082326fa075bce0c5c7bf8e6873282086fe5d6e
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include "ecmascript/js_array.h"
|
||||
#include "ecmascript/js_array_iterator.h"
|
||||
#include "ecmascript/js_arraybuffer.h"
|
||||
#include "ecmascript/js_arraylist.h"
|
||||
#include "ecmascript/js_async_function.h"
|
||||
#include "ecmascript/js_collator.h"
|
||||
#include "ecmascript/js_dataview.h"
|
||||
@@ -254,6 +255,8 @@ CString JSHClass::DumpJSType(JSType type)
|
||||
return "EcmaModule";
|
||||
case JSType::CLASS_INFO_EXTRACTOR:
|
||||
return "ClassInfoExtractor";
|
||||
case JSType::JS_ARRAY_LIST:
|
||||
return "ArrayList";
|
||||
default: {
|
||||
CString ret = "unknown type ";
|
||||
return ret + static_cast<char>(type);
|
||||
@@ -597,6 +600,9 @@ static void DumpObject(JSThread *thread, TaggedObject *obj, std::ostream &os)
|
||||
case JSType::CLASS_INFO_EXTRACTOR:
|
||||
ClassInfoExtractor::Cast(obj)->Dump(thread, os);
|
||||
break;
|
||||
case JSType::JS_ARRAY_LIST:
|
||||
JSArrayList::Cast(obj)->Dump(thread, os);
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE();
|
||||
break;
|
||||
@@ -1088,6 +1094,12 @@ void JSArray::Dump(JSThread *thread, std::ostream &os) const
|
||||
JSObject::Dump(thread, os);
|
||||
}
|
||||
|
||||
void JSArrayList::Dump(JSThread *thread, std::ostream &os) const
|
||||
{
|
||||
os << " - length: " << std::dec << GetLength().GetArrayLength() << "\n";
|
||||
JSObject::Dump(thread, os);
|
||||
}
|
||||
|
||||
void JSArrayIterator::Dump(JSThread *thread, std::ostream &os) const
|
||||
{
|
||||
JSArray *array = JSArray::Cast(GetIteratedArray().GetTaggedObject());
|
||||
@@ -2139,6 +2151,9 @@ static void DumpObject(JSThread *thread, TaggedObject *obj,
|
||||
case JSType::ECMA_MODULE:
|
||||
EcmaModule::Cast(obj)->DumpForSnapshot(thread, vec);
|
||||
return;
|
||||
case JSType::JS_ARRAY_LIST:
|
||||
JSArrayList::Cast(obj)->DumpForSnapshot(thread, vec);
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -2486,6 +2501,12 @@ void JSArray::DumpForSnapshot([[maybe_unused]] JSThread *thread,
|
||||
JSObject::DumpForSnapshot(thread, vec);
|
||||
}
|
||||
|
||||
void JSArrayList::DumpForSnapshot([[maybe_unused]] JSThread *thread,
|
||||
std::vector<std::pair<CString, JSTaggedValue>> &vec) const
|
||||
{
|
||||
JSObject::DumpForSnapshot(thread, vec);
|
||||
}
|
||||
|
||||
void JSArrayIterator::DumpForSnapshot([[maybe_unused]] JSThread *thread,
|
||||
std::vector<std::pair<CString, JSTaggedValue>> &vec) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user