Skip to content

Commit c4d4919

Browse files
committed
[GR-16336] Check fast specs pass with empty inline caches
* To check the uncached specializations work correctly.
1 parent 31290b1 commit c4d4919

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

spec/truffle/pre_initialization_spec.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
guard -> { TruffleRuby.native? } do
1313
describe "The pre-initialized context" do
14-
it "can be used to run specs, as otherwise this spec run will not have tested pre-initialization" do
15-
Truffle::Boot.was_preinitialized?.should == true
14+
guard -> { ENV["TRUFFLERUBY_CHECK_PREINITIALIZED_SPEC"] != "false" } do
15+
it "can be used to run specs, as otherwise this spec run will not have tested pre-initialization" do
16+
Truffle::Boot.was_preinitialized?.should == true
17+
end
1618
end
1719

1820
it "is not used if --engine.UsePreInitializedContext=false is passed" do

src/options.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ INTERNAL: # Options for debugging the TruffleRuby implementation
199199
POW_CACHE: [integer-pow-cache, integer, DEFAULT_CACHE, Cache size for Integer#** with a constant exponent]
200200
RUBY_LIBRARY_CACHE: [ruby-library-cache, integer, DEFAULT_CACHE, Ruby Library cache size]
201201

202-
# Inline caches with a non-default size
202+
# Inline caches with a non-default size. When adding a new option here, update test/truffle/integration/limit-zero.sh
203203
THREAD_CACHE: [thread-cache, integer, ['!singleContext ? 0 : ', 1], Cache size of operations that depend on a particular thread]
204204
IDENTITY_CACHE: [identity-cache, integer, 1, Cache size for inline caches comparing by identity for context-independent objects]
205205
CONTEXT_SPECIFIC_IDENTITY_CACHE: [context-identity-cache, integer, ['!singleContext ? 0 : ', IDENTITY_CACHE], Cache size for inline caches comparing by identity for context-specific objects]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
source test/truffle/common.sh.inc
4+
5+
export TRUFFLERUBY_CHECK_PREINITIALIZED_SPEC=false
6+
jt test fast -- --default-cache=0 --thread-cache=0 --identity-cache=0 --class-cache=0 --array-dup-cache=0 --array-strategy-cache=0 --pack-unroll=0 --global-variable-max-invalidations=0

0 commit comments

Comments
 (0)