mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Make files to implement Proxy objects(26.2) (#52)
TODO : Implement new Proxy(target, handler)
This commit is contained in:
parent
5b83cc8162
commit
9d1a166dcf
4 changed files with 171 additions and 1 deletions
41
src/runtime/ProxyObject.cpp
Normal file
41
src/runtime/ProxyObject.cpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* Copyright (c) 2018-present Samsung Electronics Co., Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if ESCARGOT_ENABLE_PROXY
|
||||
|
||||
#include "Escargot.h"
|
||||
#include "ProxyObject.h"
|
||||
#include "Context.h"
|
||||
#include "JobQueue.h"
|
||||
#include "interpreter/ByteCodeInterpreter.h"
|
||||
|
||||
namespace Escargot {
|
||||
|
||||
ProxyObject::ProxyObject(ExecutionState& state)
|
||||
: Object(state)
|
||||
{
|
||||
}
|
||||
|
||||
void* ProxyObject::operator new(size_t size)
|
||||
{
|
||||
static GC_descr descr;
|
||||
|
||||
return GC_MALLOC_EXPLICITLY_TYPED(size, descr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // ESCARGOT_ENABLE_PROXY
|
||||
Loading…
Add table
Add a link
Reference in a new issue