mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Debugger Client print feature
Signed-off-by: bence gabor kis <kisbg@inf.u-szeged.hu>
This commit is contained in:
parent
d57d22e964
commit
e31cfeeada
14 changed files with 85 additions and 3 deletions
|
|
@ -75,10 +75,15 @@ static bool stringEndsWith(const std::string& str, const std::string& suffix)
|
|||
ValueRef* builtinPrint(ExecutionStateRef* state, ValueRef* thisValue, size_t argc, ValueRef** argv, bool isConstructCall)
|
||||
{
|
||||
if (argc >= 1) {
|
||||
StringRef* printMsg;
|
||||
if (argv[0]->isSymbol()) {
|
||||
puts(argv[0]->asSymbol()->symbolDescriptiveString()->toStdUTF8String().data());
|
||||
printMsg = argv[0]->asSymbol()->symbolDescriptiveString();
|
||||
puts(printMsg->toStdUTF8String().data());
|
||||
state->context()->printDebugger(printMsg);
|
||||
} else {
|
||||
puts(argv[0]->toString(state)->toStdUTF8String().data());
|
||||
printMsg = argv[0]->toString(state);
|
||||
puts(printMsg->toStdUTF8String().data());
|
||||
state->context()->printDebugger(printMsg->toString(state));
|
||||
}
|
||||
} else {
|
||||
puts("undefined");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue