Giter VIP home page Giter VIP logo

Comments (5)

rightfold avatar rightfold commented on May 13, 2024

Do calls to @unsafe methods count as unsafe, like in Rust (and unlike in C#, where unsafe is always lexical)?

from scala-native.

densh avatar densh commented on May 13, 2024

Yes, they do count as unsafe.

from scala-native.

rightfold avatar rightfold commented on May 13, 2024

Yay!

from scala-native.

gurinderu avatar gurinderu commented on May 13, 2024

@densh Could you add an ability to use IR code in this task or maybe in separate?

For example

def start: Unit ={
 ir{
  %src.2 = alloca %"scala.scalanative.runtime.OmrThread"
  %src.3 = bitcast %"scala.scalanative.runtime.OmrThread"* %src.2 to i8*
  %src.4 = alloca void(...)*, align 8
  store void (...)* bitcast (void (i8*)* @"java.lang.Thread::run_unit" to void (...)*), void (...)** %src.4, align 8
  %src.5 = load void (...)*, void (...)** %src.4, align 8
  %src.6 = bitcast void (...)* %src.5 to i8*
  call void (i8*, i8*, i32, i8*, i8*) @"omrthread_create_ex"(i8* %src.3, i8* zeroinitializer, i32 0, i8* %src.6, i8* zeroinitializer)
 }
}

Also, it would be perfect to add annotation which marks method us usable in IR and does not remove them in dead code elimination phase

from scala-native.

densh avatar densh commented on May 13, 2024

@gurinderu Including inline IR in the code is not something that we are going to support. IR is subject to change without further notice, it's not meant to be stable. We want to have freedom to innovate in this area without breaking end-users code.

Regarding the second feature suggestion, I do not quite get exactly what you mean. Lets discuss on gitter. Also please try to refrain from suggesting new features in issues which are not strictly related to your suggestion (like this one.)

from scala-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.