mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Fix [[Prototype]] initialization process for each object creation
* remove duplicated initialization for [[Prototype]] internal slot * initialize prototype value directly when each Object created * each prototype candidate object should be first marked as prototype object * setGlobalIntrinsicObject marks fixed structure and prototype for global object's intrinsic object initialization Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
c7cd02a959
commit
39a5922437
93 changed files with 464 additions and 566 deletions
|
|
@ -27,17 +27,14 @@
|
|||
namespace Escargot {
|
||||
|
||||
NumberObject::NumberObject(ExecutionState& state, double value)
|
||||
: Object(state)
|
||||
, m_primitiveValue(value)
|
||||
: NumberObject(state, state.context()->globalObject()->numberPrototype(), value)
|
||||
{
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, state.context()->globalObject()->numberPrototype());
|
||||
}
|
||||
|
||||
NumberObject::NumberObject(ExecutionState& state, Object* proto, double value)
|
||||
: Object(state)
|
||||
: Object(state, proto)
|
||||
, m_primitiveValue(value)
|
||||
{
|
||||
Object::setPrototypeForIntrinsicObjectCreation(state, proto);
|
||||
}
|
||||
|
||||
void* NumberObject::operator new(size_t size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue