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
What would cause MSVC not to be able to find the headers and/or .lib when using the NuGet package?
I've tried everything but can't get it to work. I don't want to keep committing CC binaries to my repo :frowning:
Jimmy Thomson
@MSLaguana
dumb question; has it downloaded the chakracore nuget package?
Bruce Pascoe
@fatcerberus
I completely blew away the packages/ directory and let it re-fetch everything and still no dice
Just checked that it exists in packages/ to make sure, and it does
At one point while fumbling around I got it to find the header... but then it didn't link the .lib so I still couldn't build
Jimmy Thomson
@MSLaguana
Have you specified that your different projects have a dependency on the nuget package?
e.g. is it in the references of your projects?
Bruce Pascoe
@fatcerberus
How do I check?
Jimmy Thomson
@MSLaguana
expand the References node
Bruce Pascoe
@fatcerberus
When I installed it I told it to install for both miniSphere and Cell, for some reason it says it's installed for SSj too even though that program doesn't depend on it (note the version field in the NuGet pane)
Nothing listed under References at all... which is weird because I also depend on Allegro and that finds the headers and links just fine
image.png
No option to add a CC reference...
My packages.config looks like this if it helps
<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="Allegro" version="5.2.4.0" targetFramework="native" />
  <package id="AllegroDeps" version="1.7.0.0" targetFramework="native" />
  <package id="Microsoft.ChakraCore.vc140" version="1.11.3" targetFramework="native" developmentDependency="true" />
</packages>
Jimmy Thomson
@MSLaguana
Unfortunately I'm not particularly experienced with consuming nuget packages for c++… and I can't find a lot of documentation either
Bruce Pascoe
@fatcerberus
Honestly I think there's something wonky with the Allegro packages where they screw up the config and prevent other packages from working, I've had issues adding other dependencies in the past
Jimmy Thomson
@MSLaguana
Maybe try explicitly adding to your include paths to include packages/<whatever the chakracore folder is>, and similarly for the library path?
Bruce Pascoe
@fatcerberus
Well, that worked (along with adding ChakraCore.lib to the list of libs to link in), I kind of figured NuGet was supposed to deal with all that automatically though (it usually does)...
Jimmy Thomson
@MSLaguana
I would have hoped so, but perhaps the .net nuget packages have additional metadata that native ones don't? Or that the one we publish doesn't? To be honest, the nuget packages that we publish are purely for people outside our team, so we have been reactive rather than proactive about it. If you happen to know of a better way to package things, we'll probably make the change :)
Bruce Pascoe
@fatcerberus
I would, but I'd like to know for sure that something is wrong with the CC packages first and it's not a bad interaction with the Allegro ones... don't want to fix the thing that isn't broken :)
It's possible NuGet doesn't like my project setup too... I have the .sln + all .*proj files in the same directory and MSVC generally seems to prefer one .vcxproj per directory
Bruce Pascoe
@fatcerberus
This debugger behavior is convenient but I'm not 100% convinced it isn't a bug
image.png
Bruce Pascoe
@fatcerberus
If it isn't clear from the screenshot: When examining __proto__, it appears the debugger calls the getters with this = the original object examined. Very convenient in the UI above, but I'm not sure if it's intentional
Jimmy Thomson
@MSLaguana
I believe it is intentional, I remember running into this before
Bruce Pascoe
@fatcerberus
What option(s) do I use to build ChakraCore so that it runs under valgrind? I want to test for memory leaks before I do a release but valgrind doesn’t like the 32GB reservation CC does on startup and terminates with OOM
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