зеркало из https://github.com/mozilla/gecko-dev.git
Merge inbound to mozilla-central. a=merge
This commit is contained in:
Коммит
9e30b4d75a
|
@ -1296,11 +1296,14 @@ html[dir="rtl"] .managed-tree .tree .node > div {
|
|||
background-color: var(--theme-comment);
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
transition: all 0.15s ease-in-out;
|
||||
padding: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.close-btn .close:hover {
|
||||
background-color: var(--theme-comment);
|
||||
}
|
||||
|
||||
.close-btn:hover .img.close {
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -1340,6 +1343,7 @@ img.close::before {
|
|||
position: relative;
|
||||
padding: 0px 5px;
|
||||
fill: currentColor;
|
||||
min-width: 30px;
|
||||
}
|
||||
|
||||
.command-bar-button:disabled {
|
||||
|
@ -1369,10 +1373,10 @@ img.close::before {
|
|||
transform: translate(0, 0px);
|
||||
transition: transform 0.25s ease-in-out;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.toggle-button .togglePanes {
|
||||
vertical-align: -2px;
|
||||
-webkit-border-start: 1px solid;
|
||||
border-inline-start: 1px solid;
|
||||
border-image: var(--separator-border-image) 1 1;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.toggle-button svg {
|
||||
|
@ -2229,6 +2233,10 @@ menuseparator {
|
|||
overflow: auto;
|
||||
}
|
||||
|
||||
.source-outline-panel.has-root > div {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sources-list .managed-tree .tree .node .img.blackBox {
|
||||
mask: url("resource://devtools/client/debugger/new/images/blackBox.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
|
@ -4363,12 +4371,9 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||
}
|
||||
|
||||
.source-tab {
|
||||
border-left: 1px solid transparent;
|
||||
border-right: 1px solid transparent;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
transition: all 0.15s ease;
|
||||
min-width: 40px;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
|
@ -4376,6 +4381,7 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||
cursor: default;
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.source-tab::before {
|
||||
|
@ -4408,9 +4414,6 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||
.source-tab.active {
|
||||
color: var(--theme-toolbar-selected-color);
|
||||
border-bottom-color: transparent;
|
||||
border-left: 1px solid var(--theme-splitter-color);
|
||||
border-right: 1px solid var(--theme-splitter-color);
|
||||
background-color: var(--theme-body-background);
|
||||
}
|
||||
|
||||
.source-tab.active::before {
|
||||
|
@ -4460,21 +4463,6 @@ html .welcomebox .toggle-button-end.collapsed {
|
|||
fill: var(--theme-body-color);
|
||||
}
|
||||
|
||||
img.moreTabs {
|
||||
mask: url("resource://devtools/client/debugger/new/images/command-chevron.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
display: block;
|
||||
background: var(--theme-body-color);
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
html[dir="rtl"] .img.moreTabs {
|
||||
transform: rotate(180deg);
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.source-tab .filename {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -4498,6 +4486,11 @@ html[dir="rtl"] .img.moreTabs {
|
|||
visibility: visible;
|
||||
}
|
||||
|
||||
.source-tab.active .close {
|
||||
visibility: visible;
|
||||
background-color: var(--theme-toolbar-selected-color);
|
||||
}
|
||||
|
||||
.source-tab:hover .close-btn {
|
||||
visibility: visible;
|
||||
}
|
||||
|
@ -4542,6 +4535,20 @@ html[dir="rtl"] .dropdown {
|
|||
width: 24px;
|
||||
}
|
||||
|
||||
.more-tabs {
|
||||
mask: url("resource://devtools/client/debugger/new/images/command-chevron.svg") no-repeat;
|
||||
mask-size: 100%;
|
||||
width: 12px;
|
||||
display: block;
|
||||
background: var(--theme-body-color);
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
html[dir="rtl"] .img.more-tabs {
|
||||
transform: rotate(180deg);
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.dropdown li {
|
||||
transition: all 0.25s ease;
|
||||
padding: 2px 10px 10px 5px;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -2,5 +2,5 @@
|
|||
- 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/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 60 14">
|
||||
<path id="base-path" d="M53.07.5H1.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h51.57a2 2 0 0 0 1.53-.7L59.3 7l-4.7-5.8a2 2 0 0 0-1.53-.7z/>
|
||||
<path id="base-path" d="M53.07.5H1.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h51.57a2 2 0 0 0 1.53-.7L59.3 7l-4.7-5.8a2 2 0 0 0-1.53-.7z"/>
|
||||
</svg>
|
||||
|
|
До Ширина: | Высота: | Размер: 454 B После Ширина: | Высота: | Размер: 455 B |
|
@ -52,12 +52,9 @@ class Breakpoint extends PureComponent<Props> {
|
|||
|
||||
const sourceId = selectedSource.id;
|
||||
const line = toEditorLine(sourceId, breakpoint.location.line);
|
||||
const doc = getDocument(sourceId);
|
||||
|
||||
editor.codeMirror.setGutterMarker(
|
||||
line,
|
||||
"breakpoints",
|
||||
makeMarker(breakpoint.disabled)
|
||||
);
|
||||
doc.setGutterMarker(line, "breakpoints", makeMarker(breakpoint.disabled));
|
||||
|
||||
editor.codeMirror.addLineClass(line, "line", "new-breakpoint");
|
||||
if (breakpoint.condition) {
|
||||
|
@ -80,31 +77,21 @@ class Breakpoint extends PureComponent<Props> {
|
|||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const { editor, breakpoint, selectedSource } = this.props;
|
||||
|
||||
if (!selectedSource) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (breakpoint.loading) {
|
||||
const { breakpoint, selectedSource } = this.props;
|
||||
if (!selectedSource || breakpoint.loading) {
|
||||
return;
|
||||
}
|
||||
|
||||
const sourceId = selectedSource.id;
|
||||
const doc = getDocument(sourceId);
|
||||
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
|
||||
const line = toEditorLine(sourceId, breakpoint.location.line);
|
||||
|
||||
// NOTE: when we upgrade codemirror we can use `doc.setGutterMarker`
|
||||
if (doc.setGutterMarker) {
|
||||
doc.setGutterMarker(line, "breakpoints", null);
|
||||
} else {
|
||||
editor.codeMirror.setGutterMarker(line, "breakpoints", null);
|
||||
}
|
||||
|
||||
doc.removeLineClass(line, "line", "new-breakpoint");
|
||||
doc.removeLineClass(line, "line", "has-condition");
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@ import Breakpoint from "./Breakpoint";
|
|||
|
||||
import { getSelectedSource, getFirstVisibleBreakpoints } from "../../selectors";
|
||||
import { makeLocationId } from "../../utils/breakpoint";
|
||||
import { isLoaded } from "../../utils/source";
|
||||
import { connect } from "../../utils/connect";
|
||||
|
||||
import type { Breakpoint as BreakpointType, Source } from "../../types";
|
||||
|
@ -20,18 +19,10 @@ type Props = {
|
|||
};
|
||||
|
||||
class Breakpoints extends Component<Props> {
|
||||
shouldComponentUpdate(nextProps: Props) {
|
||||
if (nextProps.selectedSource && !isLoaded(nextProps.selectedSource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
render() {
|
||||
const { breakpoints, selectedSource, editor } = this.props;
|
||||
|
||||
if (!selectedSource || !breakpoints || selectedSource.isBlackBoxed) {
|
||||
if (!breakpoints || selectedSource.isBlackBoxed) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,14 @@ export class HighlightLine extends Component<Props> {
|
|||
return this.shouldSetHighlightLine(selectedLocation, selectedSource);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
this.completeHighlightLine(prevProps);
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.completeHighlightLine(null);
|
||||
}
|
||||
|
||||
shouldSetHighlightLine(
|
||||
selectedLocation: SourceLocation,
|
||||
selectedSource: Source
|
||||
|
@ -72,7 +80,7 @@ export class HighlightLine extends Component<Props> {
|
|||
return true;
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
completeHighlightLine(prevProps: Props | null) {
|
||||
const {
|
||||
pauseCommand,
|
||||
selectedLocation,
|
||||
|
@ -84,10 +92,12 @@ export class HighlightLine extends Component<Props> {
|
|||
}
|
||||
|
||||
startOperation();
|
||||
if (prevProps) {
|
||||
this.clearHighlightLine(
|
||||
prevProps.selectedLocation,
|
||||
prevProps.selectedSource
|
||||
);
|
||||
}
|
||||
this.setHighlightLine(selectedLocation, selectedFrame, selectedSource);
|
||||
endOperation();
|
||||
}
|
||||
|
@ -101,6 +111,7 @@ export class HighlightLine extends Component<Props> {
|
|||
if (!this.shouldSetHighlightLine(selectedLocation, selectedSource)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.isStepping = false;
|
||||
const editorLine = toEditorLine(sourceId, line);
|
||||
this.previousEditorLine = editorLine;
|
||||
|
|
|
@ -165,7 +165,7 @@ class Tabs extends PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
const Panel = <ul>{hiddenTabs.map(this.renderDropdownSource)}</ul>;
|
||||
const icon = <AccessibleImage className="moreTabs" />;
|
||||
const icon = <AccessibleImage className="more-tabs" />;
|
||||
|
||||
return <Dropdown panel={Panel} icon={icon} />;
|
||||
}
|
||||
|
|
|
@ -576,7 +576,7 @@ class Editor extends PureComponent<Props, State> {
|
|||
const { horizontal, selectedSource, conditionalPanelLocation } = this.props;
|
||||
const { editor } = this.state;
|
||||
|
||||
if (!editor || !selectedSource) {
|
||||
if (!selectedSource || !editor || !getDocument(selectedSource.id)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import actions from "../../actions";
|
|||
import {
|
||||
getRelativeSources,
|
||||
getActiveSearch,
|
||||
getProjectDirectoryRoot,
|
||||
getSelectedPrimaryPaneTab,
|
||||
getThreads
|
||||
} from "../../selectors";
|
||||
|
@ -36,6 +37,7 @@ type Props = {
|
|||
selectedTab: SelectedPrimaryPaneTabType,
|
||||
sources: SourcesMapByThread,
|
||||
horizontal: boolean,
|
||||
projectRoot: string,
|
||||
sourceSearchOn: boolean,
|
||||
setPrimaryPaneTab: typeof actions.setPrimaryPaneTab,
|
||||
setActiveSearch: typeof actions.setActiveSearch,
|
||||
|
@ -103,7 +105,7 @@ class PrimaryPanes extends Component<Props, State> {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { selectedTab } = this.props;
|
||||
const { selectedTab, projectRoot } = this.props;
|
||||
const activeIndex = selectedTab === "sources" ? 0 : 1;
|
||||
|
||||
return (
|
||||
|
@ -115,7 +117,12 @@ class PrimaryPanes extends Component<Props, State> {
|
|||
<TabList className="source-outline-tabs">
|
||||
{this.renderOutlineTabs()}
|
||||
</TabList>
|
||||
<TabPanels className="source-outline-panel" hasFocusableContent>
|
||||
<TabPanels
|
||||
className={classnames("source-outline-panel", {
|
||||
"has-root": projectRoot
|
||||
})}
|
||||
hasFocusableContent
|
||||
>
|
||||
<div>{this.renderThreadSources()}</div>
|
||||
<Outline
|
||||
alphabetizeOutline={this.state.alphabetizeOutline}
|
||||
|
@ -131,7 +138,8 @@ const mapStateToProps = state => ({
|
|||
selectedTab: getSelectedPrimaryPaneTab(state),
|
||||
sources: getRelativeSources(state),
|
||||
sourceSearchOn: getActiveSearch(state) === "source",
|
||||
threads: getThreads(state)
|
||||
threads: getThreads(state),
|
||||
projectRoot: getProjectDirectoryRoot(state)
|
||||
});
|
||||
|
||||
const connector = connect(
|
||||
|
|
|
@ -393,7 +393,7 @@ function generateDefaults(overrides) {
|
|||
autoExpandAll: true,
|
||||
selectSource: jest.fn(),
|
||||
setExpandedState: jest.fn(),
|
||||
sources: defaultSources,
|
||||
sources: { FakeThread: defaultSources },
|
||||
debuggeeUrl: "http://mdn.com",
|
||||
clearProjectDirectoryRoot: jest.fn(),
|
||||
setProjectDirectoryRoot: jest.fn(),
|
||||
|
|
|
@ -186,7 +186,7 @@ class SecondaryPanes extends Component<Props, State> {
|
|||
buttons.push(
|
||||
debugBtn(
|
||||
evt => {
|
||||
if (prefs.expressionsVisible) {
|
||||
if (prefs.xhrBreakpointsVisible) {
|
||||
evt.stopPropagation();
|
||||
}
|
||||
this.setState({ showXHRInput: true });
|
||||
|
|
|
@ -45,6 +45,7 @@ export class Dropdown extends Component<Props, State> {
|
|||
|
||||
renderButton() {
|
||||
return (
|
||||
// eslint-disable-next-line prettier/prettier
|
||||
<button className="dropdown-button" onClick={this.toggleDropdown}>
|
||||
{this.props.icon}
|
||||
</button>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
// @flow
|
||||
/**
|
||||
* This file maps the SVG React Components in the assets/images directory.
|
||||
* This file maps the SVG React Components in the images directory.
|
||||
*/
|
||||
|
||||
import Svg from "../../../images/Svg";
|
||||
|
|
|
@ -38,7 +38,7 @@ export const statusType = {
|
|||
export type ResultList = Search[];
|
||||
export type ProjectTextSearchState = {
|
||||
+query: string,
|
||||
+ongoingSearch?: SearchOperation,
|
||||
+ongoingSearch: ?SearchOperation,
|
||||
+results: ResultList,
|
||||
+status: string
|
||||
};
|
||||
|
@ -47,6 +47,7 @@ export function initialProjectTextSearchState(): ProjectTextSearchState {
|
|||
return {
|
||||
query: "",
|
||||
results: [],
|
||||
ongoingSearch: null,
|
||||
status: statusType.initial
|
||||
};
|
||||
}
|
||||
|
@ -80,7 +81,9 @@ function update(
|
|||
return { ...state, results: [...results, result] };
|
||||
|
||||
case "UPDATE_STATUS":
|
||||
return { ...state, status: action.status };
|
||||
const ongoingSearch =
|
||||
action.status == statusType.fetching ? state.ongoingSearch : null;
|
||||
return { ...state, status: action.status, ongoingSearch };
|
||||
|
||||
case "CLEAR_SEARCH_RESULTS":
|
||||
return { ...state, results: [] };
|
||||
|
|
|
@ -48,6 +48,10 @@ add_task(async function() {
|
|||
ok(true, "Original sources exist");
|
||||
const bundleSrc = findSource(dbg, "bundle.js");
|
||||
|
||||
// Check that the original sources appear in the source tree
|
||||
await clickElement(dbg, "sourceDirectoryLabel", 3);
|
||||
await assertSourceCount(dbg, 8);
|
||||
|
||||
await selectSource(dbg, bundleSrc);
|
||||
|
||||
await clickGutter(dbg, 13);
|
||||
|
|
Двоичные данные
devtools/client/shared/source-map/assets/dwarf_to_json.wasm
Двоичные данные
devtools/client/shared/source-map/assets/dwarf_to_json.wasm
Двоичный файл не отображается.
|
@ -4208,12 +4208,15 @@ function convertDwarf(wasm, instance) {
|
|||
new Uint8Array(memory.buffer, wasmPtr, wasm.byteLength).set(new Uint8Array(wasm));
|
||||
const resultPtr = alloc_mem(12);
|
||||
const enableXScopes = true;
|
||||
convert_dwarf(wasmPtr, wasm.byteLength, resultPtr, resultPtr + 4, enableXScopes);
|
||||
const success = convert_dwarf(wasmPtr, wasm.byteLength, resultPtr, resultPtr + 4, enableXScopes);
|
||||
free_mem(wasmPtr);
|
||||
const resultView = new DataView(memory.buffer, resultPtr, 12);
|
||||
const outputPtr = resultView.getUint32(0, true),
|
||||
outputLen = resultView.getUint32(4, true);
|
||||
free_mem(resultPtr);
|
||||
if (!success) {
|
||||
throw new Error("Unable to convert from DWARF sections");
|
||||
}
|
||||
if (!utf8Decoder) {
|
||||
utf8Decoder = new TextDecoder("utf-8");
|
||||
}
|
||||
|
|
|
@ -23,15 +23,11 @@ JSObject* SVGAnimatedLength::WrapObject(JSContext* aCx,
|
|||
}
|
||||
|
||||
already_AddRefed<DOMSVGLength> SVGAnimatedLength::BaseVal() {
|
||||
RefPtr<DOMSVGLength> angle;
|
||||
mVal->ToDOMBaseVal(getter_AddRefs(angle), mSVGElement);
|
||||
return angle.forget();
|
||||
return mVal->ToDOMBaseVal(mSVGElement);
|
||||
}
|
||||
|
||||
already_AddRefed<DOMSVGLength> SVGAnimatedLength::AnimVal() {
|
||||
RefPtr<DOMSVGLength> angle;
|
||||
mVal->ToDOMAnimVal(getter_AddRefs(angle), mSVGElement);
|
||||
return angle.forget();
|
||||
return mVal->ToDOMAnimVal(mSVGElement);
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -307,22 +307,14 @@ nsresult nsSVGLength2::NewValueSpecifiedUnits(uint16_t unitType,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult nsSVGLength2::ToDOMBaseVal(DOMSVGLength** aResult,
|
||||
already_AddRefed<DOMSVGLength> nsSVGLength2::ToDOMBaseVal(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGLength> domBaseVal =
|
||||
DOMSVGLength::GetTearOff(this, aSVGElement, false);
|
||||
|
||||
domBaseVal.forget(aResult);
|
||||
return NS_OK;
|
||||
return DOMSVGLength::GetTearOff(this, aSVGElement, false);
|
||||
}
|
||||
|
||||
nsresult nsSVGLength2::ToDOMAnimVal(DOMSVGLength** aResult,
|
||||
already_AddRefed<DOMSVGLength> nsSVGLength2::ToDOMAnimVal(
|
||||
SVGElement* aSVGElement) {
|
||||
RefPtr<DOMSVGLength> domAnimVal =
|
||||
DOMSVGLength::GetTearOff(this, aSVGElement, true);
|
||||
|
||||
domAnimVal.forget(aResult);
|
||||
return NS_OK;
|
||||
return DOMSVGLength::GetTearOff(this, aSVGElement, true);
|
||||
}
|
||||
|
||||
/* Implementation */
|
||||
|
|
|
@ -86,9 +86,10 @@ class NonSVGFrameUserSpaceMetrics : public UserSpaceMetricsWithSize {
|
|||
class nsSVGLength2 {
|
||||
friend class mozilla::dom::SVGAnimatedLength;
|
||||
friend class mozilla::dom::DOMSVGLength;
|
||||
typedef mozilla::dom::UserSpaceMetrics UserSpaceMetrics;
|
||||
typedef mozilla::dom::DOMSVGLength DOMSVGLength;
|
||||
typedef mozilla::dom::SVGElement SVGElement;
|
||||
typedef mozilla::dom::SVGViewportElement SVGViewportElement;
|
||||
typedef mozilla::dom::UserSpaceMetrics UserSpaceMetrics;
|
||||
typedef mozilla::SVGContentUtils SVGContentUtils;
|
||||
|
||||
public:
|
||||
|
@ -191,10 +192,8 @@ class nsSVGLength2 {
|
|||
nsresult NewValueSpecifiedUnits(uint16_t aUnitType, float aValue,
|
||||
SVGElement* aSVGElement);
|
||||
nsresult ConvertToSpecifiedUnits(uint16_t aUnitType, SVGElement* aSVGElement);
|
||||
nsresult ToDOMBaseVal(mozilla::dom::DOMSVGLength** aResult,
|
||||
SVGElement* aSVGElement);
|
||||
nsresult ToDOMAnimVal(mozilla::dom::DOMSVGLength** aResult,
|
||||
SVGElement* aSVGElement);
|
||||
already_AddRefed<DOMSVGLength> ToDOMBaseVal(SVGElement* aSVGElement);
|
||||
already_AddRefed<DOMSVGLength> ToDOMAnimVal(SVGElement* aSVGElement);
|
||||
|
||||
public:
|
||||
struct SMILLength : public nsISMILAttr {
|
||||
|
|
|
@ -1193,7 +1193,8 @@ void CodeGenerator::visitUnbox(LUnbox* unbox) {
|
|||
ValueOperand input = ToValue(unbox, LUnbox::Input);
|
||||
ScratchTagScope scratch(masm, input);
|
||||
masm.splitTagForTest(input, scratch);
|
||||
masm.branch32(Assembler::Condition::Equal, scratch, Imm32(tag), &ok);
|
||||
masm.cmpTag(scratch, ImmTag(tag));
|
||||
masm.B(&ok, Assembler::Condition::Equal);
|
||||
masm.assumeUnreachable("Infallible unbox type mismatch");
|
||||
masm.bind(&ok);
|
||||
#endif
|
||||
|
|
|
@ -394,18 +394,18 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
Orr(ARMRegister(dest, 64), ARMRegister(src, 64),
|
||||
Operand(ImmShiftedTag(type).value));
|
||||
}
|
||||
void splitTag(Register src, Register dest) {
|
||||
ubfx(ARMRegister(dest, 64), ARMRegister(src, 64), JSVAL_TAG_SHIFT,
|
||||
void splitSignExtTag(Register src, Register dest) {
|
||||
sbfx(ARMRegister(dest, 64), ARMRegister(src, 64), JSVAL_TAG_SHIFT,
|
||||
(64 - JSVAL_TAG_SHIFT));
|
||||
}
|
||||
MOZ_MUST_USE Register extractTag(const Address& address, Register scratch) {
|
||||
loadPtr(address, scratch);
|
||||
splitTag(scratch, scratch);
|
||||
splitSignExtTag(scratch, scratch);
|
||||
return scratch;
|
||||
}
|
||||
MOZ_MUST_USE Register extractTag(const ValueOperand& value,
|
||||
Register scratch) {
|
||||
splitTag(value.valueReg(), scratch);
|
||||
splitSignExtTag(value.valueReg(), scratch);
|
||||
return scratch;
|
||||
}
|
||||
MOZ_MUST_USE Register extractObject(const Address& address,
|
||||
|
@ -1000,6 +1000,10 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
Cmp(scratch32, Operand(ARMRegister(lhs, 32)));
|
||||
}
|
||||
|
||||
void cmn32(Register lhs, Imm32 rhs) {
|
||||
Cmn(ARMRegister(lhs, 32), Operand(rhs.value));
|
||||
}
|
||||
|
||||
void cmpPtr(Register lhs, Imm32 rhs) {
|
||||
Cmp(ARMRegister(lhs, 64), Operand(rhs.value));
|
||||
}
|
||||
|
@ -1130,16 +1134,16 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
MOZ_CRASH("moveFloatAsDouble");
|
||||
}
|
||||
|
||||
void splitTag(const ValueOperand& operand, Register dest) {
|
||||
splitTag(operand.valueReg(), dest);
|
||||
void splitSignExtTag(const ValueOperand& operand, Register dest) {
|
||||
splitSignExtTag(operand.valueReg(), dest);
|
||||
}
|
||||
void splitTag(const Address& operand, Register dest) {
|
||||
void splitSignExtTag(const Address& operand, Register dest) {
|
||||
loadPtr(operand, dest);
|
||||
splitTag(dest, dest);
|
||||
splitSignExtTag(dest, dest);
|
||||
}
|
||||
void splitTag(const BaseIndex& operand, Register dest) {
|
||||
void splitSignExtTag(const BaseIndex& operand, Register dest) {
|
||||
loadPtr(operand, dest);
|
||||
splitTag(dest, dest);
|
||||
splitSignExtTag(dest, dest);
|
||||
}
|
||||
|
||||
// Extracts the tag of a value and places it in tag
|
||||
|
@ -1412,65 +1416,101 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
Fmov(ARMFPRegister(dest, 32), f);
|
||||
}
|
||||
|
||||
void cmpTag(Register tag, ImmTag ref) {
|
||||
// As opposed to other architecture, splitTag is replaced by splitSignExtTag
|
||||
// which extract the tag with a sign extension. The reason being that cmp32
|
||||
// with a tag value would be too large to fit as a 12 bits immediate value,
|
||||
// and would require the VIXL macro assembler to add an extra instruction
|
||||
// and require extra scratch register to load the Tag value.
|
||||
//
|
||||
// Instead, we compare with the negative value of the sign extended tag with
|
||||
// the CMN instruction. The sign extended tag is expected to be a negative
|
||||
// value. Therefore the negative of the sign extended tag is expected to be
|
||||
// near 0 and fit on 12 bits.
|
||||
//
|
||||
// Ignoring the sign extension, the logic is the following:
|
||||
//
|
||||
// CMP32(Reg, Tag) = Reg - Tag
|
||||
// = Reg + (-Tag)
|
||||
// = CMN32(Reg, -Tag)
|
||||
//
|
||||
// Note: testGCThing, testPrimitive and testNumber which are checking for
|
||||
// inequalities should use unsigned comparisons (as done by default) in
|
||||
// order to keep the same relation order after the sign extension, i.e.
|
||||
// using Above or Below which are based on the carry flag.
|
||||
uint32_t hiShift = JSVAL_TAG_SHIFT - 32;
|
||||
int32_t seTag = int32_t(ref.value);
|
||||
seTag = (seTag << hiShift) >> hiShift;
|
||||
MOZ_ASSERT(seTag < 0);
|
||||
int32_t negTag = -seTag;
|
||||
// Check thest negTag is encoded on a 12 bits immediate value.
|
||||
MOZ_ASSERT((negTag & ~0xFFF) == 0);
|
||||
cmn32(tag, Imm32(negTag));
|
||||
}
|
||||
|
||||
// Register-based tests.
|
||||
Condition testUndefined(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_UNDEFINED));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_UNDEFINED));
|
||||
return cond;
|
||||
}
|
||||
Condition testInt32(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_INT32));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_INT32));
|
||||
return cond;
|
||||
}
|
||||
Condition testBoolean(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_BOOLEAN));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_BOOLEAN));
|
||||
return cond;
|
||||
}
|
||||
Condition testNull(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_NULL));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_NULL));
|
||||
return cond;
|
||||
}
|
||||
Condition testString(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_STRING));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_STRING));
|
||||
return cond;
|
||||
}
|
||||
Condition testSymbol(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_SYMBOL));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_SYMBOL));
|
||||
return cond;
|
||||
}
|
||||
Condition testObject(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_OBJECT));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_OBJECT));
|
||||
return cond;
|
||||
}
|
||||
Condition testDouble(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, Imm32(JSVAL_TAG_MAX_DOUBLE));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_MAX_DOUBLE));
|
||||
// Requires unsigned comparison due to cmpTag internals.
|
||||
return (cond == Equal) ? BelowOrEqual : Above;
|
||||
}
|
||||
Condition testNumber(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, Imm32(JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET));
|
||||
cmpTag(tag, ImmTag(JSVAL_UPPER_INCL_TAG_OF_NUMBER_SET));
|
||||
// Requires unsigned comparison due to cmpTag internals.
|
||||
return (cond == Equal) ? BelowOrEqual : Above;
|
||||
}
|
||||
Condition testGCThing(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, Imm32(JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET));
|
||||
cmpTag(tag, ImmTag(JSVAL_LOWER_INCL_TAG_OF_GCTHING_SET));
|
||||
// Requires unsigned comparison due to cmpTag internals.
|
||||
return (cond == Equal) ? AboveOrEqual : Below;
|
||||
}
|
||||
Condition testMagic(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, ImmTag(JSVAL_TAG_MAGIC));
|
||||
cmpTag(tag, ImmTag(JSVAL_TAG_MAGIC));
|
||||
return cond;
|
||||
}
|
||||
Condition testPrimitive(Condition cond, Register tag) {
|
||||
MOZ_ASSERT(cond == Equal || cond == NotEqual);
|
||||
cmp32(tag, Imm32(JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET));
|
||||
cmpTag(tag, ImmTag(JSVAL_UPPER_EXCL_TAG_OF_PRIMITIVE_SET));
|
||||
// Requires unsigned comparison due to cmpTag internals.
|
||||
return (cond == Equal) ? Below : AboveOrEqual;
|
||||
}
|
||||
Condition testError(Condition cond, Register tag) {
|
||||
|
@ -1481,107 +1521,80 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
Condition testInt32(Condition cond, const ValueOperand& value) {
|
||||
// The incoming ValueOperand may use scratch registers.
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
|
||||
if (value.valueReg() == ScratchReg2) {
|
||||
MOZ_ASSERT(temps.IsAvailable(ScratchReg64));
|
||||
MOZ_ASSERT(!temps.IsAvailable(ScratchReg2_64));
|
||||
temps.Exclude(ScratchReg64);
|
||||
|
||||
if (cond != Equal && cond != NotEqual) {
|
||||
MOZ_CRASH("NYI: non-equality comparisons");
|
||||
}
|
||||
|
||||
// In the event that the tag is not encodable in a single cmp / teq
|
||||
// instruction, perform the xor that teq would use, this will leave the
|
||||
// tag bits being zero, or non-zero, which can be tested with either and
|
||||
// or shift.
|
||||
unsigned int n, imm_r, imm_s;
|
||||
uint64_t immediate = uint64_t(ImmTag(JSVAL_TAG_INT32).value)
|
||||
<< JSVAL_TAG_SHIFT;
|
||||
if (IsImmLogical(immediate, 64, &n, &imm_s, &imm_r)) {
|
||||
Eor(ScratchReg64, ScratchReg2_64, Operand(immediate));
|
||||
} else {
|
||||
Mov(ScratchReg64, immediate);
|
||||
Eor(ScratchReg64, ScratchReg2_64, ScratchReg64);
|
||||
}
|
||||
Tst(ScratchReg64, Operand((unsigned long long)(-1ll) << JSVAL_TAG_SHIFT));
|
||||
return cond;
|
||||
}
|
||||
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(scratch != value.valueReg());
|
||||
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testInt32(cond, scratch);
|
||||
}
|
||||
Condition testBoolean(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testBoolean(cond, scratch);
|
||||
}
|
||||
Condition testDouble(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testDouble(cond, scratch);
|
||||
}
|
||||
Condition testNull(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testNull(cond, scratch);
|
||||
}
|
||||
Condition testUndefined(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testUndefined(cond, scratch);
|
||||
}
|
||||
Condition testString(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testString(cond, scratch);
|
||||
}
|
||||
Condition testSymbol(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testSymbol(cond, scratch);
|
||||
}
|
||||
Condition testObject(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testObject(cond, scratch);
|
||||
}
|
||||
Condition testNumber(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testNumber(cond, scratch);
|
||||
}
|
||||
Condition testPrimitive(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testPrimitive(cond, scratch);
|
||||
}
|
||||
Condition testMagic(Condition cond, const ValueOperand& value) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(value.valueReg() != scratch);
|
||||
splitTag(value, scratch);
|
||||
splitSignExtTag(value, scratch);
|
||||
return testMagic(cond, scratch);
|
||||
}
|
||||
Condition testError(Condition cond, const ValueOperand& value) {
|
||||
|
@ -1593,77 +1606,77 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testGCThing(cond, scratch);
|
||||
}
|
||||
Condition testMagic(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testMagic(cond, scratch);
|
||||
}
|
||||
Condition testInt32(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testInt32(cond, scratch);
|
||||
}
|
||||
Condition testDouble(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testDouble(cond, scratch);
|
||||
}
|
||||
Condition testBoolean(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testBoolean(cond, scratch);
|
||||
}
|
||||
Condition testNull(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testNull(cond, scratch);
|
||||
}
|
||||
Condition testUndefined(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testUndefined(cond, scratch);
|
||||
}
|
||||
Condition testString(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testString(cond, scratch);
|
||||
}
|
||||
Condition testSymbol(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testSymbol(cond, scratch);
|
||||
}
|
||||
Condition testObject(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testObject(cond, scratch);
|
||||
}
|
||||
Condition testNumber(Condition cond, const Address& address) {
|
||||
vixl::UseScratchRegisterScope temps(this);
|
||||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(address.base != scratch);
|
||||
splitTag(address, scratch);
|
||||
splitSignExtTag(address, scratch);
|
||||
return testNumber(cond, scratch);
|
||||
}
|
||||
|
||||
|
@ -1673,7 +1686,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testUndefined(cond, scratch);
|
||||
}
|
||||
Condition testNull(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1681,7 +1694,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testNull(cond, scratch);
|
||||
}
|
||||
Condition testBoolean(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1689,7 +1702,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testBoolean(cond, scratch);
|
||||
}
|
||||
Condition testString(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1697,7 +1710,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testString(cond, scratch);
|
||||
}
|
||||
Condition testSymbol(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1705,7 +1718,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testSymbol(cond, scratch);
|
||||
}
|
||||
Condition testInt32(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1713,7 +1726,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testInt32(cond, scratch);
|
||||
}
|
||||
Condition testObject(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1721,7 +1734,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testObject(cond, scratch);
|
||||
}
|
||||
Condition testDouble(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1729,7 +1742,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testDouble(cond, scratch);
|
||||
}
|
||||
Condition testMagic(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1737,7 +1750,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testMagic(cond, scratch);
|
||||
}
|
||||
Condition testGCThing(Condition cond, const BaseIndex& src) {
|
||||
|
@ -1745,7 +1758,7 @@ class MacroAssemblerCompat : public vixl::MacroAssembler {
|
|||
const Register scratch = temps.AcquireX().asUnsized();
|
||||
MOZ_ASSERT(src.base != scratch);
|
||||
MOZ_ASSERT(src.index != scratch);
|
||||
splitTag(src, scratch);
|
||||
splitSignExtTag(src, scratch);
|
||||
return testGCThing(cond, scratch);
|
||||
}
|
||||
|
||||
|
@ -2068,7 +2081,7 @@ class ScratchTagScopeRelease {
|
|||
|
||||
inline void MacroAssemblerCompat::splitTagForTest(const ValueOperand& value,
|
||||
ScratchTagScope& tag) {
|
||||
splitTag(value, tag);
|
||||
splitSignExtTag(value, tag);
|
||||
}
|
||||
|
||||
typedef MacroAssemblerCompat MacroAssemblerSpecific;
|
||||
|
|
|
@ -1120,7 +1120,7 @@ VARCACHE_PREF(
|
|||
)
|
||||
#undef PREF_VALUE
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#if defined(XP_WIN) && !defined(_ARM64_)
|
||||
# define PREF_VALUE true
|
||||
#else
|
||||
# define PREF_VALUE false
|
||||
|
@ -1441,7 +1441,7 @@ VARCACHE_PREF(
|
|||
)
|
||||
|
||||
// AV1
|
||||
#if defined(XP_WIN)
|
||||
#if defined(XP_WIN) && !defined(_ARM64_)
|
||||
# define PREF_VALUE true
|
||||
#else
|
||||
# define PREF_VALUE false
|
||||
|
|
|
@ -645,7 +645,7 @@ pref("media.cubeb.sandbox", false);
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_AV1
|
||||
#if defined(XP_WIN)
|
||||
#if defined(XP_WIN) && !defined(_ARM64_)
|
||||
pref("media.av1.enabled", true);
|
||||
#else
|
||||
pref("media.av1.enabled", false);
|
||||
|
|
Двоичные данные
third_party/python/psutil-cp27-none-win_amd64/psutil/_psutil_windows.pyd
поставляемый
Двоичные данные
third_party/python/psutil-cp27-none-win_amd64/psutil/_psutil_windows.pyd
поставляемый
Двоичный файл не отображается.
|
@ -54,7 +54,7 @@ class GCData {
|
|||
for (let i = 0; i < data.slices_list.length; i++) {
|
||||
let slice = data.slices_list[i];
|
||||
slice.start_timestamp = fixup(slice.start_timestamp);
|
||||
slice.end_timestamp = fixup(slice.end_timestamp);
|
||||
// Slices have no end_timestamp, instead they have a duration.
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,12 @@ function do_register_cleanup() {
|
|||
*/
|
||||
|
||||
function run_test() {
|
||||
// The limit on the number of fields in a GCMajor object.
|
||||
const limit = 24;
|
||||
|
||||
// The number of fields that the make_gc() test function generates.
|
||||
const make_gc_fields = 19;
|
||||
|
||||
// Test initialisation
|
||||
Assert.ok(GCTelemetry.init(), "Initialize success");
|
||||
Assert.ok(!GCTelemetry.init(), "Wont initialize twice");
|
||||
|
@ -30,7 +36,7 @@ function run_test() {
|
|||
GCTelemetry.observeRaw(make_gc());
|
||||
// Get it back.
|
||||
assert_num_entries(1, false);
|
||||
Assert.equal(19, Object.keys(get_entry()).length);
|
||||
Assert.equal(make_gc_fields, Object.keys(get_entry()).length);
|
||||
// "true" will cause the entry to be clared.
|
||||
assert_num_entries(1, true);
|
||||
// There are currently no entries.
|
||||
|
@ -47,23 +53,24 @@ function run_test() {
|
|||
assert_num_entries(1, true);
|
||||
assert_num_entries(0, false);
|
||||
|
||||
// Exactly the limit of fields.
|
||||
let my_gc_24 = make_gc();
|
||||
for (let i = 0; i < 5; i++) {
|
||||
my_gc_24["new_property_" + i] = "Data";
|
||||
let my_gc_exact = make_gc();
|
||||
Assert.equal(make_gc_fields, Object.keys(my_gc_exact).length);
|
||||
|
||||
for (let i = 0; i < limit - make_gc_fields; i++) {
|
||||
my_gc_exact["new_property_" + i] = "Data";
|
||||
}
|
||||
GCTelemetry.observeRaw(my_gc_24);
|
||||
// Assert that it was recorded has all 24 fields.
|
||||
Assert.equal(24, Object.keys(get_entry()).length);
|
||||
GCTelemetry.observeRaw(my_gc_exact);
|
||||
// Assert that it was recorded has all the fields.
|
||||
Assert.equal(limit, Object.keys(get_entry()).length);
|
||||
assert_num_entries(1, true);
|
||||
assert_num_entries(0, false);
|
||||
|
||||
// Exactly too many fields.
|
||||
let my_gc_25 = make_gc();
|
||||
for (let i = 0; i < 6; i++) {
|
||||
my_gc_25["new_property_" + i] = "Data";
|
||||
let my_gc_too_many = make_gc();
|
||||
for (let i = 0; i < limit - make_gc_fields + 1; i++) {
|
||||
my_gc_too_many["new_property_" + i] = "Data";
|
||||
}
|
||||
GCTelemetry.observeRaw(my_gc_25);
|
||||
GCTelemetry.observeRaw(my_gc_too_many);
|
||||
// Assert that it was recorded but has only 7 fields.
|
||||
Assert.equal(7, Object.keys(get_entry()).length);
|
||||
assert_num_entries(1, true);
|
||||
|
|
|
@ -6,7 +6,7 @@ url-classifier-title = URL Classifier Information
|
|||
url-classifier-search-title = Search
|
||||
url-classifier-search-result-title = Results
|
||||
url-classifier-search-result-uri = URI: { $uri }
|
||||
url-classifier-search-result-list = Table list: { $list }
|
||||
url-classifier-search-result-list = List of tables: { $list }
|
||||
url-classifier-search-input = URL
|
||||
url-classifier-search-error-invalid-url = Invalid URL
|
||||
url-classifier-search-error-no-features = No features selected
|
||||
|
|
Загрузка…
Ссылка в новой задаче