Closed Bug 1705197 Opened 3 years ago Closed 3 years ago

Remove uses of JSID_TO_ATOM in js/src/vm directory

Categories

(Core :: JavaScript Engine, task, P5)

task

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: mgaudet, Assigned: garima.mazumdar, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Note: this bug is currently reserved for Outreachy applicants for the Spring/Summer 2021 cycle. If it has not been completed by the end of the application cycle, we will open it up.

Background

The JSID_TO_ATOM calls reflect an old style of SpiderMonkey programming that we think we can start to get away from, at internally to the engine.

This Bug

This bug is about removing uses of JSID_TO_ATOM within the js/src/vm directory. You can find these uses using your editor search functionality, or SearchFox. Instead of using JSID_TO_ATOM we should be using JS::PropertyKey::toAtom, which is actually how JSID_TO_ATOM is implemented.

Prerequisites

Before getting started, you'll want to

How you’ll know you’re done

  • The use of JSID_TO_ATOM is removed in the specified places.
  • SpiderMonkey builds
  • The tests run successfully.

Getting Help

Feel free to leave comments on this bug for questions, or, if you have more synchronous questions about this bug, feel free to drop into the #spidermonkey channel on chat.mozilla.org.

Tips:

  • Not sure if the code you've been editing is getting run? Insert a call to MOZ_CRASH, a macro which will crash when executed, and run the entire test suite with an optimized build (for speed). If you see crashes, you can then use a debug build to make sure it's crashing in your code!
Blocks: 1705198

Hey! It's Jane from Outreachy. I just finished my work on similar bug and would love to grab this one for work!
Especially when mine SpiderMonkey works great and I do have now correct code.
Thanks heaps! Looking forward to work on this one!

Hi! Thanks for recommending me this bug, I'll definitely get started with it :)

Hi, just had a few doubts about setting up SpiderMonkey. They've mentioned a directory $HOME/mozconfigs, so is HOME c:/mozilla-source/mozilla-unified? Also, how does my system know what HOME is? Do I have to set up an environment variable for it? Also, for building, they've mentioned cd <path to mozilla-central>, however, I don't have any mozilla-central? (I'm working on windows, if it matters)
Just wanted to get these doubts clarified before building :)

Flags: needinfo?(mgaudet)

Looks like you got that answered in #spidermonkey :) Cheers.

Flags: needinfo?(mgaudet)

Hi Matthew! I've made the necessary changes, but I wanted to test the code first, and tried running "./mach test js/src/vm/" but it says UNKNOWN TEST, so what should I do now?

Flags: needinfo?(mgaudet)
Assignee: nobody → garima.mazumdar
Status: NEW → ASSIGNED

Hey Garima;

See this link for details, but in general just running all the jit-tests should suffice.

Flags: needinfo?(mgaudet)

Hey Matthew,
Yeah I ran jit-test and mach build before submitting the patch and everything seemed to be working fine, do let me know if I've made any errors or if I have to make any changes :)

Flags: needinfo?(mgaudet)

(no need to need-info on every email).

I'll take a look and review when I get a minute!

Flags: needinfo?(mgaudet)
Pushed by mgaudet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/dcf3680823bf
Remove uses of JSID_TO_ATOM in js/src/vm directory. r=mgaudet
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: