mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
!6751 close map get optimize
Merge pull request !6751 from wpy111/master
This commit is contained in:
commit
288637449c
@ -1215,8 +1215,7 @@ void Builtins::InitializeSet(const JSHandle<GlobalEnv> &env, JSHandle<JSTaggedVa
|
||||
factory_->NewEcmaHClass(JSSet::SIZE, JSType::JS_SET, setFuncPrototypeValue);
|
||||
// Set() = new Function()
|
||||
JSHandle<JSTaggedValue> setFunction(
|
||||
NewBuiltinConstructor(env, setFuncPrototype, BuiltinsSet::SetConstructor, "Set", FunctionLength::ZERO,
|
||||
BUILTINS_STUB_ID(SetConstructor)));
|
||||
NewBuiltinConstructor(env, setFuncPrototype, BuiltinsSet::SetConstructor, "Set", FunctionLength::ZERO));
|
||||
JSFunction::SetFunctionPrototypeOrInstanceHClass(thread_,
|
||||
JSHandle<JSFunction>(setFunction),
|
||||
setFuncInstanceHClass.GetTaggedValue());
|
||||
@ -1292,8 +1291,7 @@ void Builtins::InitializeMap(const JSHandle<GlobalEnv> &env, JSHandle<JSTaggedVa
|
||||
factory_->NewEcmaHClass(JSMap::SIZE, JSType::JS_MAP, mapFuncPrototypeValue);
|
||||
// Map() = new Function()
|
||||
JSHandle<JSTaggedValue> mapFunction(
|
||||
NewBuiltinConstructor(env, mapFuncPrototype, BuiltinsMap::MapConstructor, "Map", FunctionLength::ZERO,
|
||||
BUILTINS_STUB_ID(MapConstructor)));
|
||||
NewBuiltinConstructor(env, mapFuncPrototype, BuiltinsMap::MapConstructor, "Map", FunctionLength::ZERO));
|
||||
// Map().prototype = Map.Prototype & Map.prototype.constructor = Map()
|
||||
JSFunction::SetFunctionPrototypeOrInstanceHClass(thread_,
|
||||
JSHandle<JSFunction>(mapFunction),
|
||||
|
@ -33,7 +33,7 @@
|
||||
/* Map.prototype.forEach ( callbackfn [ , thisArg ] ) */ \
|
||||
V("forEach", ForEach, 1, MapForEach) \
|
||||
/* Map.prototype.get ( key ) */ \
|
||||
V("get", Get, 1, MapGet) \
|
||||
V("get", Get, 1, INVALID) \
|
||||
/* Map.prototype.has ( key ) */ \
|
||||
V("has", Has, 1, MapHas) \
|
||||
/* Map.prototype.keys ( ) */ \
|
||||
|
Loading…
Reference in New Issue
Block a user