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

Add preferences to enable/disable the JITs #10325

Merged
merged 1 commit into from Apr 5, 2016

Conversation

@stjepang
Copy link
Contributor

stjepang commented Apr 1, 2016

When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion) accordingly.

Closes #10278.


This change is Reviewable

@highfive
Copy link

highfive commented Apr 1, 2016

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/script_thread.rs
@highfive
Copy link

highfive commented Apr 1, 2016

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify script code, but no tests are modified. Please consider adding a test!
@paulrouget
Copy link
Contributor

paulrouget commented Apr 1, 2016

We should start documenting these preferences somewhere.

@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 1, 2016

Could you add these to resources/prefs.json with the default value true? This will provide one easy way to discover and flip these prefs. Thanks!

Also, ./mach test-tidy failed:

./components/script/script_thread.rs:61: use statement is not in alphabetical order
    expected: js::jsapi::{JSObject, SetPreserveWrapperCallback}
    found: js::jsapi::RuntimeOptionsRef
@bors-servo
Copy link
Contributor

bors-servo commented Apr 2, 2016

The latest upstream changes (presumably #10336) made this pull request unmergeable. Please resolve the merge conflicts.

@stjepang stjepang force-pushed the stjepang:pref-disable-jit branch from ff5880f to 70c20eb Apr 2, 2016
unsafe {
let rt_opts = RuntimeOptionsRef(runtime.rt());
is_baseline_enabled.map(|val| (*rt_opts).set_baseline_(val));
is_ion_enabled.map(|val| (*rt_opts).set_ion_(val));

This comment has been minimized.

@mbrubeck

mbrubeck Apr 4, 2016

Contributor

I missed this before: Could you change this to use if let instead of .map()? This is purely a style preference; we find it more readable than map in cases where the return value isn't used.

r=mbrubeck with that change

@stjepang stjepang force-pushed the stjepang:pref-disable-jit branch from 3f8c5db to 23a2a75 Apr 4, 2016
When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion).
@stjepang stjepang force-pushed the stjepang:pref-disable-jit branch from 23a2a75 to 3ad7119 Apr 4, 2016
@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 4, 2016

1 similar comment
@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

📌 Commit 3ad7119 has been approved by mbrubeck

1 similar comment
@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

📌 Commit 3ad7119 has been approved by mbrubeck

@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

💡 This pull request was already approved, no need to approve it again.

  • There's another pull request that is currently being tested, blocking this pull request: #10391
@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

📌 Commit 3ad7119 has been approved by mbrubeck

@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

💡 This pull request was already approved, no need to approve it again.

  • There's another pull request that is currently being tested, blocking this pull request: #10391
@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

📌 Commit 3ad7119 has been approved by mbrubeck

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

Testing commit 3ad7119 with merge 60e5755...

bors-servo added a commit that referenced this pull request Apr 4, 2016
Add preferences to enable/disable the JITs

When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion) accordingly.

Closes #10278.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10325)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

💔 Test failed - linux-rel

@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 4, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

Previous build results for android, arm32, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt, status-appveyor are reusable. Rebuilding only linux-rel...

@bors-servo
Copy link
Contributor

bors-servo commented Apr 4, 2016

💔 Test failed - linux-rel

@mbrubeck
Copy link
Contributor

mbrubeck commented Apr 5, 2016

@bors-servo
Copy link
Contributor

bors-servo commented Apr 5, 2016

Testing commit 3ad7119 with merge 863c905...

bors-servo added a commit that referenced this pull request Apr 5, 2016
Add preferences to enable/disable the JITs

When creating a runtime (script.rs), we check prefs and then enable or
disable the JITs (Baseline and Ion) accordingly.

Closes #10278.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10325)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Apr 5, 2016

@bors-servo bors-servo merged commit 3ad7119 into servo:master Apr 5, 2016
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.