Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 22:42
    rhuanjl synchronize #5885
  • Jan 31 2019 22:39
    MikeHolman synchronize #5923
  • Jan 31 2019 22:28
    MikeHolman synchronize #5923
  • Jan 31 2019 19:48
    MikeHolman synchronize #5923
  • Jan 31 2019 19:03
    penzn synchronize #5903
  • Jan 31 2019 17:15
    penzn synchronize #5903
  • Jan 30 2019 22:33
    wyrichte opened #5927
  • Jan 30 2019 22:33

    wyrichte on ADO_test

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 22:32
    wyrichte closed #5916
  • Jan 30 2019 20:20
    MikeHolman synchronize #5923
  • Jan 30 2019 19:56
    MikeHolman synchronize #5923
  • Jan 30 2019 19:53
    MikeHolman synchronize #5923
  • Jan 30 2019 19:35

    wyrichte on Test-PR-webhook---don't-merge

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 19:35
    wyrichte synchronize #5916
  • Jan 30 2019 19:07
    wyrichte synchronize #5925
  • Jan 30 2019 18:54

    wyrichte on Test-PR-webhook---don't-merge

    Update ChakraCoreStatic.cpp (compare)

  • Jan 30 2019 18:54
    wyrichte synchronize #5916
  • Jan 30 2019 18:12
    wyrichte closed #5926
  • Jan 30 2019 18:12
    wyrichte opened #5926
  • Jan 30 2019 01:43
    wyrichte synchronize #5925
Bruce Pascoe
@fatcerberus
I used to know what the build.sh option was for this but I’ve forgotten
Bruce Pascoe
@fatcerberus
Nevermind, found out it was just --valgrind (go figure)
Bruce Pascoe
@fatcerberus

But I do have a different question. I know ChakraCore will preserve any JsValueRefs that exist on the stack, but I was wondering if this particular case will be safe:

JsValueRef makeobj() {
    JsValueRef ref;

    ref = JsCreateObject(...);
    return ref;
}

void do_stuff() {
    JsValueRef objRef = makeobj();
    /* ... */
}

See, the GC runs off-thread and technically in the above code there may be a small window where the reference doesn't exist on the stack because the stack frame it was created in has been torn down but it also hasn't yet been assigned to the stack variable in the caller. For a short time it only exists in a register, e.g. EAX. Will the GC preserve objects whose only live reference is currently stored in a register?

I guess intuitively it would have to, since stack variables can be completely optimized away by the compiler, but I want to make sure
Derek Morris
@Penguinwizzard
It should be safe. The GC doesn't interrupt the main thread at arbitrary places for collection (iirc), but instead does so at specific points where it's called directly. The parallel mark thread may miss the reference, but when the in-thread mark and sweep happens it'll find it if it's still live, because it will at that point have been stored to a location on the stack.
If it were possible to trigger GC at arbitrary points, it'd be a matter of having the GC mark also check the saved register memory; for an instance where we put saved registers into memory for the GC to find them, check the bailout code
Bruce Pascoe
@fatcerberus
Oh - I was under the impression that the GC tried to collect stuff without having to stop the world
Michael Holman
@MikeHolman
The GC does most of its work off-thread, but there is a final mark phase that happens in parallel on both the main thread and background threads. this phase rescans any objects that changed during the background mark, as well as stack/register references from the main thread
Bruce Pascoe
@fatcerberus
So actual collection happens in the main thread, I assume. I guess that makes sense since finalizes are called on the main thread too
Bruce Pascoe
@fatcerberus
“Actual collection” meaning the sweep part of mark-and-sweep
Marc G.
@Mouvedia
Is this true?
If so, what does it mean for node-chakracore?
Bruce Pascoe
@fatcerberus
It looks like they’re only switching the rendering engine, I assume Chakra will continue to be the JS engine (in fact I hope so since CC does lots of things much faster than v8) so I don’t think it’s relevant to node-cc at all
CatCatCatDog
@CatCatCatDog
ChakraCore is over? I watched some news, It means, Microsoft is developing new browser with chromium.
Is this true?
Bruce Pascoe
@fatcerberus
They’re changing the rendering engine from EdgeHTML to blink, does t say anything about the JS engine
That same link was just posted above
Jani Turunen
@Janisku7
EdgeHTML I use my future browser for MR what should be in some demo versionyet
Michael Holman
@MikeHolman
@fatcerberus actual sweep happens in the background, after the final mark. at the end of final mark we run finalizers
Bruce Pascoe
@fatcerberus
But the decision to sweep happens on the main thread, got it
Michael Holman
@MikeHolman
exactly
Bruce Pascoe
@fatcerberus
Just trying to make sure there’s no room for weird race conditions is all
Thank you for that, now I can stop worrying that my objects in native-land will get eaten due to details I can only see by looking at a disassembly :stuck_out_tongue:
Bruce Pascoe
@fatcerberus
Now that I’m thinking about this some more I feel pretty stupid, considering that JsNativeFunctions pass back their return value through a return—and don’t need to AddRef first
Ondrej Kelle
@tondrej
Hi! In case anyone finds it interesting, here's my little project: https://github.com/tondrej/chakracore-delphi
Marc G.
@Mouvedia
The Chakra JavaScript engine will be swapped out for V8.
@fatcerberus seems you assumed incorrectly.
Microsoft says it has no plans to stop maintaining EdgeHTML and Chakra, although if usage were to decline, developers could expect them to hit end of support eventually.
Jani Turunen
@Janisku7
I forked it so planto make chromium free browser
Marc G.
@Mouvedia
we will have an Opera all over again
Opera 15 lacked stuff that Opera 12 had
it was idiotic
Jani Turunen
@Janisku7
I have disliked chromium very long time
Sasha Syrotenko
@Fly-Style
Anyway, I would like to contribute to ChakraCore before and after the new browser release. ;)
Jani Turunen
@Janisku7
also to EdgeHtml too for sure right
Richard
@rhuanjl
I don't think they've said anything about open sourcing EdgeHtml
@Fly-Style I think I'm the only regular external contributor to chakracore it would be cool to have another one around
I guess that covers node-chakracore.
Jani Turunen
@Janisku7
I dont support chromium browsers so it wouldbe cool to have edgeHtml OSS too
Tom Care
@tcare
@liminzhu has put up a statement about the future of ChakraCore in #5865 @Mouvedia @CatCatCatDog @fatcerberus
Bruce Pascoe
@fatcerberus
Is there a stable link I can use in my Makefile to fetch the ChakraCore Linux binaries? Most Linux distros don't have an official package for CC so I need to fetch the binaries manually but I don't want to commit them
Bruce Pascoe
@fatcerberus
I'm fetching from https://aka.ms/chakracore/cc_linux_x64_1_11_4 for now... so far it seems to be stable
Jimmy Thomson
@MSLaguana
That link should exist for at least a year or so; there is some expiry I think, but it's long
Bruce Pascoe
@fatcerberus
Is it possible to retrieve bytecode using the debugger API? I would like to experiment with making a bytecode visualizer
i.e. you hover over a line of JS, it highlights the bytecode generated for that line in the dump
So I guess in my reality my requirements are:
  1. Ability to get a bytecode dump via the API
  2. Ability to map generated bytecode instructions to source lines
Jimmy Thomson
@MSLaguana
I don't believe that we expose any of that to js-land debuggers (including via our debugging API). We have internal native debugging tools which can do that, and the bytecode instruction -> source line functionality is built in to the bytecode, but I don't think we surface that via JSRT at all
Bruce Pascoe
@fatcerberus
I guess that makes sense since there’s no versioning guarantees for bytecode. Would make things difficult for the host maintainer