本文整理汇总了C++中PROBE_STACK函数的典型用法代码示例。如果您正苦于以下问题:C++ PROBE_STACK函数的具体用法?C++ PROBE_STACK怎么用?C++ PROBE_STACK使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PROBE_STACK函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: PROBE_STACK
Var JavascriptGeneratorFunction::NewInstance(RecyclableObject* function, CallInfo callInfo, ...)
{
// Get called when creating a new generator function through the constructor (e.g. gf.__proto__.constructor) and sets EntryGeneratorFunctionImplementation as the entrypoint
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
return JavascriptFunction::NewInstanceHelper(function->GetScriptContext(), function, callInfo, args, FunctionKind::Generator);
}
开发者ID:280185386,项目名称:ChakraCore,代码行数:9,代码来源:JavascriptGeneratorFunction.cpp
示例2: PROBE_STACK
Var JavascriptError::NewWinRTErrorInstance(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptError* pError = scriptContext->GetHostScriptContext()->CreateWinRTError(nullptr, nullptr);
return JavascriptError::NewInstance(function, pError, callInfo, args);
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:10,代码来源:JavascriptError.cpp
示例3: PROBE_STACK
Var JavascriptWeakSet::NewInstance(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
Var newTarget = callInfo.Flags & CallFlags_NewTarget ? args.Values[args.Info.Count] : args[0];
bool isCtorSuperCall = (callInfo.Flags & CallFlags_New) && newTarget != nullptr && !JavascriptOperators::IsUndefined(newTarget);
Assert(isCtorSuperCall || !(callInfo.Flags & CallFlags_New) || args[0] == nullptr);
CHAKRATEL_LANGSTATS_INC_BUILTINCOUNT(WeakSetCount);
JavascriptWeakSet* weakSetObject = nullptr;
if (callInfo.Flags & CallFlags_New)
{
weakSetObject = library->CreateWeakSet();
}
else
{
JavascriptError::ThrowTypeErrorVar(scriptContext, JSERR_NeedObjectOfType, _u("WeakSet"), _u("WeakSet"));
}
Assert(weakSetObject != nullptr);
Var iterable = (args.Info.Count > 1) ? args[1] : library->GetUndefined();
RecyclableObject* iter = nullptr;
RecyclableObject* adder = nullptr;
if (JavascriptConversion::CheckObjectCoercible(iterable, scriptContext))
{
iter = JavascriptOperators::GetIterator(iterable, scriptContext);
Var adderVar = JavascriptOperators::GetProperty(weakSetObject, PropertyIds::add, scriptContext);
if (!JavascriptConversion::IsCallable(adderVar))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedFunction);
}
adder = RecyclableObject::FromVar(adderVar);
}
if (iter != nullptr)
{
Var nextItem;
while (JavascriptOperators::IteratorStepAndValue(iter, scriptContext, &nextItem))
{
CALL_FUNCTION(adder, CallInfo(CallFlags_Value, 2), weakSetObject, nextItem);
}
}
return isCtorSuperCall ?
JavascriptOperators::OrdinaryCreateFromConstructor(RecyclableObject::FromVar(newTarget), weakSetObject, nullptr, scriptContext) :
weakSetObject;
}
开发者ID:RexSong,项目名称:ChakraCore,代码行数:55,代码来源:JavascriptWeakSet.cpp
示例4: PROBE_STACK
Var JavascriptStringIterator::EntryNext(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
Assert(!(callInfo.Flags & CallFlags_New));
Var thisObj = args[0];
if (!JavascriptStringIterator::Is(thisObj))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedStringIterator, L"String Iterator.prototype.next");
}
JavascriptStringIterator* iterator = JavascriptStringIterator::FromVar(thisObj);
JavascriptString* string = iterator->m_string;
if (string == nullptr)
{
return library->CreateIteratorResultObjectUndefinedTrue();
}
charcount_t length = string->GetLength();
charcount_t index = iterator->m_nextIndex;
if (index >= length)
{
// Nulling out the m_string field is important so that the iterator
// does not keep the string alive after iteration is completed.
iterator->m_string = nullptr;
return library->CreateIteratorResultObjectUndefinedTrue();
}
wchar_t chFirst = string->GetItem(index);
Var result;
if (index + 1 == string->GetLength() ||
!NumberUtilities::IsSurrogateLowerPart(chFirst) ||
!NumberUtilities::IsSurrogateUpperPart(string->GetItem(index + 1)))
{
result = scriptContext->GetLibrary()->GetCharStringCache().GetStringForChar(chFirst);
iterator->m_nextIndex += 1;
}
else
{
result = JavascriptString::SubstringCore(string, index, 2, scriptContext);
iterator->m_nextIndex += 2;
}
return library->CreateIteratorResultObjectValueFalse(result);
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:54,代码来源:JavascriptStringIterator.cpp
示例5: PROBE_STACK
Var JavascriptGeneratorFunction::NewInstanceRestrictedMode(RecyclableObject* function, CallInfo callInfo, ...)
{
ScriptContext* scriptContext = function->GetScriptContext();
scriptContext->CheckEvalRestriction();
PROBE_STACK(scriptContext, Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
return JavascriptFunction::NewInstanceHelper(scriptContext, function, callInfo, args, FunctionKind::Generator);
}
开发者ID:mozilla,项目名称:positron-spidernode,代码行数:12,代码来源:JavascriptGeneratorFunction.cpp
示例6: PROBE_STACK
Var JavascriptError::NewWinRTErrorInstance(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptError* pError = scriptContext->GetHostScriptContext()->CreateWinRTError(nullptr, nullptr);
Var newTarget = callInfo.Flags & CallFlags_NewTarget ? args.Values[args.Info.Count] : args[0];
Var message = args.Info.Count > 1 ? args[1] : scriptContext->GetLibrary()->GetUndefined();
return JavascriptError::NewInstance(function, pError, callInfo, newTarget, message);
}
开发者ID:EdMaurer,项目名称:ChakraCore,代码行数:12,代码来源:JavascriptError.cpp
示例7: PROBE_STACK
Var SIMDUint16x8Lib::EntryLoad(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
return SIMD128TypedArrayLoad<JavascriptSIMDUint16x8>(args[1], args[2], 8 * INT16_SIZE, scriptContext);
}
开发者ID:AlexElting,项目名称:ChakraCore,代码行数:12,代码来源:SimdUint16x8Lib.cpp
示例8: PROBE_STACK
Var SIMDFloat64x2Lib::EntryZero(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
SIMDValue lanes = SIMDFloat64x2Operation::OpZero();
return JavascriptSIMDFloat64x2::New(&lanes, scriptContext);
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:13,代码来源:SIMDFloat64x2Lib.cpp
示例9: PROBE_STACK
Var SIMDInt8x16Lib::EntryCheck(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
if (args.Info.Count >= 2 && JavascriptSIMDInt8x16::Is(args[1]))
{
return args[1];
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdInt8x16TypeMismatch, L"Int8x16");
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:13,代码来源:SIMDInt8x16Lib.cpp
示例10: PROBE_STACK
Var JavascriptMapIterator::EntryNext(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
JavascriptLibrary* library = scriptContext->GetLibrary();
Assert(!(callInfo.Flags & CallFlags_New));
Var thisObj = args[0];
if (!JavascriptMapIterator::Is(thisObj))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedMapIterator, L"Map Iterator.prototype.next");
}
JavascriptMapIterator* iterator = JavascriptMapIterator::FromVar(thisObj);
JavascriptMap* map = iterator->m_map;
auto& mapIterator = iterator->m_mapIterator;
if (map == nullptr || !mapIterator.Next())
{
iterator->m_map = nullptr;
return library->CreateIteratorResultObjectUndefinedTrue();
}
auto entry = mapIterator.Current();
Var result;
if (iterator->m_kind == JavascriptMapIteratorKind::KeyAndValue)
{
JavascriptArray* keyValueTuple = library->CreateArray(2);
keyValueTuple->SetItem(0, entry.Key(), PropertyOperation_None);
keyValueTuple->SetItem(1, entry.Value(), PropertyOperation_None);
result = keyValueTuple;
}
else if (iterator->m_kind == JavascriptMapIteratorKind::Key)
{
result = entry.Key();
}
else
{
Assert(iterator->m_kind == JavascriptMapIteratorKind::Value);
result = entry.Value();
}
return library->CreateIteratorResultObjectValueFalse(result);
}
开发者ID:EdwardBetts,项目名称:spidernode,代码行数:49,代码来源:JavascriptMapIterator.cpp
示例11: PROBE_STACK
Var SIMDInt32x4Lib::EntryCheck(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New)); //comment out due to -ls -stress run
if (args.Info.Count >= 2 && JavascriptSIMDInt32x4::Is(args[1]))
{
return args[1];
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdInt32x4TypeMismatch, _u("int32x4"));
}
开发者ID:280185386,项目名称:ChakraCore,代码行数:15,代码来源:SIMDInt32x4Lib.cpp
示例12: PROBE_STACK
Var JavascriptMap::EntryValues(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
if (!JavascriptMap::Is(args[0]))
{
JavascriptError::ThrowTypeErrorVar(scriptContext, JSERR_NeedObjectOfType, _u("Map.prototype.values"), _u("Map"));
}
JavascriptMap* map = JavascriptMap::FromVar(args[0]);
return scriptContext->GetLibrary()->CreateMapIterator(map, JavascriptMapIteratorKind::Value);
}
开发者ID:280185386,项目名称:ChakraCore,代码行数:15,代码来源:JavascriptMap.cpp
示例13: PROBE_STACK
Var JavascriptReflect::EntryConstruct(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
Var undefinedValue = scriptContext->GetLibrary()->GetUndefined();
AUTO_TAG_NATIVE_LIBRARY_ENTRY(function, callInfo, _u("Reflect.construct"));
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
if (args.Info.Flags & CallFlags_New)
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_ErrorOnNew, _u("Reflect.construct"));
}
Var target = args.Info.Count > 1 ? args[1] : undefinedValue;
if (!JavascriptOperators::IsConstructor(target))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedConstructor, _u("target"));
}
Var newTarget = nullptr;
if (scriptContext->GetConfig()->IsES6ClassAndExtendsEnabled())
{
if (args.Info.Count > 3)
{
newTarget = args[3];
if (!JavascriptOperators::IsConstructor(newTarget))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedConstructor, _u("newTarget"));
}
}
else
{
newTarget = target;
}
}
RecyclableObject* thisArg = RecyclableObject::FromVar(undefinedValue);
if (newTarget != nullptr)
{
thisArg = JavascriptOperators::CreateFromConstructor(RecyclableObject::FromVar(newTarget), scriptContext);
}
Var argArray = args.Info.Count > 2 ? args[2] : undefinedValue;
return JavascriptFunction::ConstructHelper(RecyclableObject::FromVar(target), thisArg, newTarget, argArray, scriptContext);
}
开发者ID:280185386,项目名称:ChakraCore,代码行数:48,代码来源:JavascriptReflect.cpp
示例14: PROBE_STACK
Var SIMDInt8x16Lib::EntryFromUint8x16Bits(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count >= 2 && JavascriptSIMDUint8x16::Is(args[1]))
{
JavascriptSIMDUint8x16 *instance = JavascriptSIMDUint8x16::FromVar(args[1]);
return SIMDConvertTypeFromBits<JavascriptSIMDUint8x16, JavascriptSIMDInt8x16>(instance, scriptContext);
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdInt8x16TypeMismatch, L"fromUint8x16Bits");
}
开发者ID:catwarrior,项目名称:ChakraCore,代码行数:16,代码来源:SIMDInt8x16Lib.cpp
示例15: PROBE_STACK
// SharedArrayBuffer.prototype.byteLength
Var SharedArrayBuffer::EntryGetterByteLength(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count == 0 || !SharedArrayBuffer::Is(args[0]))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_NeedSharedArrayBufferObject);
}
SharedArrayBuffer* sharedArrayBuffer = SharedArrayBuffer::FromVar(args[0]);
return JavascriptNumber::ToVar(sharedArrayBuffer->GetByteLength(), scriptContext);
}
开发者ID:sankha93,项目名称:ChakraCore,代码行数:18,代码来源:SharedArrayBuffer.cpp
示例16: PROBE_STACK
Var
WebAssemblyTable::EntryGetterLength(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count == 0 || !WebAssemblyTable::Is(args[0]))
{
JavascriptError::ThrowTypeError(scriptContext, WASMERR_NeedTableObject);
}
WebAssemblyTable * table = WebAssemblyTable::FromVar(args[0]);
return JavascriptNumber::ToVar(table->m_currentLength, scriptContext);
}
开发者ID:muh00mad,项目名称:ChakraCore,代码行数:17,代码来源:WebAssemblyTable.cpp
示例17: PROBE_STACK
Var JavascriptSet::EntryClear(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
if (!JavascriptSet::Is(args[0]))
{
JavascriptError::ThrowTypeErrorVar(scriptContext, JSERR_NeedObjectOfType, _u("Set.prototype.clear"), _u("Set"));
}
JavascriptSet* set = JavascriptSet::FromVar(args[0]);
set->Clear();
return scriptContext->GetLibrary()->GetUndefined();
}
开发者ID:thiagolimaa,项目名称:ChakraCore,代码行数:18,代码来源:JavascriptSet.cpp
示例18: PROBE_STACK
Var ObjectPrototypeObject::Entry__proto__setter(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
Assert(!(callInfo.Flags & CallFlags_New));
ScriptContext* scriptContext = function->GetScriptContext();
// B.2.2.1.2
// set Object.prototype.__proto__ ( proto )
// The value of the [[Set]] attribute is a built-in function that takes an argument proto. It performs the following steps:
#if !FLOATVAR
// Mark temp number will stack allocate number that is used as the object ptr.
// So we should box it before call ToObject on it.
Var arg0 = JavascriptNumber::BoxStackNumber(args[0], scriptContext);
#else
Var arg0 = args[0];
#endif
// 1. Let O be RequireObjectCoercible(this value).
// 2. ReturnIfAbrupt(O).
// 3. If Type(proto) is neither Object nor Null, return undefined.
// 4. If Type(O) is not Object, return undefined.
if (args.Info.Count < 1 || !JavascriptConversion::CheckObjectCoercible(arg0, scriptContext))
{
JavascriptError::ThrowTypeError(scriptContext, JSERR_This_NeedObject, _u("Object.prototype.__proto__"));
}
else if (args.Info.Count < 2 || !JavascriptOperators::IsObjectOrNull(args[1]) || !JavascriptOperators::IsObject(arg0))
{
return scriptContext->GetLibrary()->GetUndefined();
}
RecyclableObject* object = RecyclableObject::FromVar(arg0);
RecyclableObject* newPrototype = RecyclableObject::FromVar(args[1]);
// 5. Let status be O.[[SetPrototypeOf]](proto).
// 6. ReturnIfAbrupt(status).
// 7. If status is false, throw a TypeError exception.
JavascriptObject::ChangePrototype(object, newPrototype, /*shouldThrow*/true, scriptContext);
// 8. Return undefined.
return scriptContext->GetLibrary()->GetUndefined();
}
开发者ID:Rastaban,项目名称:ChakraCore,代码行数:44,代码来源:ObjectPrototypeObject.cpp
示例19: PROBE_STACK
//Lane Access
Var SIMDBool8x16Lib::EntryExtractLane(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
AssertMsg(args.Info.Count > 0, "Should always have implicit 'this'");
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count >= 3 && JavascriptSIMDBool8x16::Is(args[1]))
{
// if value arg is missing, then it is undefined.
Var laneVar = args.Info.Count >= 3 ? args[2] : scriptContext->GetLibrary()->GetUndefined();
bool result = (SIMDUtils::SIMD128ExtractLane<JavascriptSIMDBool8x16, 16, int8>(args[1], laneVar, scriptContext)) ? true : false;
return JavascriptBoolean::ToVar(result, scriptContext);
}
JavascriptError::ThrowTypeError(scriptContext, JSERR_SimdBool8x16TypeMismatch, _u("ExtractLane"));
}
开发者ID:280185386,项目名称:ChakraCore,代码行数:20,代码来源:SimdBool8x16Lib.cpp
示例20: PROBE_STACK
Var
WebAssemblyMemory::EntryGetterBuffer(RecyclableObject* function, CallInfo callInfo, ...)
{
PROBE_STACK(function->GetScriptContext(), Js::Constants::MinStackDefault);
ARGUMENTS(args, callInfo);
ScriptContext* scriptContext = function->GetScriptContext();
Assert(!(callInfo.Flags & CallFlags_New));
if (args.Info.Count == 0 || !WebAssemblyMemory::Is(args[0]))
{
JavascriptError::ThrowTypeError(scriptContext, WASMERR_NeedMemoryObject);
}
WebAssemblyMemory* memory = WebAssemblyMemory::FromVar(args[0]);
Assert(ArrayBuffer::Is(memory->m_buffer));
return memory->m_buffer;
}
开发者ID:litian2025,项目名称:ChakraCore,代码行数:19,代码来源:WebAssemblyMemory.cpp
注:本文中的PROBE_STACK函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论