Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Truffle] Fix remaining language specs #3549

Closed
17 tasks done
chrisseaton opened this issue Dec 18, 2015 · 12 comments
Closed
17 tasks done

[Truffle] Fix remaining language specs #3549

chrisseaton opened this issue Dec 18, 2015 · 12 comments
Assignees
Milestone

Comments

@chrisseaton
Copy link
Contributor

  • predefined/data
  • regexp/character_classes
  • regexp/modifiers
  • block
  • break
  • case
  • class
  • constants
  • def
  • encoding
  • file
  • lambda
  • method
  • predefined
  • send
  • super
  • variables
@chrisseaton chrisseaton added this to the truffle-dev milestone Dec 18, 2015
@chrisseaton chrisseaton self-assigned this Dec 18, 2015
eregon added a commit that referenced this issue Dec 19, 2015
@eregon
Copy link
Member

eregon commented Dec 19, 2015

  • I did the last break spec.
  • constants specs all pass. There are tags, but it's only in 2.3 and we are not targeting that Ruby version yet.
  • break needs a "frame on stack marker" technique to work most likely, like in SOM, so we can detect we should not throw the BreakException when the frame is no longer on the stack. And likely it's better to avoid this when we can detect statically it cannot happen.
  • def might be a bit tricky, I'll take a look at it.
  • The rest seems related to bugs/missing handling in the translator with masgn and other. Not very hard, just use bin/ast and breakpoint in the translator to see structure. setRHS and translateDummyAssignment might help to build assignments nodes with proper RHS.

@chrisseaton
Copy link
Contributor Author

constants specs all pass. There are tags, but it's only in 2.3 and we are not targeting that Ruby version yet.

If we can clear 2.3 tags that would be good. If we can get to zero tags then that's better than any other implementation isn't it?

@eregon
Copy link
Member

eregon commented Dec 25, 2015

Indeed, only MRI passes all of RubySpec currently.
I have some fix for that 2.3 constant change, but it's not trivial so I'd rather focus on 2.2 compat first (also 2.3 is still a bit of a moving target for some stuff).

@chrisseaton
Copy link
Contributor Author

The last character classes spec is blocked by jruby/jcodings#13

@chrisseaton
Copy link
Contributor Author

Last last regex modifiers spec is blocked by jruby/joni#13, but I've shimmed enough to pass the specs.

@chrisseaton
Copy link
Contributor Author

I can't see how to implement Global variable $0 actually sets the program name. This modifies argv[0], which we could do if only we could get the address of it.

@chrisseaton
Copy link
Contributor Author

I've figured out assignment of $0 on Mac. Still no idea for Linux. Note that prctl won't cut it as it's limited to 16 bytes.

@eregon
Copy link
Member

eregon commented Jan 5, 2016

Truncating for $0 might be OK, some OS only support in-place modifications of argv[0] I think.
Process.setproctitle also exists to set the process title (and it's also the name of a system call).
In MRI it's implemented in https://github.com/ruby/ruby/blob/trunk/missing/setproctitle.c for OS without setproctitle.

@chrisseaton
Copy link
Contributor Author

Yes, but the key thing we're missing is the value of argv. I can't find any way to do that on Linux.

@eregon
Copy link
Member

eregon commented Jan 5, 2016

For reading it?

@chrisseaton
Copy link
Contributor Author

Well, indirecting it in order to write to it, yeah.

@headius
Copy link
Member

headius commented Jan 6, 2016 via email

@enebo enebo added this to the Non-Release milestone Dec 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants