This repository has been archived by the owner on Aug 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1343417 - Verify bytecode documentation in js/src/vm/Opcodes.h in…
… make check. r=nbp
- Loading branch information
Showing
5 changed files
with
422 additions
and
277 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# vim: set ts=8 sts=4 et sw=4 tw=99: | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
|
||
#---------------------------------------------------------------------------- | ||
# This script checks bytecode documentation in js/src/vm/Opcodes.h | ||
#---------------------------------------------------------------------------- | ||
|
||
from __future__ import print_function | ||
|
||
import os | ||
import sys | ||
|
||
scriptname = os.path.basename(__file__); | ||
topsrcdir = os.path.dirname(os.path.dirname(__file__)) | ||
|
||
def log_pass(text): | ||
print('TEST-PASS | {} | {}'.format(scriptname, text)) | ||
|
||
def log_fail(text): | ||
print('TEST-UNEXPECTED-FAIL | {} | {}'.format(scriptname, text)) | ||
|
||
def check_opcode(): | ||
sys.path.insert(0, os.path.join(topsrcdir, 'js', 'src', 'vm')) | ||
import opcode | ||
|
||
try: | ||
opcode.get_opcodes(topsrcdir) | ||
except Exception as e: | ||
log_fail(e.args[0]) | ||
|
||
log_pass('ok') | ||
return True | ||
|
||
def main(): | ||
if not check_opcode(): | ||
sys.exit(1) | ||
|
||
sys.exit(0) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.