summaryrefslogtreecommitdiff
path: root/common.mk
Commit message (Collapse)AuthorAgeFilesLines
* Mark IO::Buffer as experimental.Samuel Williams2021-11-101-0/+1
|
* IO::Buffer for scheduler interface.Samuel Williams2021-11-101-0/+178
|
* add `make runirb` ruleKoichi Sasada2021-10-281-0/+3
| | | | it's start irb on built ruby (not installed ruby).
* YJIT: Implement duphash (#5009)Ian C. Anderson2021-10-251-0/+1
| | | | | | | | | `duphash` showed up in the top-20 most frequent exit ops for @jhawthorn's benchmark that renders github.com/about The implementation was almost exactly the same as `duparray` Co-authored-by: John Hawthorn <john@hawthorn.email> Co-authored-by: John Hawthorn <john@hawthorn.email>
* process.c: Add Process._fork (#5017)Yusuke Endoh2021-10-251-0/+3
| | | | | | | | | | * process.c: Add Process._fork This API is supposed for application monitoring libraries to hook fork event. [Feature #17795] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
* Add INSTRUBY_OPTS to INSTRUBY_ARGS [ci skip]Nobuyoshi Nakada2021-10-231-2/+3
| | | | | For extra options from the `make` command line. Also add explicit `--install` option to install-nodoc.
* freeze (make shareable) script_linesKoichi Sasada2021-10-211-0/+1
|
* `RubyVM.keep_script_lines`Koichi Sasada2021-10-211-0/+1
| | | | | | | | | | | | | | `RubyVM.keep_script_lines` enables to keep script lines for each ISeq and AST. This feature is for debugger/REPL support. ```ruby RubyVM.keep_script_lines = true RubyVM::keep_script_lines = true eval("def foo = nil\ndef bar = nil") pp RubyVM::InstructionSequence.of(method(:foo)).script_lines ```
* Actually, tabs are okay in MakefileAlan Wu2021-10-201-2/+2
|
* Expand tabsAlan Wu2021-10-201-2/+2
|
* Update dependenciesAlan Wu2021-10-201-0/+9
|
* Remove yjit_backend to help with upstreamingAlan Wu2021-10-201-1/+0
| | | | | | The new backend isn't used at the moment and adds to our diff against upstream so remove it for now. We can reverse the removal later with git history.
* Put YJIT into a single compilation unitAlan Wu2021-10-201-811/+220
| | | | | | | | | | | | | | | | | | | | | For upstreaming, we want functions we export either prefixed with "rb_" or made static. Historically we haven't been following this rule, so we were "leaking" a lot of symbols as `make leak-globals` would tell us. This change unifies everything YJIT into a single compilation unit, yjit.o, and makes everything unprefixed static to pass `make leak-globals`. This manual "unified build" setup is similar to that of vm.o. Having everything in one compilation unit allows static functions to be visible across YJIT files and removes the need for declarations in headers in some cases. Unnecessary declarations were removed. Other changes of note: - switched to MJIT_SYMBOL_EXPORT_BEGIN which indicates stuff as being off limits for native extensions - the first include of each YJIT file is change to be "internal.h" - undefined MAP_STACK before explicitly redefining it since it collide's with a definition in system headers. Consider renaming?
* Fix changes from rebaseNoah Gibbs2021-10-201-0/+185
|
* TracePoint supportAlan Wu2021-10-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | This change fixes some cases where YJIT fails to fire tracing events. Most of the situations YJIT did not handle correctly involves enabling tracing while running inside generated code. A new operation to invalidate all generated code is added, which uses patching to make generated code exit at the next VM instruction boundary. A new routine called `jit_prepare_routine_call()` is introduced to facilitate this and should be used when generating code that could allocate, or could otherwise use `RB_VM_LOCK_ENTER()`. The `c_return` event is fired in the middle of an instruction as opposed to at an instruction boundary, so it requires special handling. C method call return points are patched to go to a fucntion which does everything the interpreter does, including firing the `c_return` event. The generated code for C method calls normally does not fire the event. Invalided code should not change after patching so the exits are not clobbered. A new variable is introduced to track the region of code that should not change.
* Add toregexp to yjiteileencodes2021-10-201-0/+1
| | | | | | | | The FIXME is there so we remember to investigate why insns clears the temporary array. Is this necessary? If it's not we can remove it from both. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Add getglobal to yjiteileencodes2021-10-201-0/+2
| | | | | | Adds getglobal to yjit and a test for it. Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
* Remove the scraperAaron Patterson2021-10-201-4/+0
| | | | | Now that we're using the jit function entry point, we don't need the scraper. Thank you for your service, scraper. ❤️
* Add YJIT.enabled?John Hawthorn2021-10-201-0/+13
|
* Update depsMaxime Chevalier-Boisvert2021-10-201-0/+1
|
* Add concatstrings to yjit codegen (#58)John Hawthorn2021-10-201-0/+4
| | | | | | | | | * Add ETYPE_TRUE and ETYPE_FALSE * Implement checktype * Implement concatstrings * Update deps
* Update common.mkMaxime Chevalier-Boisvert2021-10-201-0/+1
|
* Remove token_paste.h dep from common.mkMaxime Chevalier-Boisvert2021-10-201-4/+0
|
* update depsAaron Patterson2021-10-201-0/+1
|
* Get rid of dependency on rb_call_cacheAlan Wu2021-10-201-0/+1
|
* YJIT: lazy polymorphic getinstancevariableAlan Wu2021-10-201-815/+816
| | | | | | | | | | | | | | | | | | | | | | | | Lazily compile out a chain of checks for different known classes and whether `self` embeds its ivars or not. * Remove trailing whitespaces * Get proper addresss in Capstone disassembly * Lowercase address in Capstone disassembly Capstone uses lowercase for jump targets in generated listings. Let's match it. * Use the same successor in getivar guard chains Cuts down on duplication * Address reviews * Fix copypasta error * Add a comment
* Yet Another Ruby JIT!Jose Narvaez2021-10-201-822/+822
| | | | Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
* uJIT: Implement opt_getinlinecacheAlan Wu2021-10-201-0/+1
| | | | | | | | | | | | | | | | | * ujit: implement opt_getinlinecache Aggressively bet that writes to constants don't happen and invalidate all opt_getinlinecache blocks on any and all constant writes. Use alignment padding on block_t to track this assumption. No change to sizeof(block_t). * Fix compile warnings when not RUBY_DEBUG * Fix reversed condition * Switch to st_table to keep track of assumptions Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com> Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
* Ujit bug fixesAlan Wu2021-10-201-0/+1
| | | | | | | | | | | | | | * uJIT: don't compile tailcalls * Don't compile calls to protected methods We need to generate extra code to check whether the call goes through if we want to support these. * Fix copy pasta * Update blockids in branches * Update dependencies
* Tie lifetime of uJIT blocks to iseqsAlan Wu2021-10-201-1/+33
| | | | | | | | | | | | | | | | | | | | * Tie lifetime of uJIT blocks to iseqs Blocks weren't being freed when iseqs are collected. * Add rb_dary. Use it for method dependency table * Keep track of blocks per iseq Remove global version_tbl * Block version bookkeeping fix * dary -> darray * free ujit_blocks * comment about size of ujit_blocks
* Update dependenciesAlan Wu2021-10-201-1/+2
|
* Directly link libcapstone for easier developmentAaron Patterson2021-10-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us use libcapstone directly from miniruby so we don't need a Ruby Gem to to dev work. Example usage: ```ruby def foo(x) if x < 1 "wow" else "neat" end end iseq = RubyVM::InstructionSequence.of(method(:foo)) puts UJIT.disasm(iseq) 100.times { foo 1 } puts UJIT.disasm(iseq) ``` Then in the terminal ``` $ ./miniruby test.rb == disasm: #<ISeq:foo@test.rb:1 (1,0)-(7,3)> (catch: FALSE) local table (size: 1, argc: 1 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 1] x@0<Arg> 0000 getlocal_WC_0 x@0 ( 2)[LiCa] 0002 putobject_INT2FIX_1_ 0003 opt_lt <calldata!mid:<, argc:1, ARGS_SIMPLE> 0005 branchunless 10 0007 putstring "wow" ( 3)[Li] 0009 leave ( 7)[Re] 0010 putstring "neat" ( 5)[Li] 0012 leave ( 7)[Re] == ISEQ RANGE: 10 -> 10 ======================================================== 0x0: movabs rax, 0x7fe816e2d1a0 0xa: mov qword ptr [rdi], rax 0xd: mov r8, rax 0x10: mov r9, rax 0x13: mov r11, r12 0x16: jmp qword ptr [rax] == ISEQ RANGE: 0 -> 7 ========================================================== 0x0: mov rax, qword ptr [rdi + 0x20] 0x4: mov rax, qword ptr [rax - 0x18] 0x8: mov qword ptr [rdx], rax 0xb: mov qword ptr [rdx + 8], 3 0x13: movabs rax, 0x7fe817808200 0x1d: test byte ptr [rax + 0x3e6], 1 0x24: jne 0x3ffff7b 0x2a: test byte ptr [rdx], 1 0x2d: je 0x3ffff7b 0x33: test byte ptr [rdx + 8], 1 0x37: je 0x3ffff7b 0x3d: mov rax, qword ptr [rdx] 0x40: cmp rax, qword ptr [rdx + 8] 0x44: movabs rax, 0 0x4e: movabs rcx, 0x14 0x58: cmovl rax, rcx 0x5c: mov qword ptr [rdx], rax 0x5f: test qword ptr [rdx], -9 0x66: jne 0x3ffffd5 ``` Make sure to `brew install pkg-config capstone`
* Update dependenciesAlan Wu2021-10-201-2/+601
|
* Refactor uJIT code into more files for readabilityMaxime Chevalier-Boisvert2021-10-201-16/+18
|
* Update dependenciesAlan Wu2021-10-201-0/+12
|
* Update dependencyAlan Wu2021-10-201-0/+1
|
* Run ruby tool/update-deps --fixAlan Wu2021-10-201-0/+198
|
* Refactor ujit_examples.h generator. Remove dwarfdump dependencyAlan Wu2021-10-201-5/+3
|
* Don't assume srcdir is cwdAlan Wu2021-10-201-1/+1
|
* Add function to print strings from generated codeMaxime Chevalier-Boisvert2021-10-201-0/+1
|
* Fix typoAlan Wu2021-10-201-1/+1
|
* Fix dependency for ujit_examples.hAlan Wu2021-10-201-2/+2
| | | | Once this works on GNU/Linux this could be done semi automatically.
* Add new files, ujit_compile.c, ujit_compile.hMaxime Chevalier-Boisvert2021-10-201-0/+1
|
* Progress on x86 assembler. Encode a few simple instructions.Maxime Chevalier-Boisvert2021-10-201-1/+0
|
* Progress on porting x86 assembler for MicroJITMaxime Chevalier-Boisvert2021-10-201-0/+2
|
* Yeah, this actually works!Alan Wu2021-10-201-0/+5
|
* Suppress some messages on building mjit headerKazuhiro NISHIYAMA2021-10-121-2/+2
|
* marshal.c Marshal.load accepts a freeze: true option.Jean Boussier2021-10-051-0/+5
| | | | | | | | Fixes [Feature #18148] When set, all the loaded objects are returned as frozen. If a proc is provided, it is called with the objects already frozen.
* ruby tool/update-deps --fix卜部昌平2021-10-051-0/+414
|
* introduce debug.gemKoichi Sasada2021-10-051-1/+1
| | | | | | For the `test-bundled-gems`, make `debug.so` with extconf.rb and `make` command directly because `rake-compiler` assume ruby is installed (but `test-bundled-gems` can run without installation).