Merge m-c to fx-team. a=merge
|
@ -37,6 +37,10 @@ component {1a94c87a-5ece-4d11-91e1-d29c29f21b28} ProcessGlobal.js
|
|||
contract @mozilla.org/b2g-process-global;1 {1a94c87a-5ece-4d11-91e1-d29c29f21b28}
|
||||
category app-startup ProcessGlobal service,@mozilla.org/b2g-process-global;1
|
||||
|
||||
# OMAContentHandler.js
|
||||
component {a6b2ab13-9037-423a-9897-dde1081be323} OMAContentHandler.js
|
||||
contract @mozilla.org/uriloader/content-handler;1?type=application/vnd.oma.drm.message {a6b2ab13-9037-423a-9897-dde1081be323}
|
||||
|
||||
# PaymentGlue.js
|
||||
component {8b83eabc-7929-47f4-8b48-4dea8d887e4b} PaymentGlue.js
|
||||
contract @mozilla.org/payment/ui-glue;1 {8b83eabc-7929-47f4-8b48-4dea8d887e4b}
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
const Cr = Components.results;
|
||||
const Cu = Components.utils;
|
||||
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
XPCOMUtils.defineLazyGetter(this, "cpmm", function() {
|
||||
return Cc["@mozilla.org/childprocessmessagemanager;1"]
|
||||
.getService(Ci.nsIMessageSender);
|
||||
});
|
||||
|
||||
function debug(aMsg) {
|
||||
//dump("--*-- OMAContentHandler: " + aMsg + "\n");
|
||||
}
|
||||
|
||||
const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
|
||||
|
||||
function OMAContentHandler() {
|
||||
}
|
||||
|
||||
OMAContentHandler.prototype = {
|
||||
classID: Components.ID("{a6b2ab13-9037-423a-9897-dde1081be323}"),
|
||||
|
||||
_xpcom_factory: {
|
||||
createInstance: function createInstance(outer, iid) {
|
||||
if (outer != null) {
|
||||
throw Cr.NS_ERROR_NO_AGGREGATION;
|
||||
}
|
||||
return new OMAContentHandler().QueryInterface(iid);
|
||||
}
|
||||
},
|
||||
|
||||
handleContent: function handleContent(aMimetype, aContext, aRequest) {
|
||||
if (!(aRequest instanceof Ci.nsIChannel)) {
|
||||
throw NS_ERROR_WONT_HANDLE_CONTENT;
|
||||
}
|
||||
|
||||
let detail = {
|
||||
"type": aMimetype,
|
||||
"url": aRequest.URI.spec
|
||||
};
|
||||
cpmm.sendAsyncMessage("content-handler", detail);
|
||||
|
||||
aRequest.cancel(Cr.NS_BINDING_ABORTED);
|
||||
},
|
||||
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIContentHandler])
|
||||
}
|
||||
|
||||
this.NSGetFactory = XPCOMUtils.generateNSGetFactory([OMAContentHandler]);
|
|
@ -16,6 +16,7 @@ EXTRA_COMPONENTS += [
|
|||
'InterAppCommUIGlue.js',
|
||||
'MailtoProtocolHandler.js',
|
||||
'MobileIdentityUIGlue.js',
|
||||
'OMAContentHandler.js',
|
||||
'PaymentGlue.js',
|
||||
'ProcessGlobal.js',
|
||||
'SmsProtocolHandler.js',
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="3326b51017252e09ccdd715dec6c5e12a7d1ecfe"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
@ -128,7 +128,7 @@
|
|||
<project name="device/generic/armv7-a-neon" path="device/generic/armv7-a-neon" revision="3a9a17613cc685aa232432566ad6cc607eab4ec1"/>
|
||||
<project name="device_generic_goldfish" path="device/generic/goldfish" remote="b2g" revision="0e31f35a2a77301e91baa8a237aa9e9fa4076084"/>
|
||||
<project name="platform/external/libnfc-nci" path="external/libnfc-nci" revision="7d33aaf740bbf6c7c6e9c34a92b371eda311b66b"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="ab6da65e9642e66b3a4cebc9d733975f8a318de7"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="973367035a1f2545f3dad6e40e354463dc56a7f4"/>
|
||||
<project name="platform/external/wpa_supplicant_8" path="external/wpa_supplicant_8" revision="0e56e450367cd802241b27164a2979188242b95f"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="832f4acaf481a19031e479a40b03d9ce5370ddee"/>
|
||||
<project name="platform_system_nfcd" path="system/nfcd" remote="b2g" revision="d0aa65b140a45016975ed0ecf35f280dd336e1d3"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<project name="platform_build" path="build" remote="b2g" revision="276ce45e78b09c4a4ee643646f691d22804754c1">
|
||||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/i686-linux-glibc2.7-4.6" revision="f92a936f2aa97526d4593386754bdbf02db07a12"/>
|
||||
<project groups="linux" name="platform/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" path="prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.7-4.6" revision="6e47ff2790f5656b5b074407829ceecf3e6188c4"/>
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="cd88d860656c31c7da7bb310d6a160d0011b0961"/>
|
||||
<project name="platform_external_qemu" path="external/qemu" remote="b2g" revision="3326b51017252e09ccdd715dec6c5e12a7d1ecfe"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="dd924f92906085b831bf1cbbc7484d3c043d613c"/>
|
||||
<project name="platform/bionic" path="bionic" revision="c72b8f6359de7ed17c11ddc9dfdde3f615d188a9"/>
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
"remote": "",
|
||||
"branch": ""
|
||||
},
|
||||
"revision": "8aa934cd6409c5d83446942315143989bc2232e0",
|
||||
"revision": "2f82bebb6bbcad97fbbf24640db6aa99b6177ddc",
|
||||
"repo_path": "/integration/gaia-central"
|
||||
}
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
<project name="platform/bionic" path="bionic" revision="d2eb6c7b6e1bc7643c17df2d9d9bcb1704d0b9ab"/>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
|
|
|
@ -8,5 +8,3 @@ no_sccache=1
|
|||
# This file is included at the top of all b2g mozconfigs
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
|
||||
ac_add_options --disable-unified-compilation
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
</project>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<project name="valgrind" path="external/valgrind" remote="b2g" revision="daa61633c32b9606f58799a3186395fd2bbb8d8c"/>
|
||||
<project name="vex" path="external/VEX" remote="b2g" revision="47f031c320888fe9f3e656602588565b52d43010"/>
|
||||
<!-- Stock Android things -->
|
||||
|
|
|
@ -17,12 +17,12 @@
|
|||
<copyfile dest="Makefile" src="core/root.mk"/>
|
||||
</project>
|
||||
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="336c30b6147cdd9122ad0b2bbffb81eb869a9ec2"/>
|
||||
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="82e957160ca017087bd374cd051339e55b641e68"/>
|
||||
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="44b04243e31cd16f3baf54fcd4b5fecf9deb8b94"/>
|
||||
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
|
||||
<project name="librecovery" path="librecovery" remote="b2g" revision="891e5069c0ad330d8191bf8c7b879c814258c89f"/>
|
||||
<project name="moztt" path="external/moztt" remote="b2g" revision="c510babaf88dfa2cfe2c202afb2649ee124569af"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="18178e0035f603b68490f42672566d3adb33bead"/>
|
||||
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="4a7d860ef54cf6e119238b247522a85c13d17dd6"/>
|
||||
<project name="gonk-patches" path="patches" remote="b2g" revision="223a2421006e8f5da33f516f6891c87cae86b0f6"/>
|
||||
<!-- Stock Android things -->
|
||||
<project name="platform/abi/cpp" path="abi/cpp" revision="6426040f1be4a844082c9769171ce7f5341a5528"/>
|
||||
|
|
|
@ -803,7 +803,7 @@ bin/components/@DLL_PREFIX@nkgnomevfs@DLL_SUFFIX@
|
|||
@BINPATH@/components/DirectoryProvider.js
|
||||
@BINPATH@/components/ActivitiesGlue.js
|
||||
@BINPATH@/components/ProcessGlobal.js
|
||||
@BINPATH@/components/ContentHandler.js
|
||||
@BINPATH@/components/OMAContentHandler.js
|
||||
@BINPATH@/components/PaymentGlue.js
|
||||
@BINPATH@/components/YoutubeProtocolHandler.js
|
||||
@BINPATH@/components/RecoveryService.js
|
||||
|
|
|
@ -24,7 +24,10 @@ XPCOMUtils.defineLazyModuleGetter(this, "CommonUtils",
|
|||
XPCOMUtils.defineLazyModuleGetter(this, "CryptoUtils",
|
||||
"resource://services-crypto/utils.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "HAWKAuthenticatedRESTRequest",
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "HawkClient",
|
||||
"resource://services-common/hawkclient.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "deriveHawkCredentials",
|
||||
"resource://services-common/hawkrequest.js");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "MozLoopPushHandler",
|
||||
|
@ -138,27 +141,55 @@ let MozLoopServiceInternal = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Derives hawk credentials for the given token and context.
|
||||
* Performs a hawk based request to the loop server.
|
||||
*
|
||||
* @param {String} tokenHex The token value in hex.
|
||||
* @param {String} context The context for the token.
|
||||
* @param {String} path The path to make the request to.
|
||||
* @param {String} method The request method, e.g. 'POST', 'GET'.
|
||||
* @param {Object} payloadObj An object which is converted to JSON and
|
||||
* transmitted with the request.
|
||||
*/
|
||||
deriveHawkCredentials: function(tokenHex, context) {
|
||||
const PREFIX_NAME = "identity.mozilla.com/picl/v1/";
|
||||
hawkRequest: function(path, method, payloadObj) {
|
||||
if (!this._hawkClient) {
|
||||
this._hawkClient = new HawkClient(this.loopServerUri);
|
||||
}
|
||||
|
||||
let token = CommonUtils.hexToBytes(tokenHex);
|
||||
let keyWord = CommonUtils.stringToBytes(PREFIX_NAME + context);
|
||||
let sessionToken;
|
||||
try {
|
||||
sessionToken = Services.prefs.getCharPref("loop.hawk-session-token");
|
||||
} catch (x) {
|
||||
// It is ok for this not to exist, we'll default to sending no-creds
|
||||
}
|
||||
|
||||
// XXX Using 2 * 32 for now to be in sync with client.js, but we might
|
||||
// want to make this 3 * 32 to allow for extra, if we start using the extra
|
||||
// field.
|
||||
let out = CryptoUtils.hkdf(token, undefined, keyWord, 2 * 32);
|
||||
let credentials;
|
||||
if (sessionToken) {
|
||||
credentials = deriveHawkCredentials(sessionToken, "sessionToken", 2 * 32);
|
||||
}
|
||||
|
||||
return {
|
||||
algorithm: "sha256",
|
||||
key: out.slice(32, 64),
|
||||
id: CommonUtils.bytesAsHex(out.slice(0, 32))
|
||||
};
|
||||
return this._hawkClient.request(path, method, credentials, payloadObj);
|
||||
},
|
||||
|
||||
/**
|
||||
* Used to store a session token from a request if it exists in the headers.
|
||||
*
|
||||
* @param {Object} headers The request headers, which may include a
|
||||
* "hawk-session-token" to be saved.
|
||||
* @return true on success or no token, false on failure.
|
||||
*/
|
||||
storeSessionToken: function(headers) {
|
||||
let sessionToken = headers["hawk-session-token"];
|
||||
if (sessionToken) {
|
||||
// XXX should do more validation here
|
||||
if (sessionToken.length === 64) {
|
||||
Services.prefs.setCharPref("loop.hawk-session-token", sessionToken);
|
||||
} else {
|
||||
// XXX Bubble the precise details up to the UI somehow (bug 1013248).
|
||||
console.warn("Loop server sent an invalid session token");
|
||||
this._registeredDeferred.reject("session-token-wrong-size");
|
||||
this._registeredDeferred = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -184,39 +215,38 @@ let MozLoopServiceInternal = {
|
|||
* @param {Boolean} noRetry Optional, don't retry if authentication fails.
|
||||
*/
|
||||
registerWithLoopServer: function(pushUrl, noRetry) {
|
||||
let sessionToken;
|
||||
try {
|
||||
sessionToken = Services.prefs.getCharPref("loop.hawk-session-token");
|
||||
} catch (x) {
|
||||
// It is ok for this not to exist, we'll default to sending no-creds
|
||||
}
|
||||
this.hawkRequest("/registration", "POST", { simple_push_url: pushUrl})
|
||||
.then((response) => {
|
||||
// If this failed we got an invalid token. storeSessionToken rejects
|
||||
// the _registeredDeferred promise for us, so here we just need to
|
||||
// early return.
|
||||
if (!this.storeSessionToken(response.headers))
|
||||
return;
|
||||
|
||||
let credentials;
|
||||
if (sessionToken) {
|
||||
credentials = this.deriveHawkCredentials(sessionToken, "sessionToken");
|
||||
}
|
||||
this.registeredLoopServer = true;
|
||||
this._registeredDeferred.resolve();
|
||||
// No need to clear the promise here, everything was good, so we don't need
|
||||
// to re-register.
|
||||
}, (error) => {
|
||||
if (error.errno == 401) {
|
||||
if (this.urlExpiryTimeIsInFuture()) {
|
||||
// XXX Should this be reported to the user is a visible manner?
|
||||
Cu.reportError("Loop session token is invalid, all previously "
|
||||
+ "generated urls will no longer work.");
|
||||
}
|
||||
|
||||
let uri = Services.io.newURI(this.loopServerUri, null, null).resolve("/registration");
|
||||
this.loopXhr = new HAWKAuthenticatedRESTRequest(uri, credentials);
|
||||
|
||||
this.loopXhr.dispatch('POST', { simple_push_url: pushUrl }, (error) => {
|
||||
if (this.loopXhr.response.status == 401) {
|
||||
if (this.urlExpiryTimeIsInFuture()) {
|
||||
// XXX Should this be reported to the user is a visible manner?
|
||||
Cu.reportError("Loop session token is invalid, all previously "
|
||||
+ "generated urls will no longer work.");
|
||||
// Authorization failed, invalid token, we need to try again with a new token.
|
||||
Services.prefs.clearUserPref("loop.hawk-session-token");
|
||||
this.registerWithLoopServer(pushUrl, true);
|
||||
return;
|
||||
}
|
||||
|
||||
// Authorization failed, invalid token, we need to try again with a new token.
|
||||
Services.prefs.clearUserPref("loop.hawk-session-token");
|
||||
this.registerWithLoopServer(pushUrl, true);
|
||||
|
||||
return;
|
||||
// XXX Bubble the precise details up to the UI somehow (bug 1013248).
|
||||
Cu.reportError("Failed to register with the loop server. error: " + error);
|
||||
this._registeredDeferred.reject(error.errno);
|
||||
this._registeredDeferred = null;
|
||||
}
|
||||
|
||||
// No authorization issues, so complete registration.
|
||||
this.onLoopRegistered(error);
|
||||
});
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -233,43 +263,6 @@ let MozLoopServiceInternal = {
|
|||
this.openChatWindow(null, "LooP", "about:loopconversation#incoming/" + version);
|
||||
},
|
||||
|
||||
/**
|
||||
* Callback from the loopXhr. Checks the registration result.
|
||||
*/
|
||||
onLoopRegistered: function(error) {
|
||||
let status = this.loopXhr.response.status;
|
||||
if (status != 200) {
|
||||
// XXX Bubble the precise details up to the UI somehow (bug 1013248).
|
||||
Cu.reportError("Failed to register with the loop server. Code: " +
|
||||
status + " Text: " + this.loopXhr.response.statusText);
|
||||
this._registeredDeferred.reject(status);
|
||||
this._registeredDeferred = null;
|
||||
return;
|
||||
}
|
||||
|
||||
let sessionToken = this.loopXhr.response.headers["hawk-session-token"];
|
||||
if (sessionToken) {
|
||||
|
||||
// XXX should do more validation here
|
||||
if (sessionToken.length === 64) {
|
||||
|
||||
Services.prefs.setCharPref("loop.hawk-session-token", sessionToken);
|
||||
} else {
|
||||
// XXX Bubble the precise details up to the UI somehow (bug 1013248).
|
||||
console.warn("Loop server sent an invalid session token");
|
||||
this._registeredDeferred.reject("session-token-wrong-size");
|
||||
this._registeredDeferred = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// If we made it this far, we registered just fine.
|
||||
this.registeredLoopServer = true;
|
||||
this._registeredDeferred.resolve();
|
||||
// No need to clear the promise here, everything was good, so we don't need
|
||||
// to re-register.
|
||||
},
|
||||
|
||||
/**
|
||||
* A getter to obtain and store the strings for loop. This is structured
|
||||
* for use by l10n.js.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div id="main"></div>
|
||||
|
||||
<script type="text/javascript" src="loop/libs/l10n.js"></script>
|
||||
<script type="text/javascript" src="loop/shared/libs/sdk.js"></script>
|
||||
<script type="text/javascript" src="loop/libs/sdk.js"></script>
|
||||
<script type="text/javascript" src="loop/shared/libs/jquery-2.1.0.js"></script>
|
||||
<script type="text/javascript" src="loop/shared/libs/lodash-2.4.1.js"></script>
|
||||
<script type="text/javascript" src="loop/shared/libs/backbone-1.1.2.js"></script>
|
||||
|
|
До Ширина: | Высота: | Размер: 10 KiB После Ширина: | Высота: | Размер: 10 KiB |
До Ширина: | Высота: | Размер: 6.4 KiB После Ширина: | Высота: | Размер: 6.4 KiB |
До Ширина: | Высота: | Размер: 7.7 KiB После Ширина: | Высота: | Размер: 7.7 KiB |
До Ширина: | Высота: | Размер: 9.3 KiB После Ширина: | Высота: | Размер: 9.3 KiB |
До Ширина: | Высота: | Размер: 19 KiB После Ширина: | Высота: | Размер: 19 KiB |
До Ширина: | Высота: | Размер: 1.4 KiB После Ширина: | Высота: | Размер: 1.4 KiB |
До Ширина: | Высота: | Размер: 2.4 KiB После Ширина: | Высота: | Размер: 2.4 KiB |
До Ширина: | Высота: | Размер: 2.8 KiB После Ширина: | Высота: | Размер: 2.8 KiB |
До Ширина: | Высота: | Размер: 8.6 KiB После Ширина: | Высота: | Размер: 8.6 KiB |
До Ширина: | Высота: | Размер: 1.0 KiB После Ширина: | Высота: | Размер: 1.0 KiB |
До Ширина: | Высота: | Размер: 734 B После Ширина: | Высота: | Размер: 734 B |
До Ширина: | Высота: | Размер: 861 B После Ширина: | Высота: | Размер: 861 B |
До Ширина: | Высота: | Размер: 622 B После Ширина: | Высота: | Размер: 622 B |
|
@ -26,19 +26,19 @@ browser.jar:
|
|||
content/browser/loop/js/conversation.js (content/js/conversation.js)
|
||||
content/browser/loop/js/panel.js (content/js/panel.js)
|
||||
# Partner SDK assets
|
||||
content/browser/loop/shared/libs/sdk.js (content/shared/libs/sdk.js)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/css/ot.min.css (content/shared/libs/otcdn/webrtc/v2.2.5/css/ot.min.css)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/js/dynamic_config.min.js (content/shared/libs/otcdn/webrtc/v2.2.5/js/dynamic_config.min.js)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-chrome.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-copy-firefox.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-copy-firefox.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-firefox.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-firefox.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-predenied-chrome.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/access-predenied-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-prompt-chrome.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/access-prompt-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/audioonly-publisher.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/audioonly-publisher.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/buttons.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/buttons.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/loader.gif (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/loader.gif)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/mic-off.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/mic-off.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/mic-on.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/mic-on.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/speaker-off.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/speaker-off.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/speaker-on.png (content/shared/libs/otcdn/webrtc/v2.2.5/images/rtc/speaker-on.png)
|
||||
content/browser/loop/libs/sdk.js (content/libs/sdk.js)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/css/ot.min.css (content/libs/otcdn/webrtc/v2.2.5/css/ot.min.css)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/js/dynamic_config.min.js (content/libs/otcdn/webrtc/v2.2.5/js/dynamic_config.min.js)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-chrome.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-copy-firefox.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-copy-firefox.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-denied-firefox.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/access-denied-firefox.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-predenied-chrome.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/access-predenied-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/access-prompt-chrome.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/access-prompt-chrome.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/audioonly-publisher.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/audioonly-publisher.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/audioonly-subscriber.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/buttons.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/buttons.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/loader.gif (content/libs/otcdn/webrtc/v2.2.5/images/rtc/loader.gif)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/mic-off.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/mic-off.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/mic-on.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/mic-on.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/speaker-off.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/speaker-off.png)
|
||||
content/browser/loop/otcdn/webrtc/v2.2.5/images/rtc/speaker-on.png (content/libs/otcdn/webrtc/v2.2.5/images/rtc/speaker-on.png)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
<!-- libs -->
|
||||
<script src="https://static.opentok.com/webrtc/v2.2/js/opentok.min.js"></script>
|
||||
<script type="text/javascript" src="shared/libs/webl10n-20130617.js"></script>
|
||||
<script type="text/javascript" src="libs/webl10n-20130617.js"></script>
|
||||
<script type="text/javascript" src="shared/libs/jquery-2.1.0.js"></script>
|
||||
<script type="text/javascript" src="shared/libs/lodash-2.4.1.js"></script>
|
||||
<script type="text/javascript" src="shared/libs/backbone-1.1.2.js"></script>
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
<div id="fixtures"></div>
|
||||
|
||||
<!-- libs -->
|
||||
<script src="../../content/shared/libs/webl10n-20130617.js"></script>
|
||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
||||
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
||||
<script src="../../content/shared/libs/sjcl-dev20140604.js"></script>
|
||||
<script src="../../content/shared/libs/token.js"></script>
|
||||
<script src="../../content/shared/libs/hawk-browser-2.2.1.js"></script>
|
||||
<script src="../../standalone/content/libs/webl10n-20130617.js"></script>
|
||||
|
||||
<!-- test dependencies -->
|
||||
<script src="vendor/mocha-1.17.1.js"></script>
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
<div id="messages"></div>
|
||||
<div id="fixtures"></div>
|
||||
<!-- libs -->
|
||||
<script src="../../content/shared/libs/webl10n-20130617.js"></script>
|
||||
<script src="../../content/shared/libs/jquery-2.1.0.js"></script>
|
||||
<script src="../../content/shared/libs/lodash-2.4.1.js"></script>
|
||||
<script src="../../content/shared/libs/backbone-1.1.2.js"></script>
|
||||
<script src="../../standalone/content/libs/webl10n-20130617.js"></script>
|
||||
<!-- test dependencies -->
|
||||
<script src="../shared/vendor/mocha-1.17.1.js"></script>
|
||||
<script src="../shared/vendor/chai-1.9.0.js"></script>
|
||||
|
|
|
@ -18,11 +18,6 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
|||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
Cu.import("resource://gre/modules/DOMRequestHelper.jsm");
|
||||
|
||||
const ALARMSMANAGER_CONTRACTID = "@mozilla.org/alarmsManager;1";
|
||||
const ALARMSMANAGER_CID = Components.ID("{fea1e884-9b05-11e1-9b64-87a7016c3860}");
|
||||
const nsIDOMMozAlarmsManager = Ci.nsIDOMMozAlarmsManager;
|
||||
const nsIClassInfo = Ci.nsIClassInfo;
|
||||
|
||||
function AlarmsManager()
|
||||
{
|
||||
debug("Constructor");
|
||||
|
@ -32,19 +27,14 @@ AlarmsManager.prototype = {
|
|||
|
||||
__proto__: DOMRequestIpcHelper.prototype,
|
||||
|
||||
classID : ALARMSMANAGER_CID,
|
||||
contractID : "@mozilla.org/alarmsManager;1",
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([nsIDOMMozAlarmsManager,
|
||||
Ci.nsIDOMGlobalPropertyInitializer,
|
||||
classID : Components.ID("{fea1e884-9b05-11e1-9b64-87a7016c3860}"),
|
||||
|
||||
QueryInterface : XPCOMUtils.generateQI([Ci.nsIDOMGlobalPropertyInitializer,
|
||||
Ci.nsISupportsWeakReference,
|
||||
Ci.nsIObserver]),
|
||||
|
||||
classInfo : XPCOMUtils.generateCI({ classID: ALARMSMANAGER_CID,
|
||||
contractID: ALARMSMANAGER_CONTRACTID,
|
||||
classDescription: "AlarmsManager",
|
||||
interfaces: [nsIDOMMozAlarmsManager],
|
||||
flags: nsIClassInfo.DOM_OBJECT }),
|
||||
|
||||
add: function add(aDate, aRespectTimezone, aData) {
|
||||
debug("add()");
|
||||
|
||||
|
@ -155,25 +145,6 @@ AlarmsManager.prototype = {
|
|||
init: function init(aWindow) {
|
||||
debug("init()");
|
||||
|
||||
// Set navigator.mozAlarms to null.
|
||||
if (!Services.prefs.getBoolPref("dom.mozAlarms.enabled")) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Only pages with perm set can use the alarms.
|
||||
let principal = aWindow.document.nodePrincipal;
|
||||
let perm =
|
||||
Services.perms.testExactPermissionFromPrincipal(principal, "alarms");
|
||||
if (perm != Ci.nsIPermissionManager.ALLOW_ACTION) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// SystemPrincipal documents do not have any origin.
|
||||
// Reject them for now.
|
||||
if (!principal.URI) {
|
||||
return null;
|
||||
}
|
||||
|
||||
this._cpmm = Cc["@mozilla.org/childprocessmessagemanager;1"]
|
||||
.getService(Ci.nsISyncMessageSender);
|
||||
|
||||
|
@ -186,6 +157,7 @@ AlarmsManager.prototype = {
|
|||
// Get the manifest URL if this is an installed app
|
||||
let appsService = Cc["@mozilla.org/AppsService;1"]
|
||||
.getService(Ci.nsIAppsService);
|
||||
let principal = aWindow.document.nodePrincipal;
|
||||
this._pageURL = principal.URI.spec;
|
||||
this._manifestURL = appsService.getManifestURLByLocalId(principal.appId);
|
||||
this._window = aWindow;
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
component {fea1e884-9b05-11e1-9b64-87a7016c3860} AlarmsManager.js
|
||||
contract @mozilla.org/alarmsManager;1 {fea1e884-9b05-11e1-9b64-87a7016c3860}
|
||||
category JavaScript-navigator-property mozAlarms @mozilla.org/alarmsManager;1
|
||||
|
|
|
@ -8,7 +8,6 @@ TEST_DIRS += ['test']
|
|||
|
||||
XPIDL_SOURCES += [
|
||||
'nsIAlarmHalService.idl',
|
||||
'nsIDOMAlarmsManager.idl',
|
||||
]
|
||||
|
||||
XPIDL_MODULE = 'dom_alarm'
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/* 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/. */
|
||||
|
||||
#include "domstubs.idl"
|
||||
|
||||
interface nsIDOMDOMRequest;
|
||||
|
||||
[scriptable, uuid(fea1e884-9b05-11e1-9b64-87a7016c3860)]
|
||||
interface nsIDOMMozAlarmsManager : nsISupports
|
||||
{
|
||||
nsIDOMDOMRequest getAll();
|
||||
nsIDOMDOMRequest add(in jsval date, in DOMString respectTimezone, [optional] in jsval data);
|
||||
void remove(in unsigned long id);
|
||||
};
|
|
@ -21,12 +21,17 @@ if (SpecialPowers.hasPermission("alarms", document)) {
|
|||
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
||||
SpecialPowers.removePermission("alarms", document);
|
||||
|
||||
// mozAlarms is intalled on all platforms except Android for the moment.
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok(!('mozAlarms' in navigator), "navigator.mozAlarms should not exist");
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist");
|
||||
} else {
|
||||
ok('mozAlarms' in navigator, "navigator.mozAlarms should exist");
|
||||
is(navigator.mozAlarms, null, "navigator.mozAlarms should return null");
|
||||
ok(!('mozAlarms' in navigator),
|
||||
"navigator.mozAlarms should not exist without permission");
|
||||
ok(!('AlarmsManager' in window),
|
||||
"Interface AlarmsManager should not exist without permission");
|
||||
}
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -18,14 +18,21 @@ SimpleTest.waitForExplicitFinish();
|
|||
SpecialPowers.pushPrefEnv({"set": [["dom.mozAlarms.enabled", true]]}, function() {
|
||||
SpecialPowers.addPermission("alarms", true, document);
|
||||
|
||||
// mozAlarms is intalled on all platforms except Android for the moment.
|
||||
// mozAlarms is installed on all platforms except Android for the moment.
|
||||
if (navigator.appVersion.indexOf("Android") != -1) {
|
||||
ok(!('mozAlarms' in navigator), "navigator.mozAlarms should not exist");
|
||||
ok('AlarmsManager' in window, "Interface AlarmsManager should exist");
|
||||
try {
|
||||
todo('mozAlarms' in navigator,
|
||||
"mozAlarms is not allowed on Android for now. TODO Bug 863557.");
|
||||
} catch (e) {
|
||||
todo(!e, "('mozAlarms' in navigator) should not throw exceptions once " +
|
||||
"mozAlarms is installed on Android. TODO Bug 863557. " +
|
||||
"Caught exception: " + e);
|
||||
}
|
||||
} else {
|
||||
ok('mozAlarms' in navigator, "navigator.mozAlarms should exist");
|
||||
ok(navigator.mozAlarms, "navigator.mozAlarms should return an object");
|
||||
ok(navigator.mozAlarms instanceof SpecialPowers.Ci.nsIDOMMozAlarmsManager,
|
||||
"navigator.mozAlarms should be an nsIDOMMozAlarmsManager object");
|
||||
ok(navigator.mozAlarms instanceof AlarmsManager,
|
||||
"navigator.mozAlarms should be an instance of AlarmsManager");
|
||||
}
|
||||
|
||||
SimpleTest.finish();
|
||||
|
|
|
@ -122,6 +122,11 @@ this.OperatorAppsRegistry = {
|
|||
}
|
||||
if (mcc && mnc) {
|
||||
this._installOperatorApps(mcc, mnc);
|
||||
let messenger = Cc["@mozilla.org/system-message-internal;1"]
|
||||
.getService(Ci.nsISystemMessagesInternal);
|
||||
messenger.broadcastMessage("first-run-with-sim", { mcc: mcc,
|
||||
mnc: mnc });
|
||||
|
||||
} else {
|
||||
iccProvider.registerIccMsg(clientId, iccListener);
|
||||
}
|
||||
|
@ -235,7 +240,7 @@ this.OperatorAppsRegistry = {
|
|||
},
|
||||
|
||||
eraseVariantAppsNotInList: function(aIdsApp) {
|
||||
if (!aIdsApp || !Array.isArray(aIdsApp)) {
|
||||
if (!aIdsApp) {
|
||||
aIdsApp = [ ];
|
||||
}
|
||||
|
||||
|
@ -306,6 +311,14 @@ this.OperatorAppsRegistry = {
|
|||
},
|
||||
|
||||
_installOperatorApps: function(aMcc, aMnc) {
|
||||
function normalizeCode(aCode) {
|
||||
let ncode = "" + aCode;
|
||||
while (ncode.length < 3) {
|
||||
ncode = "0" + ncode;
|
||||
}
|
||||
return ncode;
|
||||
}
|
||||
|
||||
Task.spawn(function() {
|
||||
debug("Install operator apps ---> mcc:"+ aMcc + ", mnc:" + aMnc);
|
||||
if (!isFirstRunWithSIM()) {
|
||||
|
@ -313,7 +326,35 @@ this.OperatorAppsRegistry = {
|
|||
return;
|
||||
}
|
||||
|
||||
let aIdsApp = yield this._getSingleVariantApps(aMcc, aMnc);
|
||||
let key = normalizeCode(aMcc) + "-" + normalizeCode(aMnc);
|
||||
let aIdsApp = yield this._getSingleVariantDatas();
|
||||
|
||||
// aIdsApp will be undefined if the singleVariant config file not exist
|
||||
// or will have the following format:
|
||||
// {"mmc1-mnc1": [ap11,...,ap1N],..., "mmcM-mncM": [apM1,...,apMN]}
|
||||
// Behavior:
|
||||
// * If the configuration file does not exist, it's equivalent to
|
||||
// passing []
|
||||
// * If the configuration file has data and the phone boots with a SIM
|
||||
// that isn't on the configuration file then we must have the same
|
||||
// behavior as if the phone had booted without a SIM inserted
|
||||
// (that is, don't do anything)
|
||||
// * If the phone boots with a configured SIM (mcc-mnc exists on
|
||||
// configuration file) then recover the app list to install
|
||||
if (!aIdsApp) {
|
||||
debug("No " + SINGLE_VARIANT_CONF_FILE + " in " + this.appsDir.path);
|
||||
aIdsApp = [];
|
||||
} else if (aIdsApp[key] === undefined) {
|
||||
debug("First Run with SIM not configured");
|
||||
return;
|
||||
} else {
|
||||
debug("First Run with configured SIM ");
|
||||
aIdsApp = aIdsApp[key];
|
||||
if (!Array.isArray(aIdsApp)) {
|
||||
aIdsApp = [aIdsApp];
|
||||
}
|
||||
}
|
||||
|
||||
debug("installOperatorApps --> aIdsApp:" + JSON.stringify(aIdsApp));
|
||||
for (let i = 0; i < aIdsApp.length; i++) {
|
||||
let aId = aIdsApp[i];
|
||||
|
@ -353,26 +394,11 @@ this.OperatorAppsRegistry = {
|
|||
});
|
||||
},
|
||||
|
||||
_getSingleVariantApps: function(aMcc, aMnc) {
|
||||
|
||||
function normalizeCode(aCode) {
|
||||
let ncode = "" + aCode;
|
||||
while (ncode.length < 3) {
|
||||
ncode = "0" + ncode;
|
||||
}
|
||||
return ncode;
|
||||
}
|
||||
|
||||
_getSingleVariantDatas: function() {
|
||||
return Task.spawn(function*() {
|
||||
let key = normalizeCode(aMcc) + "-" + normalizeCode(aMnc);
|
||||
let file = Path.join(this.appsDir.path, SINGLE_VARIANT_CONF_FILE);
|
||||
let aData = yield AppsUtils.loadJSONAsync(file);
|
||||
|
||||
if (!aData || !(key in aData)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return aData[key];
|
||||
return aData;
|
||||
}.bind(this));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -341,7 +341,9 @@ AdapterPropertiesCallback(bt_status_t aStatus, int aNumProperties,
|
|||
InfallibleTArray<BluetoothNamedValue> props;
|
||||
|
||||
for (int i = 0; i < aNumProperties; i++) {
|
||||
bt_property_t p = aProperties[i];
|
||||
bt_property_t p;
|
||||
// See Bug 989976, consider aProperties address is not aligned
|
||||
memcpy(&p, &aProperties[i], sizeof(p));
|
||||
|
||||
if (p.type == BT_PROPERTY_BDADDR) {
|
||||
BdAddressTypeToString((bt_bdaddr_t*)p.val, sAdapterBdAddress);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
|
@ -36,7 +34,14 @@ const BDADDR_ALL = "ff:ff:ff:ff:ff:ff";
|
|||
const BDADDR_LOCAL = "ff:ff:ff:00:00:00";
|
||||
|
||||
// A user friendly name for remote BT device.
|
||||
const REMOTE_DEVICE_NAME = "Remote BT Device";
|
||||
const REMOTE_DEVICE_NAME = "Remote_BT_Device";
|
||||
|
||||
// A system message signature of pairing request event
|
||||
const BT_PAIRING_REQ = "bluetooth-pairing-request";
|
||||
|
||||
// Passkey and pincode used to reply pairing requst
|
||||
const BT_PAIRING_PASSKEY = 123456;
|
||||
const BT_PAIRING_PINCODE = "ABCDEFG";
|
||||
|
||||
let Promise =
|
||||
SpecialPowers.Cu.import("resource://gre/modules/Promise.jsm").Promise;
|
||||
|
@ -80,6 +85,33 @@ function runEmulatorCmdSafe(aCommand) {
|
|||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap DOMRequest onsuccess/onerror events to Promise resolve/reject.
|
||||
*
|
||||
* Fulfill params: A DOMEvent.
|
||||
* Reject params: A DOMEvent.
|
||||
*
|
||||
* @param aRequest
|
||||
* A DOMRequest instance.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function wrapDomRequestAsPromise(aRequest) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
ok(aRequest instanceof DOMRequest,
|
||||
"aRequest is instanceof " + aRequest.constructor);
|
||||
|
||||
aRequest.onsuccess = function(aEvent) {
|
||||
deferred.resolve(aEvent);
|
||||
};
|
||||
aRequest.onerror = function(aEvent) {
|
||||
deferred.reject(aEvent);
|
||||
};
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a Bluetooth remote device to scatternet and set its properties.
|
||||
*
|
||||
|
@ -188,13 +220,11 @@ function setEmulatorDeviceProperty(aAddress, aPropertyName, aValue) {
|
|||
function getEmulatorDeviceProperty(aAddress, aPropertyName) {
|
||||
let cmd = "bt property " + aAddress + " " + aPropertyName;
|
||||
return runEmulatorCmdSafe(cmd)
|
||||
.then(function(aResults) {
|
||||
return aResults[0];
|
||||
});
|
||||
.then(aResults => aResults[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start dicovering Bluetooth devices.
|
||||
* Start discovering Bluetooth devices.
|
||||
*
|
||||
* Allows the device's adapter to start seeking for remote devices.
|
||||
*
|
||||
|
@ -202,32 +232,28 @@ function getEmulatorDeviceProperty(aAddress, aPropertyName) {
|
|||
* Reject params: a DOMError
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT dev
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function startDiscovery(aAdapter) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let request = aAdapter.startDiscovery();
|
||||
request.onsuccess = function () {
|
||||
log(" Start discovery - Success");
|
||||
// TODO (bug 892207): Make Bluetooth APIs available for 3rd party apps.
|
||||
// Currently, discovering state wouldn't change immediately here.
|
||||
// We would turn on this check when the redesigned API are landed.
|
||||
// is(aAdapter.discovering, true, "BluetoothAdapter.discovering");
|
||||
deferred.resolve();
|
||||
}
|
||||
request.onerror = function (aEvent) {
|
||||
ok(false, "Start discovery - Fail");
|
||||
deferred.reject(aEvent.target.error);
|
||||
}
|
||||
|
||||
return deferred.promise;
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
// TODO (bug 892207): Make Bluetooth APIs available for 3rd party apps.
|
||||
// Currently, discovering state wouldn't change immediately here.
|
||||
// We would turn on this check when the redesigned API are landed.
|
||||
// is(aAdapter.discovering, false, "BluetoothAdapter.discovering");
|
||||
log(" Start discovery - Success");
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "Start discovery - Fail");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop dicovering Bluetooth devices.
|
||||
* Stop discovering Bluetooth devices.
|
||||
*
|
||||
* Allows the device's adapter to stop seeking for remote devices.
|
||||
*
|
||||
|
@ -240,24 +266,184 @@ function startDiscovery(aAdapter) {
|
|||
* @return A deferred promise.
|
||||
*/
|
||||
function stopDiscovery(aAdapter) {
|
||||
let request = aAdapter.stopDiscovery();
|
||||
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
// TODO (bug 892207): Make Bluetooth APIs available for 3rd party apps.
|
||||
// Currently, discovering state wouldn't change immediately here.
|
||||
// We would turn on this check when the redesigned API are landed.
|
||||
// is(aAdapter.discovering, false, "BluetoothAdapter.discovering");
|
||||
log(" Stop discovery - Success");
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "Stop discovery - Fail");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait for 'devicefound' event of specified devices.
|
||||
*
|
||||
* Resolve if that every specified devices has been found. Never reject.
|
||||
*
|
||||
* Fulfill params: an array which contains addresses of remote devices.
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aRemoteAddresses
|
||||
* An array which contains addresses of remote devices.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function waitForDevicesFound(aAdapter, aRemoteAddresses) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let request = aAdapter.stopDiscovery();
|
||||
request.onsuccess = function () {
|
||||
log(" Stop discovery - Success");
|
||||
// TODO (bug 892207): Make Bluetooth APIs available for 3rd party apps.
|
||||
// Currently, discovering state wouldn't change immediately here.
|
||||
// We would turn on this check when the redesigned API are landed.
|
||||
// is(aAdapter.discovering, false, "BluetoothAdapter.discovering");
|
||||
deferred.resolve();
|
||||
}
|
||||
request.onerror = function (aEvent) {
|
||||
ok(false, "Stop discovery - Fail");
|
||||
deferred.reject(aEvent.target.error);
|
||||
}
|
||||
var addrArray = [];
|
||||
aAdapter.addEventListener("devicefound", function onevent(aEvent) {
|
||||
if(aRemoteAddresses.indexOf(aEvent.device.address) != -1) {
|
||||
addrArray.push(aEvent.device.address);
|
||||
}
|
||||
if(addrArray.length == aRemoteAddresses.length) {
|
||||
aAdapter.removeEventListener("devicefound", onevent);
|
||||
ok(true, "BluetoothAdapter has found all remote devices.");
|
||||
|
||||
deferred.resolve(addrArray);
|
||||
}
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start discovering Bluetooth devices and wait for 'devicefound' events.
|
||||
*
|
||||
* Allows the device's adapter to start seeking for remote devices and wait for
|
||||
* the 'devicefound' events of specified devices.
|
||||
*
|
||||
* Fulfill params: an array of addresses of found devices.
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aRemoteAddresses
|
||||
* An array which contains addresses of remote devices.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function startDiscoveryAndWaitDevicesFound(aAdapter, aRemoteAddresses) {
|
||||
let promises = [];
|
||||
|
||||
promises.push(waitForDevicesFound(aAdapter, aRemoteAddresses));
|
||||
promises.push(startDiscovery(aAdapter));
|
||||
return Promise.all(promises)
|
||||
.then(aResults => aResults[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start pairing a remote device.
|
||||
*
|
||||
* Start pairing a remote device with the device's adapter.
|
||||
*
|
||||
* Fulfill params: (none)
|
||||
* Reject params: a DOMError
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aDeviceAddress
|
||||
* The string of remote Bluetooth address with format xx:xx:xx:xx:xx:xx.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function pair(aAdapter, aDeviceAddress) {
|
||||
let request = aAdapter.pair(aDeviceAddress);
|
||||
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
log(" Pair - Success");
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "Pair - Fail");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the paired device from the paired device list.
|
||||
*
|
||||
* Remove the paired device from the paired device list of the device's adapter.
|
||||
*
|
||||
* Fulfill params: (none)
|
||||
* Reject params: a DOMError
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aDeviceAddress
|
||||
* The string of remote Bluetooth address with format xx:xx:xx:xx:xx:xx.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function unpair(aAdapter, aDeviceAddress) {
|
||||
let request = aAdapter.unpair(aDeviceAddress);
|
||||
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
log(" Unpair - Success");
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "Unpair - Fail");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Start pairing a remote device and wait for "pairedstatuschanged" event.
|
||||
*
|
||||
* Start pairing a remote device with the device's adapter and wait for
|
||||
* "pairedstatuschanged" event.
|
||||
*
|
||||
* Fulfill params: an array of promise results contains the fulfilled params of
|
||||
* 'waitForAdapterEvent' and 'pair'.
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aDeviceAddress
|
||||
* The string of remote Bluetooth address with format xx:xx:xx:xx:xx:xx.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function pairDeviceAndWait(aAdapter, aDeviceAddress) {
|
||||
let promises = [];
|
||||
promises.push(waitForAdapterEvent(aAdapter, "pairedstatuschanged"));
|
||||
promises.push(pair(aAdapter, aDeviceAddress));
|
||||
return Promise.all(promises);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get paried Bluetooth devices.
|
||||
*
|
||||
* The getPairedDevices method is used to retrieve the full list of all devices
|
||||
* paired with the device's adapter.
|
||||
*
|
||||
* Fulfill params: a shallow copy of the Array of paired BluetoothDevice
|
||||
* objects.
|
||||
* Reject params: a DOMError
|
||||
*
|
||||
* @param aAdapter
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
*
|
||||
* @return A deferred promise.
|
||||
*/
|
||||
function getPairedDevices(aAdapter) {
|
||||
let request = aAdapter.getPairedDevices();
|
||||
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
log(" getPairedDevices - Success");
|
||||
let pairedDevices = request.result.slice();
|
||||
return pairedDevices;
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "getPairedDevices - Fail");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mozSettings value specified by @aKey.
|
||||
*
|
||||
|
@ -274,19 +460,16 @@ function stopDiscovery(aAdapter) {
|
|||
* @return A deferred promise.
|
||||
*/
|
||||
function getSettings(aKey) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let request = navigator.mozSettings.createLock().get(aKey);
|
||||
request.addEventListener("success", function(aEvent) {
|
||||
ok(true, "getSettings(" + aKey + ")");
|
||||
deferred.resolve(aEvent.target.result[aKey]);
|
||||
});
|
||||
request.addEventListener("error", function() {
|
||||
ok(false, "getSettings(" + aKey + ")");
|
||||
deferred.reject();
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve(aEvent) {
|
||||
ok(true, "getSettings(" + aKey + ")");
|
||||
return aEvent.target.result[aKey];
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "getSettings(" + aKey + ")");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -303,19 +486,15 @@ function getSettings(aKey) {
|
|||
* @return A deferred promise.
|
||||
*/
|
||||
function setSettings(aSettings) {
|
||||
let deferred = Promise.defer();
|
||||
|
||||
let request = navigator.mozSettings.createLock().set(aSettings);
|
||||
request.addEventListener("success", function() {
|
||||
ok(true, "setSettings(" + JSON.stringify(aSettings) + ")");
|
||||
deferred.resolve();
|
||||
});
|
||||
request.addEventListener("error", function() {
|
||||
ok(false, "setSettings(" + JSON.stringify(aSettings) + ")");
|
||||
deferred.reject();
|
||||
});
|
||||
|
||||
return deferred.promise;
|
||||
return wrapDomRequestAsPromise(request)
|
||||
.then(function resolve() {
|
||||
ok(true, "setSettings(" + JSON.stringify(aSettings) + ")");
|
||||
}, function reject(aEvent) {
|
||||
ok(false, "setSettings(" + JSON.stringify(aSettings) + ")");
|
||||
throw aEvent.target.error;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -438,7 +617,7 @@ function waitForManagerEvent(aEventName) {
|
|||
* Fulfill params: the DOMEvent passed.
|
||||
*
|
||||
* @param aAdapter
|
||||
* The BluetoothAdapter you want to use.
|
||||
* A BluetoothAdapter which is used to interact with local BT device.
|
||||
* @param aEventName
|
||||
* The name of the EventHandler.
|
||||
*
|
||||
|
@ -463,7 +642,8 @@ function waitForAdapterEvent(aAdapter, aEventName) {
|
|||
*
|
||||
* Resolve if that named event occurs. Reject if we can't set settings.
|
||||
*
|
||||
* Fulfill params: the DOMEvent passed.
|
||||
* Fulfill params: an array of promise results contains the fulfill params of
|
||||
* 'waitForManagerEvent' and 'setBluetoothEnabled'.
|
||||
* Reject params: (none)
|
||||
*
|
||||
* @return A deferred promise.
|
||||
|
|
|
@ -3,8 +3,10 @@ b2g = true
|
|||
browser = false
|
||||
qemu = true
|
||||
|
||||
[test_navigate_to_default_url.py]
|
||||
[test_dom_BluetoothManager_enabled.js]
|
||||
[test_dom_BluetoothManager_adapteradded.js]
|
||||
[test_dom_BluetoothAdapter_setters.js]
|
||||
[test_dom_BluetoothAdapter_getters.js]
|
||||
[test_dom_BluetoothAdapter_discovery.js]
|
||||
[test_dom_BluetoothAdapter_pair.js]
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Test Purpose:
|
||||
// To verify that discovery process of BluetoothAdapter is correct.
|
||||
// Use B2G emulator commands to add/remote remote devices to simulate
|
||||
// Use B2G emulator commands to add/remove remote devices to simulate
|
||||
// discovering behavior.
|
||||
//
|
||||
// Test Coverage:
|
||||
|
@ -24,15 +22,9 @@ MARIONETTE_HEAD_JS = 'head.js';
|
|||
startBluetoothTest(true, function testCaseMain(aAdapter) {
|
||||
log("Testing the discovery process of BluetoothAdapter ...");
|
||||
|
||||
// The properties of remote device.
|
||||
let theProperties = {
|
||||
"name": REMOTE_DEVICE_NAME,
|
||||
"discoverable": true
|
||||
};
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => removeEmulatorRemoteDevice(BDADDR_ALL))
|
||||
.then(() => addEmulatorRemoteDevice(/*theProperties*/ null))
|
||||
.then(() => addEmulatorRemoteDevice(null))
|
||||
.then(function(aRemoteAddress) {
|
||||
let promises = [];
|
||||
promises.push(waitForAdapterEvent(aAdapter, "devicefound"));
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
/* 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/. */
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Test Purpose:
|
||||
// To verify that pairing process of BluetoothAdapter is correct.
|
||||
// Use B2G emulator commands to add/remove remote devices to simulate
|
||||
// discovering behavior. With current emulator implemation, the pair method
|
||||
// between adapter and remote device would be 'confirmation'.
|
||||
//
|
||||
// Test Coverage:
|
||||
// - BluetoothAdapter.startDiscovery()
|
||||
// - BluetoothAdapter.stopDiscovery()
|
||||
// - BluetoothAdapter.pair()
|
||||
// - BluetoothAdapter.unpair()
|
||||
// - BluetoothAdapter.onpairedstatuschanged()
|
||||
// - BluetoothAdapter.setPairingConfirmation()
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
MARIONETTE_TIMEOUT = 60000;
|
||||
MARIONETTE_HEAD_JS = 'head.js';
|
||||
|
||||
function replyPairingReq(aAdapter, aPairingEvent) {
|
||||
switch (aPairingEvent.method) {
|
||||
case 'confirmation':
|
||||
log("The pairing passkey is " + aPairingEvent.passkey);
|
||||
aAdapter.setPairingConfirmation(aPairingEvent.address, true);
|
||||
break;
|
||||
case 'pincode':
|
||||
let pincode = BT_PAIRING_PINCODE;
|
||||
aAdapter.setPinCode(aPairingEvent.address, pincode);
|
||||
break;
|
||||
case 'passkey':
|
||||
let passkey = BT_PAIRING_PASSKEY;
|
||||
aAdapter.setPasskey(aPairingEvent.address, passkey);
|
||||
break;
|
||||
default:
|
||||
ok(false, "Unsupported pairing method. [" + aPairingEvent.method + "]");
|
||||
}
|
||||
}
|
||||
|
||||
startBluetoothTest(true, function testCaseMain(aAdapter) {
|
||||
log("Testing the pairing process of BluetoothAdapter ...");
|
||||
|
||||
// listens to the system message BT_PAIRING_REQ
|
||||
navigator.mozSetMessageHandler(BT_PAIRING_REQ,
|
||||
(evt) => replyPairingReq(aAdapter, evt));
|
||||
|
||||
return Promise.resolve()
|
||||
.then(() => removeEmulatorRemoteDevice(BDADDR_ALL))
|
||||
.then(() => addEmulatorRemoteDevice())
|
||||
.then((aRemoteAddress) =>
|
||||
startDiscoveryAndWaitDevicesFound(aAdapter, [aRemoteAddress]))
|
||||
.then((aRemoteAddresses) =>
|
||||
stopDiscovery(aAdapter).then(() => aRemoteAddresses))
|
||||
// 'aRemoteAddresses' is an arrary which contains addresses of discovered
|
||||
// remote devices.
|
||||
// Pairs with the first device in 'aRemoteAddresses' to test the functionality
|
||||
// of BluetoothAdapter.pair and BluetoothAdapter.onpairedstatuschanged.
|
||||
.then((aRemoteAddresses) => pairDeviceAndWait(aAdapter, aRemoteAddresses.pop()))
|
||||
.then(() => getPairedDevices(aAdapter))
|
||||
.then((aPairedDevices) => unpair(aAdapter, aPairedDevices.pop().address))
|
||||
.then(() => removeEmulatorRemoteDevice(BDADDR_ALL));
|
||||
});
|
|
@ -1,6 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* vim: sw=2 ts=2 sts=2 et filetype=javascript
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
/* 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/. */
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# 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/.
|
||||
|
||||
from marionette_test import MarionetteTestCase
|
||||
|
||||
class testNavigateToDefault(MarionetteTestCase):
|
||||
def setUp(self):
|
||||
MarionetteTestCase.setUp(self)
|
||||
# Sets an appropriate timeout for this test.
|
||||
# P.S. The timeout of next test wouldn't be affected by this statement.
|
||||
self.marionette.timeouts(self.marionette.TIMEOUT_PAGE, 90000)
|
||||
|
||||
def test_navigate_to_default_url(self):
|
||||
try:
|
||||
self.marionette.navigate("app://system.gaiamobile.org/index.html")
|
||||
except:
|
||||
self.assertTrue(False, "Can not navigate to system app.")
|
|
@ -258,6 +258,7 @@ NS_INTERFACE_MAP_END
|
|||
/******************************************************************/
|
||||
|
||||
static uint32_t sESMInstanceCount = 0;
|
||||
static bool sPointerEventEnabled = false;
|
||||
|
||||
int32_t EventStateManager::sUserInputEventDepth = 0;
|
||||
bool EventStateManager::sNormalLMouseEventInProcess = false;
|
||||
|
@ -300,6 +301,13 @@ EventStateManager::EventStateManager()
|
|||
UpdateUserActivityTimer();
|
||||
}
|
||||
++sESMInstanceCount;
|
||||
|
||||
static bool sAddedPointerEventEnabled = false;
|
||||
if (!sAddedPointerEventEnabled) {
|
||||
Preferences::AddBoolVarCache(&sPointerEventEnabled,
|
||||
"dom.w3c_pointer_events.enabled", false);
|
||||
sAddedPointerEventEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -580,6 +588,10 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
|||
mouseEvent->reason = WidgetMouseEvent::eSynthesized;
|
||||
// then fall through...
|
||||
} else {
|
||||
if (sPointerEventEnabled) {
|
||||
// We should synthetize corresponding pointer events
|
||||
GeneratePointerEnterExit(NS_POINTER_LEAVE, mouseEvent);
|
||||
}
|
||||
GenerateMouseEnterExit(mouseEvent);
|
||||
//This is a window level mouse exit event and should stop here
|
||||
aEvent->message = 0;
|
||||
|
@ -2884,8 +2896,6 @@ EventStateManager::PostHandleEvent(nsPresContext* aPresContext,
|
|||
// Mouse/Pen pointers are valid all the time (not only between down/up)
|
||||
if (pointerEvent->inputSource == nsIDOMMouseEvent::MOZ_SOURCE_TOUCH) {
|
||||
mPointersEnterLeaveHelper.Remove(pointerEvent->pointerId);
|
||||
}
|
||||
if (pointerEvent->inputSource != nsIDOMMouseEvent::MOZ_SOURCE_MOUSE) {
|
||||
GenerateMouseEnterExit(pointerEvent);
|
||||
}
|
||||
break;
|
||||
|
@ -3918,6 +3928,14 @@ GetWindowInnerRectCenter(nsPIDOMWindow* aWindow,
|
|||
aContext->CSSPixelsToDevPixels(innerY - cssScreenY + innerHeight / 2));
|
||||
}
|
||||
|
||||
void
|
||||
EventStateManager::GeneratePointerEnterExit(uint32_t aMessage, WidgetMouseEvent* aEvent)
|
||||
{
|
||||
WidgetPointerEvent pointerEvent(*aEvent);
|
||||
pointerEvent.message = aMessage;
|
||||
GenerateMouseEnterExit(&pointerEvent);
|
||||
}
|
||||
|
||||
void
|
||||
EventStateManager::GenerateMouseEnterExit(WidgetMouseEvent* aMouseEvent)
|
||||
{
|
||||
|
|
|
@ -293,6 +293,10 @@ protected:
|
|||
uint32_t aMessage,
|
||||
nsIContent* aTargetContent,
|
||||
nsIContent* aRelatedContent);
|
||||
/**
|
||||
* Synthesize DOM pointerover and pointerout events
|
||||
*/
|
||||
void GeneratePointerEnterExit(uint32_t aMessage, WidgetMouseEvent* aEvent);
|
||||
/**
|
||||
* Synthesize DOM and frame mouseover and mouseout events from this
|
||||
* MOUSE_MOVE or MOUSE_EXIT event.
|
||||
|
|
|
@ -328,15 +328,25 @@ MmsConnection.prototype = {
|
|||
* @see nsIDOMMozCdmaIccInfo
|
||||
*/
|
||||
getPhoneNumber: function() {
|
||||
let iccInfo = this.radioInterface.rilContext.iccInfo;
|
||||
|
||||
if (!iccInfo) {
|
||||
let number;
|
||||
// Get the proper IccInfo based on the current card type.
|
||||
try {
|
||||
let iccInfo = null;
|
||||
let baseIccInfo = this.radioInterface.rilContext.iccInfo;
|
||||
if (baseIccInfo.iccType === 'ruim' || baseIccInfo.iccType === 'csim') {
|
||||
iccInfo = baseIccInfo.QueryInterface(Ci.nsIDOMMozCdmaIccInfo);
|
||||
number = iccInfo.mdn;
|
||||
} else {
|
||||
iccInfo = baseIccInfo.QueryInterface(Ci.nsIDOMMozGsmIccInfo);
|
||||
number = iccInfo.msisdn;
|
||||
}
|
||||
} catch (e) {
|
||||
if (DEBUG) {
|
||||
debug("Exception - QueryInterface failed on iccinfo for GSM/CDMA info");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
let number = (iccInfo instanceof Ci.nsIDOMMozGsmIccInfo)
|
||||
? iccInfo.msisdn : iccInfo.mdn;
|
||||
|
||||
// Workaround an xpconnect issue with undefined string objects.
|
||||
// See bug 808220
|
||||
if (number === undefined || number === "undefined") {
|
||||
|
@ -1135,8 +1145,8 @@ function SendTransaction(mmsConnection, cancellableId, msg, requestDeliveryRepor
|
|||
// Insert Phone number if available.
|
||||
// Otherwise, Let MMS Proxy Relay insert from address automatically for us.
|
||||
let phoneNumber = mmsConnection.getPhoneNumber();
|
||||
msg.headers["from"] = (phoneNumber) ?
|
||||
{ address: phoneNumber, type: "PLMN" } : null;
|
||||
let from = (phoneNumber) ? { address: phoneNumber, type: "PLMN" } : null;
|
||||
msg.headers["from"] = from;
|
||||
|
||||
msg.headers["date"] = new Date();
|
||||
msg.headers["x-mms-message-class"] = "personal";
|
||||
|
@ -1433,8 +1443,8 @@ function ReadRecTransaction(mmsConnection, messageID, toAddress) {
|
|||
// Insert Phone number if available.
|
||||
// Otherwise, Let MMS Proxy Relay insert from address automatically for us.
|
||||
let phoneNumber = mmsConnection.getPhoneNumber();
|
||||
headers["from"] = (phoneNumber) ?
|
||||
{ address: phoneNumber, type: "PLMN" } : null;
|
||||
let from = (phoneNumber) ? { address: phoneNumber, type: "PLMN" } : null;
|
||||
headers["from"] = from;
|
||||
headers["x-mms-read-status"] = MMS.MMS_PDU_READ_STATUS_READ;
|
||||
|
||||
this.istream = MMS.PduHelper.compose(null, {headers: headers});
|
||||
|
|
|
@ -20,11 +20,11 @@ var gData = [
|
|||
{
|
||||
perm: ["alarms"],
|
||||
// AlarmsManager is not enabled on Android yet
|
||||
// exception on accessing Ci.nsIDOMMozAlarmsManager
|
||||
// exception on accessing AlarmsManager
|
||||
// See bug 863557
|
||||
skip: ["Android"],
|
||||
obj: "mozAlarms",
|
||||
idl: "nsIDOMMozAlarmsManager",
|
||||
webidl: "AlarmsManager",
|
||||
settings: [["dom.mozAlarms.enabled", true]],
|
||||
},
|
||||
]
|
||||
|
|
|
@ -366,6 +366,7 @@ NetworkManager.prototype = {
|
|||
|
||||
getNetworkId: function(network) {
|
||||
let id = "device";
|
||||
#ifdef MOZ_B2G_RIL
|
||||
if (this.isNetworkTypeMobile(network.type)) {
|
||||
if (!(network instanceof Ci.nsIRilNetworkInterface)) {
|
||||
throw Components.Exception("Mobile network not an nsIRilNetworkInterface",
|
||||
|
@ -373,6 +374,7 @@ NetworkManager.prototype = {
|
|||
}
|
||||
id = "ril" + network.serviceId;
|
||||
}
|
||||
#endif
|
||||
|
||||
return id + "-" + network.type;
|
||||
},
|
||||
|
|
|
@ -111,6 +111,8 @@ var legacyMozPrefixedInterfaces =
|
|||
// IMPORTANT: Do not change the list below without review from a DOM peer!
|
||||
var interfaceNamesInGlobalScope =
|
||||
[
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
{name: "AlarmsManager", pref: "dom.mozAlarms.enabled"},
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
"AnalyserNode",
|
||||
// IMPORTANT: Do not change this list without review from a DOM peer!
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/.
|
||||
*
|
||||
* https://wiki.mozilla.org/WebAPI/AlarmAPI
|
||||
*/
|
||||
|
||||
[NavigatorProperty="mozAlarms",
|
||||
JSImplementation="@mozilla.org/alarmsManager;1",
|
||||
CheckPermissions="alarms",
|
||||
Pref="dom.mozAlarms.enabled"]
|
||||
interface AlarmsManager {
|
||||
DOMRequest getAll();
|
||||
DOMRequest add(any date, DOMString respectTimezone, optional any data);
|
||||
void remove(unsigned long id);
|
||||
};
|
|
@ -17,6 +17,7 @@ PREPROCESSED_WEBIDL_FILES = [
|
|||
WEBIDL_FILES = [
|
||||
'AbstractWorker.webidl',
|
||||
'ActivityRequestHandler.webidl',
|
||||
'AlarmsManager.webidl',
|
||||
'AnalyserNode.webidl',
|
||||
'AnimationEvent.webidl',
|
||||
'AnimationTimeline.webidl',
|
||||
|
|
|
@ -11,7 +11,6 @@ DIRS += [
|
|||
'ucvcn',
|
||||
'ucvlatin',
|
||||
'ucvtw',
|
||||
'ucvtw2',
|
||||
'ucvko',
|
||||
'ucvibm',
|
||||
'src',
|
||||
|
|
|
@ -174,11 +174,6 @@ UNIFIED_SOURCES += [
|
|||
'../ucvtw/nsUnicodeToHKSCS.cpp',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'../ucvtw2/nsEUCTWToUnicode.cpp',
|
||||
'../ucvtw2/nsUnicodeToEUCTW.cpp',
|
||||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'../util/nsUCConstructors.cpp',
|
||||
'../util/nsUCSupport.cpp',
|
||||
|
@ -202,7 +197,6 @@ LOCAL_INCLUDES += [
|
|||
'../ucvko',
|
||||
'../ucvlatin',
|
||||
'../ucvtw',
|
||||
'../ucvtw2',
|
||||
'../util',
|
||||
]
|
||||
|
||||
|
|
|
@ -158,12 +158,6 @@
|
|||
#include "nsUnicodeToISO2022JP.h"
|
||||
#include "nsUnicodeToJISx0201.h"
|
||||
|
||||
// ucvtw2
|
||||
#include "nsUCvTW2CID.h"
|
||||
#include "nsUCvTW2Dll.h"
|
||||
#include "nsEUCTWToUnicode.h"
|
||||
#include "nsUnicodeToEUCTW.h"
|
||||
|
||||
// ucvtw
|
||||
#include "nsUCvTWCID.h"
|
||||
#include "nsUCvTWDll.h"
|
||||
|
@ -267,9 +261,6 @@ NS_UCONV_REG_UNREG("EUC-JP", NS_EUCJPTOUNICODE_CID, NS_UNICODETOEUCJP_CID)
|
|||
|
||||
NS_UCONV_REG_UNREG_ENCODER("jis_0201" , NS_UNICODETOJISX0201_CID)
|
||||
|
||||
// ucvtw2
|
||||
NS_UCONV_REG_UNREG("x-euc-tw", NS_EUCTWTOUNICODE_CID, NS_UNICODETOEUCTW_CID)
|
||||
|
||||
// ucvtw
|
||||
NS_UCONV_REG_UNREG("Big5", NS_BIG5TOUNICODE_CID, NS_UNICODETOBIG5_CID)
|
||||
NS_UCONV_REG_UNREG("Big5-HKSCS", NS_BIG5HKSCSTOUNICODE_CID, NS_UNICODETOBIG5HKSCS_CID)
|
||||
|
@ -307,8 +298,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsEUCJPToUnicodeV2)
|
|||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsISO2022JPToUnicodeV2)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToISO2022JP)
|
||||
|
||||
// ucvtw2
|
||||
|
||||
// ucvtw
|
||||
|
||||
// ucvko
|
||||
|
@ -342,63 +331,6 @@ const uint16_t g_uf0208extMapping[] = {
|
|||
#include "jis0208ext.uf"
|
||||
};
|
||||
|
||||
// ucvtw2
|
||||
const uint16_t g_ufCNS1MappingTable[] = {
|
||||
#include "cns_1.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS2MappingTable[] = {
|
||||
#include "cns_2.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS3MappingTable[] = {
|
||||
#include "cns3.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS4MappingTable[] = {
|
||||
#include "cns4.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS5MappingTable[] = {
|
||||
#include "cns5.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS6MappingTable[] = {
|
||||
#include "cns6.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_ufCNS7MappingTable[] = {
|
||||
#include "cns7.uf"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS1MappingTable[] = {
|
||||
#include "cns_1.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS2MappingTable[] = {
|
||||
#include "cns_2.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS3MappingTable[] = {
|
||||
#include "cns3.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS4MappingTable[] = {
|
||||
#include "cns4.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS5MappingTable[] = {
|
||||
#include "cns5.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS6MappingTable[] = {
|
||||
#include "cns6.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_utCNS7MappingTable[] = {
|
||||
#include "cns7.ut"
|
||||
};
|
||||
|
||||
const uint16_t g_ASCIIMappingTable[] = {
|
||||
0x0001, 0x0004, 0x0005, 0x0008, 0x0000, 0x0000, 0x007F, 0x0000
|
||||
};
|
||||
|
@ -580,8 +512,6 @@ NS_DEFINE_NAMED_CID(NS_UNICODETOSJIS_CID);
|
|||
NS_DEFINE_NAMED_CID(NS_UNICODETOEUCJP_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICODETOISO2022JP_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICODETOJISX0201_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_EUCTWTOUNICODE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICODETOEUCTW_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICODETOBIG5_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_BIG5TOUNICODE_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_UNICODETOBIG5HKSCS_CID);
|
||||
|
@ -740,8 +670,6 @@ static const mozilla::Module::CIDEntry kUConvCIDs[] = {
|
|||
{ &kNS_UNICODETOEUCJP_CID, false, nullptr, nsUnicodeToEUCJPConstructor },
|
||||
{ &kNS_UNICODETOISO2022JP_CID, false, nullptr, nsUnicodeToISO2022JPConstructor },
|
||||
{ &kNS_UNICODETOJISX0201_CID, false, nullptr, nsUnicodeToJISx0201Constructor },
|
||||
{ &kNS_EUCTWTOUNICODE_CID, false, nullptr, nsEUCTWToUnicodeConstructor },
|
||||
{ &kNS_UNICODETOEUCTW_CID, false, nullptr, nsUnicodeToEUCTWConstructor },
|
||||
{ &kNS_UNICODETOBIG5_CID, false, nullptr, nsUnicodeToBIG5Constructor },
|
||||
{ &kNS_BIG5TOUNICODE_CID, false, nullptr, nsBIG5ToUnicodeConstructor },
|
||||
{ &kNS_UNICODETOBIG5HKSCS_CID, false, nullptr, nsUnicodeToBIG5HKSCSConstructor },
|
||||
|
@ -902,8 +830,6 @@ static const mozilla::Module::ContractIDEntry kUConvContracts[] = {
|
|||
{ NS_UNICODEENCODER_CONTRACTID_BASE "EUC-JP", &kNS_UNICODETOEUCJP_CID },
|
||||
{ NS_UNICODEENCODER_CONTRACTID_BASE "ISO-2022-JP", &kNS_UNICODETOISO2022JP_CID },
|
||||
{ NS_UNICODEENCODER_CONTRACTID_BASE "jis_0201", &kNS_UNICODETOJISX0201_CID },
|
||||
{ NS_UNICODEDECODER_CONTRACTID_BASE "x-euc-tw", &kNS_EUCTWTOUNICODE_CID },
|
||||
{ NS_UNICODEENCODER_CONTRACTID_BASE "x-euc-tw", &kNS_UNICODETOEUCTW_CID },
|
||||
{ NS_UNICODEENCODER_CONTRACTID_BASE "Big5", &kNS_UNICODETOBIG5_CID },
|
||||
{ NS_UNICODEDECODER_CONTRACTID_BASE "Big5", &kNS_BIG5TOUNICODE_CID },
|
||||
{ NS_UNICODEENCODER_CONTRACTID_BASE "Big5-HKSCS", &kNS_UNICODETOBIG5HKSCS_CID },
|
||||
|
|
|
@ -1,491 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 1
|
||||
srcBegin = 52B6
|
||||
srcEnd = 52BA
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
253A 2537 2538 FFFD 253B
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 2
|
||||
srcBegin = 52DC
|
||||
destBegin = 366A
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 1
|
||||
srcBegin = 52E8
|
||||
srcEnd = 52F6
|
||||
mappingOffset = 0005
|
||||
Mapping =
|
||||
4467 FFFD FFFD FFFD 4463 FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 5362
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 5324
|
||||
destBegin = 234B
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 5921
|
||||
destBegin = 373D
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 5C2E
|
||||
destBegin = 2872
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 5E07
|
||||
destBegin = 225C
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 5E3F
|
||||
destBegin = 377C
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 5FCB
|
||||
destBegin = 2266
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 6117
|
||||
destBegin = 3F30
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 6184
|
||||
destBegin = 4D2A
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 6306
|
||||
destBegin = 2945
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 64CC
|
||||
destBegin = 545E
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 6729
|
||||
destBegin = 2148
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 688E
|
||||
destBegin = 327E
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 6B85
|
||||
destBegin = 2969
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 6BA9
|
||||
destBegin = 5B72
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 7228
|
||||
destBegin = 7B7B
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 729F
|
||||
destBegin = 4E37
|
||||
End of Item 0012
|
||||
|
||||
Begin of Item 0013
|
||||
Format 2
|
||||
srcBegin = 7309
|
||||
destBegin = 3354
|
||||
End of Item 0013
|
||||
|
||||
Begin of Item 0014
|
||||
Format 2
|
||||
srcBegin = 7527
|
||||
destBegin = 4749
|
||||
End of Item 0014
|
||||
|
||||
Begin of Item 0015
|
||||
Format 1
|
||||
srcBegin = 764A
|
||||
srcEnd = 764B
|
||||
mappingOffset = 0014
|
||||
Mapping =
|
||||
5569 5C36
|
||||
End of Item 0015
|
||||
|
||||
Begin of Item 0016
|
||||
Format 2
|
||||
srcBegin = 76A2
|
||||
destBegin = 5C43
|
||||
End of Item 0016
|
||||
|
||||
Begin of Item 0017
|
||||
Format 1
|
||||
srcBegin = 798C
|
||||
srcEnd = 7991
|
||||
mappingOffset = 0016
|
||||
Mapping =
|
||||
477E FFFD FFFD FFFD FFFD 4822
|
||||
End of Item 0017
|
||||
|
||||
Begin of Item 0018
|
||||
Format 2
|
||||
srcBegin = 7AB9
|
||||
destBegin = 5652
|
||||
End of Item 0018
|
||||
|
||||
Begin of Item 0019
|
||||
Format 2
|
||||
srcBegin = 7B3F
|
||||
destBegin = 3B24
|
||||
End of Item 0019
|
||||
|
||||
Begin of Item 001A
|
||||
Format 2
|
||||
srcBegin = 7BD7
|
||||
destBegin = 5669
|
||||
End of Item 001A
|
||||
|
||||
Begin of Item 001B
|
||||
Format 2
|
||||
srcBegin = 7C46
|
||||
destBegin = 6C79
|
||||
End of Item 001B
|
||||
|
||||
Begin of Item 001C
|
||||
Format 2
|
||||
srcBegin = 7C61
|
||||
destBegin = 7347
|
||||
End of Item 001C
|
||||
|
||||
Begin of Item 001D
|
||||
Format 2
|
||||
srcBegin = 83D0
|
||||
destBegin = 3B6F
|
||||
End of Item 001D
|
||||
|
||||
Begin of Item 001E
|
||||
Format 2
|
||||
srcBegin = 8660
|
||||
destBegin = 494E
|
||||
End of Item 001E
|
||||
|
||||
Begin of Item 001F
|
||||
Format 2
|
||||
srcBegin = 86E7
|
||||
destBegin = 3B7B
|
||||
End of Item 001F
|
||||
|
||||
Begin of Item 0020
|
||||
Format 2
|
||||
srcBegin = 8714
|
||||
destBegin = 425D
|
||||
End of Item 0020
|
||||
|
||||
Begin of Item 0021
|
||||
Format 2
|
||||
srcBegin = 8770
|
||||
destBegin = 5055
|
||||
End of Item 0021
|
||||
|
||||
Begin of Item 0022
|
||||
Format 2
|
||||
srcBegin = 87F1
|
||||
destBegin = 6448
|
||||
End of Item 0022
|
||||
|
||||
Begin of Item 0023
|
||||
Format 2
|
||||
srcBegin = 8804
|
||||
destBegin = 6943
|
||||
End of Item 0023
|
||||
|
||||
Begin of Item 0024
|
||||
Format 2
|
||||
srcBegin = 88D1
|
||||
destBegin = 426C
|
||||
End of Item 0024
|
||||
|
||||
Begin of Item 0025
|
||||
Format 2
|
||||
srcBegin = 8970
|
||||
destBegin = 7438
|
||||
End of Item 0025
|
||||
|
||||
Begin of Item 0026
|
||||
Format 2
|
||||
srcBegin = 8A2F
|
||||
destBegin = 355B
|
||||
End of Item 0026
|
||||
|
||||
Begin of Item 0027
|
||||
Format 2
|
||||
srcBegin = 8C38
|
||||
destBegin = 3046
|
||||
End of Item 0027
|
||||
|
||||
Begin of Item 0028
|
||||
Format 2
|
||||
srcBegin = 8CCB
|
||||
destBegin = 432D
|
||||
End of Item 0028
|
||||
|
||||
Begin of Item 0029
|
||||
Format 2
|
||||
srcBegin = 8CE3
|
||||
destBegin = 513A
|
||||
End of Item 0029
|
||||
|
||||
Begin of Item 002A
|
||||
Format 2
|
||||
srcBegin = 8E37
|
||||
destBegin = 5148
|
||||
End of Item 002A
|
||||
|
||||
Begin of Item 002B
|
||||
Format 2
|
||||
srcBegin = 8ECE
|
||||
destBegin = 3055
|
||||
End of Item 002B
|
||||
|
||||
Begin of Item 002C
|
||||
Format 2
|
||||
srcBegin = 8EED
|
||||
destBegin = 4350
|
||||
End of Item 002C
|
||||
|
||||
Begin of Item 002D
|
||||
Format 2
|
||||
srcBegin = 9459
|
||||
destBegin = 765D
|
||||
End of Item 002D
|
||||
|
||||
Begin of Item 002E
|
||||
Format 2
|
||||
srcBegin = 957E
|
||||
destBegin = 7156
|
||||
End of Item 002E
|
||||
|
||||
Begin of Item 002F
|
||||
Format 2
|
||||
srcBegin = 9703
|
||||
destBegin = 523B
|
||||
End of Item 002F
|
||||
|
||||
Begin of Item 0030
|
||||
Format 2
|
||||
srcBegin = 9819
|
||||
destBegin = 4B3B
|
||||
End of Item 0030
|
||||
|
||||
Begin of Item 0031
|
||||
Format 2
|
||||
srcBegin = 98B4
|
||||
destBegin = 5975
|
||||
End of Item 0031
|
||||
|
||||
Begin of Item 0032
|
||||
Format 2
|
||||
srcBegin = 9904
|
||||
destBegin = 4B4C
|
||||
End of Item 0032
|
||||
|
||||
Begin of Item 0033
|
||||
Format 1
|
||||
srcBegin = 999B
|
||||
srcEnd = 999F
|
||||
mappingOffset = 001C
|
||||
Mapping =
|
||||
4B4E FFFD FFFD FFFD 5A26
|
||||
End of Item 0033
|
||||
|
||||
Begin of Item 0034
|
||||
Format 2
|
||||
srcBegin = 9B8D
|
||||
destBegin = 5A4A
|
||||
End of Item 0034
|
||||
|
||||
Begin of Item 0035
|
||||
Format 2
|
||||
srcBegin = 9BBA
|
||||
destBegin = 6679
|
||||
End of Item 0035
|
||||
|
||||
Begin of Item 0036
|
||||
Format 2
|
||||
srcBegin = 9BD8
|
||||
destBegin = 6B33
|
||||
End of Item 0036
|
||||
|
||||
Begin of Item 0037
|
||||
Format 1
|
||||
srcBegin = 9C1E
|
||||
srcEnd = 9C22
|
||||
mappingOffset = 0021
|
||||
Mapping =
|
||||
7251 FFFD 724B FFFD 724E
|
||||
End of Item 0037
|
||||
|
||||
Begin of Item 0038
|
||||
Format 2
|
||||
srcBegin = 9C43
|
||||
destBegin = 752D
|
||||
End of Item 0038
|
||||
|
||||
Begin of Item 0039
|
||||
Format 2
|
||||
srcBegin = 9C72
|
||||
destBegin = 7A53
|
||||
End of Item 0039
|
||||
|
||||
Begin of Item 003A
|
||||
Format 2
|
||||
srcBegin = 9D7C
|
||||
destBegin = 6B3F
|
||||
End of Item 003A
|
||||
|
||||
Begin of Item 003B
|
||||
Format 2
|
||||
srcBegin = 9DE0
|
||||
destBegin = 7545
|
||||
End of Item 003B
|
||||
|
||||
Begin of Item 003C
|
||||
Format 2
|
||||
srcBegin = 9E77
|
||||
destBegin = 5A5B
|
||||
End of Item 003C
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x003D,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0014,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x00CB,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0006 */
|
||||
/* Total of Format 2 : 0x0037 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2121, 0x2222, 0x2222, 0x2222, 0x2222, 0x1212, 0x2222, 0x2222,
|
||||
0x2222, 0x2222, 0x2222, 0x2222, 0x1222, 0x1222, 0x2222, 0x0002,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0014 Start of MapCell Array */
|
||||
/* 0000 */ 0x52B6, 0x52BA, 0x0000,
|
||||
/* 0001 */ 0x52DC, 0x0000, 0x366A,
|
||||
/* 0002 */ 0x52E8, 0x52F6, 0x0005,
|
||||
/* 0003 */ 0x5324, 0x0000, 0x234B,
|
||||
/* 0004 */ 0x5921, 0x0000, 0x373D,
|
||||
/* 0005 */ 0x5C2E, 0x0000, 0x2872,
|
||||
/* 0006 */ 0x5E07, 0x0000, 0x225C,
|
||||
/* 0007 */ 0x5E3F, 0x0000, 0x377C,
|
||||
/* 0008 */ 0x5FCB, 0x0000, 0x2266,
|
||||
/* 0009 */ 0x6117, 0x0000, 0x3F30,
|
||||
/* 000A */ 0x6184, 0x0000, 0x4D2A,
|
||||
/* 000B */ 0x6306, 0x0000, 0x2945,
|
||||
/* 000C */ 0x64CC, 0x0000, 0x545E,
|
||||
/* 000D */ 0x6729, 0x0000, 0x2148,
|
||||
/* 000E */ 0x688E, 0x0000, 0x327E,
|
||||
/* 000F */ 0x6B85, 0x0000, 0x2969,
|
||||
/* 0010 */ 0x6BA9, 0x0000, 0x5B72,
|
||||
/* 0011 */ 0x7228, 0x0000, 0x7B7B,
|
||||
/* 0012 */ 0x729F, 0x0000, 0x4E37,
|
||||
/* 0013 */ 0x7309, 0x0000, 0x3354,
|
||||
/* 0014 */ 0x7527, 0x0000, 0x4749,
|
||||
/* 0015 */ 0x764A, 0x764B, 0x0014,
|
||||
/* 0016 */ 0x76A2, 0x0000, 0x5C43,
|
||||
/* 0017 */ 0x798C, 0x7991, 0x0016,
|
||||
/* 0018 */ 0x7AB9, 0x0000, 0x5652,
|
||||
/* 0019 */ 0x7B3F, 0x0000, 0x3B24,
|
||||
/* 001A */ 0x7BD7, 0x0000, 0x5669,
|
||||
/* 001B */ 0x7C46, 0x0000, 0x6C79,
|
||||
/* 001C */ 0x7C61, 0x0000, 0x7347,
|
||||
/* 001D */ 0x83D0, 0x0000, 0x3B6F,
|
||||
/* 001E */ 0x8660, 0x0000, 0x494E,
|
||||
/* 001F */ 0x86E7, 0x0000, 0x3B7B,
|
||||
/* 0020 */ 0x8714, 0x0000, 0x425D,
|
||||
/* 0021 */ 0x8770, 0x0000, 0x5055,
|
||||
/* 0022 */ 0x87F1, 0x0000, 0x6448,
|
||||
/* 0023 */ 0x8804, 0x0000, 0x6943,
|
||||
/* 0024 */ 0x88D1, 0x0000, 0x426C,
|
||||
/* 0025 */ 0x8970, 0x0000, 0x7438,
|
||||
/* 0026 */ 0x8A2F, 0x0000, 0x355B,
|
||||
/* 0027 */ 0x8C38, 0x0000, 0x3046,
|
||||
/* 0028 */ 0x8CCB, 0x0000, 0x432D,
|
||||
/* 0029 */ 0x8CE3, 0x0000, 0x513A,
|
||||
/* 002A */ 0x8E37, 0x0000, 0x5148,
|
||||
/* 002B */ 0x8ECE, 0x0000, 0x3055,
|
||||
/* 002C */ 0x8EED, 0x0000, 0x4350,
|
||||
/* 002D */ 0x9459, 0x0000, 0x765D,
|
||||
/* 002E */ 0x957E, 0x0000, 0x7156,
|
||||
/* 002F */ 0x9703, 0x0000, 0x523B,
|
||||
/* 0030 */ 0x9819, 0x0000, 0x4B3B,
|
||||
/* 0031 */ 0x98B4, 0x0000, 0x5975,
|
||||
/* 0032 */ 0x9904, 0x0000, 0x4B4C,
|
||||
/* 0033 */ 0x999B, 0x999F, 0x001C,
|
||||
/* 0034 */ 0x9B8D, 0x0000, 0x5A4A,
|
||||
/* 0035 */ 0x9BBA, 0x0000, 0x6679,
|
||||
/* 0036 */ 0x9BD8, 0x0000, 0x6B33,
|
||||
/* 0037 */ 0x9C1E, 0x9C22, 0x0021,
|
||||
/* 0038 */ 0x9C43, 0x0000, 0x752D,
|
||||
/* 0039 */ 0x9C72, 0x0000, 0x7A53,
|
||||
/* 003A */ 0x9D7C, 0x0000, 0x6B3F,
|
||||
/* 003B */ 0x9DE0, 0x0000, 0x7545,
|
||||
/* 003C */ 0x9E77, 0x0000, 0x5A5B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x00CB Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x253A, 0x2537, 0x2538, 0xFFFD, 0x253B, 0x4467, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0x4463, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x5362, 0x5569, 0x5C36, 0x477E, 0xFFFD,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x4822, 0x4B4E, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0020 */ 0x5A26, 0x7251, 0xFFFD, 0x724B, 0xFFFD, 0x724E,
|
||||
/* End of table Total Length = 0x00F1 * 2 */
|
|
@ -1,501 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 2
|
||||
srcBegin = 2148
|
||||
destBegin = 6729
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 1
|
||||
srcBegin = 225C
|
||||
srcEnd = 2266
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
5E07 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 5FCB
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 234B
|
||||
destBegin = 5324
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 1
|
||||
srcBegin = 2537
|
||||
srcEnd = 253B
|
||||
mappingOffset = 000B
|
||||
Mapping =
|
||||
52B7 52B8 FFFD 52B6 52BA
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 2872
|
||||
destBegin = 5C2E
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 2945
|
||||
destBegin = 6306
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 2969
|
||||
destBegin = 6B85
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 3046
|
||||
destBegin = 8C38
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 3055
|
||||
destBegin = 8ECE
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 327E
|
||||
destBegin = 688E
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 3354
|
||||
destBegin = 7309
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 355B
|
||||
destBegin = 8A2F
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 366A
|
||||
destBegin = 52DC
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 373D
|
||||
destBegin = 5921
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 377C
|
||||
destBegin = 5E3F
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 3B24
|
||||
destBegin = 7B3F
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 3B6F
|
||||
destBegin = 83D0
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 3B7B
|
||||
destBegin = 86E7
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 3F30
|
||||
destBegin = 6117
|
||||
End of Item 0012
|
||||
|
||||
Begin of Item 0013
|
||||
Format 2
|
||||
srcBegin = 425D
|
||||
destBegin = 8714
|
||||
End of Item 0013
|
||||
|
||||
Begin of Item 0014
|
||||
Format 2
|
||||
srcBegin = 426C
|
||||
destBegin = 88D1
|
||||
End of Item 0014
|
||||
|
||||
Begin of Item 0015
|
||||
Format 2
|
||||
srcBegin = 432D
|
||||
destBegin = 8CCB
|
||||
End of Item 0015
|
||||
|
||||
Begin of Item 0016
|
||||
Format 2
|
||||
srcBegin = 4350
|
||||
destBegin = 8EED
|
||||
End of Item 0016
|
||||
|
||||
Begin of Item 0017
|
||||
Format 1
|
||||
srcBegin = 4463
|
||||
srcEnd = 4467
|
||||
mappingOffset = 0010
|
||||
Mapping =
|
||||
52EC FFFD FFFD FFFD 52E8
|
||||
End of Item 0017
|
||||
|
||||
Begin of Item 0018
|
||||
Format 2
|
||||
srcBegin = 4749
|
||||
destBegin = 7527
|
||||
End of Item 0018
|
||||
|
||||
Begin of Item 0019
|
||||
Format 2
|
||||
srcBegin = 477E
|
||||
destBegin = 798C
|
||||
End of Item 0019
|
||||
|
||||
Begin of Item 001A
|
||||
Format 2
|
||||
srcBegin = 4822
|
||||
destBegin = 7991
|
||||
End of Item 001A
|
||||
|
||||
Begin of Item 001B
|
||||
Format 2
|
||||
srcBegin = 494E
|
||||
destBegin = 8660
|
||||
End of Item 001B
|
||||
|
||||
Begin of Item 001C
|
||||
Format 2
|
||||
srcBegin = 4B3B
|
||||
destBegin = 9819
|
||||
End of Item 001C
|
||||
|
||||
Begin of Item 001D
|
||||
Format 1
|
||||
srcBegin = 4B4C
|
||||
srcEnd = 4B4E
|
||||
mappingOffset = 0015
|
||||
Mapping =
|
||||
9904 FFFD 999B
|
||||
End of Item 001D
|
||||
|
||||
Begin of Item 001E
|
||||
Format 2
|
||||
srcBegin = 4D2A
|
||||
destBegin = 6184
|
||||
End of Item 001E
|
||||
|
||||
Begin of Item 001F
|
||||
Format 2
|
||||
srcBegin = 4E37
|
||||
destBegin = 729F
|
||||
End of Item 001F
|
||||
|
||||
Begin of Item 0020
|
||||
Format 2
|
||||
srcBegin = 5055
|
||||
destBegin = 8770
|
||||
End of Item 0020
|
||||
|
||||
Begin of Item 0021
|
||||
Format 2
|
||||
srcBegin = 513A
|
||||
destBegin = 8CE3
|
||||
End of Item 0021
|
||||
|
||||
Begin of Item 0022
|
||||
Format 2
|
||||
srcBegin = 5148
|
||||
destBegin = 8E37
|
||||
End of Item 0022
|
||||
|
||||
Begin of Item 0023
|
||||
Format 2
|
||||
srcBegin = 523B
|
||||
destBegin = 9703
|
||||
End of Item 0023
|
||||
|
||||
Begin of Item 0024
|
||||
Format 2
|
||||
srcBegin = 5362
|
||||
destBegin = 52F6
|
||||
End of Item 0024
|
||||
|
||||
Begin of Item 0025
|
||||
Format 2
|
||||
srcBegin = 545E
|
||||
destBegin = 64CC
|
||||
End of Item 0025
|
||||
|
||||
Begin of Item 0026
|
||||
Format 2
|
||||
srcBegin = 5569
|
||||
destBegin = 764A
|
||||
End of Item 0026
|
||||
|
||||
Begin of Item 0027
|
||||
Format 2
|
||||
srcBegin = 5652
|
||||
destBegin = 7AB9
|
||||
End of Item 0027
|
||||
|
||||
Begin of Item 0028
|
||||
Format 2
|
||||
srcBegin = 5669
|
||||
destBegin = 7BD7
|
||||
End of Item 0028
|
||||
|
||||
Begin of Item 0029
|
||||
Format 2
|
||||
srcBegin = 5975
|
||||
destBegin = 98B4
|
||||
End of Item 0029
|
||||
|
||||
Begin of Item 002A
|
||||
Format 2
|
||||
srcBegin = 5A26
|
||||
destBegin = 999F
|
||||
End of Item 002A
|
||||
|
||||
Begin of Item 002B
|
||||
Format 2
|
||||
srcBegin = 5A4A
|
||||
destBegin = 9B8D
|
||||
End of Item 002B
|
||||
|
||||
Begin of Item 002C
|
||||
Format 2
|
||||
srcBegin = 5A5B
|
||||
destBegin = 9E77
|
||||
End of Item 002C
|
||||
|
||||
Begin of Item 002D
|
||||
Format 2
|
||||
srcBegin = 5B72
|
||||
destBegin = 6BA9
|
||||
End of Item 002D
|
||||
|
||||
Begin of Item 002E
|
||||
Format 2
|
||||
srcBegin = 5C36
|
||||
destBegin = 764B
|
||||
End of Item 002E
|
||||
|
||||
Begin of Item 002F
|
||||
Format 2
|
||||
srcBegin = 5C43
|
||||
destBegin = 76A2
|
||||
End of Item 002F
|
||||
|
||||
Begin of Item 0030
|
||||
Format 2
|
||||
srcBegin = 6448
|
||||
destBegin = 87F1
|
||||
End of Item 0030
|
||||
|
||||
Begin of Item 0031
|
||||
Format 2
|
||||
srcBegin = 6679
|
||||
destBegin = 9BBA
|
||||
End of Item 0031
|
||||
|
||||
Begin of Item 0032
|
||||
Format 2
|
||||
srcBegin = 6943
|
||||
destBegin = 8804
|
||||
End of Item 0032
|
||||
|
||||
Begin of Item 0033
|
||||
Format 2
|
||||
srcBegin = 6B33
|
||||
destBegin = 9BD8
|
||||
End of Item 0033
|
||||
|
||||
Begin of Item 0034
|
||||
Format 2
|
||||
srcBegin = 6B3F
|
||||
destBegin = 9D7C
|
||||
End of Item 0034
|
||||
|
||||
Begin of Item 0035
|
||||
Format 2
|
||||
srcBegin = 6C79
|
||||
destBegin = 7C46
|
||||
End of Item 0035
|
||||
|
||||
Begin of Item 0036
|
||||
Format 2
|
||||
srcBegin = 7156
|
||||
destBegin = 957E
|
||||
End of Item 0036
|
||||
|
||||
Begin of Item 0037
|
||||
Format 1
|
||||
srcBegin = 724B
|
||||
srcEnd = 7251
|
||||
mappingOffset = 0018
|
||||
Mapping =
|
||||
9C20 FFFD FFFD 9C22 FFFD FFFD 9C1E
|
||||
End of Item 0037
|
||||
|
||||
Begin of Item 0038
|
||||
Format 2
|
||||
srcBegin = 7347
|
||||
destBegin = 7C61
|
||||
End of Item 0038
|
||||
|
||||
Begin of Item 0039
|
||||
Format 2
|
||||
srcBegin = 7438
|
||||
destBegin = 8970
|
||||
End of Item 0039
|
||||
|
||||
Begin of Item 003A
|
||||
Format 2
|
||||
srcBegin = 752D
|
||||
destBegin = 9C43
|
||||
End of Item 003A
|
||||
|
||||
Begin of Item 003B
|
||||
Format 2
|
||||
srcBegin = 7545
|
||||
destBegin = 9DE0
|
||||
End of Item 003B
|
||||
|
||||
Begin of Item 003C
|
||||
Format 2
|
||||
srcBegin = 765D
|
||||
destBegin = 9459
|
||||
End of Item 003C
|
||||
|
||||
Begin of Item 003D
|
||||
Format 2
|
||||
srcBegin = 7A53
|
||||
destBegin = 9C72
|
||||
End of Item 003D
|
||||
|
||||
Begin of Item 003E
|
||||
Format 2
|
||||
srcBegin = 7B7B
|
||||
destBegin = 7228
|
||||
End of Item 003E
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x003F,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0014,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x00D1,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0005 */
|
||||
/* Total of Format 2 : 0x003A */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x1212, 0x2222, 0x2222, 0x2222, 0x2222, 0x1222, 0x2222, 0x2212,
|
||||
0x2222, 0x2222, 0x2222, 0x2222, 0x2222, 0x1222, 0x2222, 0x0222,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0014 Start of MapCell Array */
|
||||
/* 0000 */ 0x2148, 0x0000, 0x6729,
|
||||
/* 0001 */ 0x225C, 0x2266, 0x0000,
|
||||
/* 0002 */ 0x234B, 0x0000, 0x5324,
|
||||
/* 0003 */ 0x2537, 0x253B, 0x000B,
|
||||
/* 0004 */ 0x2872, 0x0000, 0x5C2E,
|
||||
/* 0005 */ 0x2945, 0x0000, 0x6306,
|
||||
/* 0006 */ 0x2969, 0x0000, 0x6B85,
|
||||
/* 0007 */ 0x3046, 0x0000, 0x8C38,
|
||||
/* 0008 */ 0x3055, 0x0000, 0x8ECE,
|
||||
/* 0009 */ 0x327E, 0x0000, 0x688E,
|
||||
/* 000A */ 0x3354, 0x0000, 0x7309,
|
||||
/* 000B */ 0x355B, 0x0000, 0x8A2F,
|
||||
/* 000C */ 0x366A, 0x0000, 0x52DC,
|
||||
/* 000D */ 0x373D, 0x0000, 0x5921,
|
||||
/* 000E */ 0x377C, 0x0000, 0x5E3F,
|
||||
/* 000F */ 0x3B24, 0x0000, 0x7B3F,
|
||||
/* 0010 */ 0x3B6F, 0x0000, 0x83D0,
|
||||
/* 0011 */ 0x3B7B, 0x0000, 0x86E7,
|
||||
/* 0012 */ 0x3F30, 0x0000, 0x6117,
|
||||
/* 0013 */ 0x425D, 0x0000, 0x8714,
|
||||
/* 0014 */ 0x426C, 0x0000, 0x88D1,
|
||||
/* 0015 */ 0x432D, 0x0000, 0x8CCB,
|
||||
/* 0016 */ 0x4350, 0x0000, 0x8EED,
|
||||
/* 0017 */ 0x4463, 0x4467, 0x0010,
|
||||
/* 0018 */ 0x4749, 0x0000, 0x7527,
|
||||
/* 0019 */ 0x477E, 0x0000, 0x798C,
|
||||
/* 001A */ 0x4822, 0x0000, 0x7991,
|
||||
/* 001B */ 0x494E, 0x0000, 0x8660,
|
||||
/* 001C */ 0x4B3B, 0x0000, 0x9819,
|
||||
/* 001D */ 0x4B4C, 0x4B4E, 0x0015,
|
||||
/* 001E */ 0x4D2A, 0x0000, 0x6184,
|
||||
/* 001F */ 0x4E37, 0x0000, 0x729F,
|
||||
/* 0020 */ 0x5055, 0x0000, 0x8770,
|
||||
/* 0021 */ 0x513A, 0x0000, 0x8CE3,
|
||||
/* 0022 */ 0x5148, 0x0000, 0x8E37,
|
||||
/* 0023 */ 0x523B, 0x0000, 0x9703,
|
||||
/* 0024 */ 0x5362, 0x0000, 0x52F6,
|
||||
/* 0025 */ 0x545E, 0x0000, 0x64CC,
|
||||
/* 0026 */ 0x5569, 0x0000, 0x764A,
|
||||
/* 0027 */ 0x5652, 0x0000, 0x7AB9,
|
||||
/* 0028 */ 0x5669, 0x0000, 0x7BD7,
|
||||
/* 0029 */ 0x5975, 0x0000, 0x98B4,
|
||||
/* 002A */ 0x5A26, 0x0000, 0x999F,
|
||||
/* 002B */ 0x5A4A, 0x0000, 0x9B8D,
|
||||
/* 002C */ 0x5A5B, 0x0000, 0x9E77,
|
||||
/* 002D */ 0x5B72, 0x0000, 0x6BA9,
|
||||
/* 002E */ 0x5C36, 0x0000, 0x764B,
|
||||
/* 002F */ 0x5C43, 0x0000, 0x76A2,
|
||||
/* 0030 */ 0x6448, 0x0000, 0x87F1,
|
||||
/* 0031 */ 0x6679, 0x0000, 0x9BBA,
|
||||
/* 0032 */ 0x6943, 0x0000, 0x8804,
|
||||
/* 0033 */ 0x6B33, 0x0000, 0x9BD8,
|
||||
/* 0034 */ 0x6B3F, 0x0000, 0x9D7C,
|
||||
/* 0035 */ 0x6C79, 0x0000, 0x7C46,
|
||||
/* 0036 */ 0x7156, 0x0000, 0x957E,
|
||||
/* 0037 */ 0x724B, 0x7251, 0x0018,
|
||||
/* 0038 */ 0x7347, 0x0000, 0x7C61,
|
||||
/* 0039 */ 0x7438, 0x0000, 0x8970,
|
||||
/* 003A */ 0x752D, 0x0000, 0x9C43,
|
||||
/* 003B */ 0x7545, 0x0000, 0x9DE0,
|
||||
/* 003C */ 0x765D, 0x0000, 0x9459,
|
||||
/* 003D */ 0x7A53, 0x0000, 0x9C72,
|
||||
/* 003E */ 0x7B7B, 0x0000, 0x7228,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x00D1 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x5E07, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0x5FCB, 0x52B7, 0x52B8, 0xFFFD, 0x52B6, 0x52BA,
|
||||
/* 0010 */ 0x52EC, 0xFFFD, 0xFFFD, 0xFFFD, 0x52E8, 0x9904, 0xFFFD, 0x999B,
|
||||
/* 0018 */ 0x9C20, 0xFFFD, 0xFFFD, 0x9C22, 0xFFFD, 0xFFFD, 0x9C1E,
|
||||
/* End of table Total Length = 0x00F0 * 2 */
|
|
@ -1,706 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 2
|
||||
srcBegin = 4E38
|
||||
destBegin = 2131
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 2
|
||||
srcBegin = 4E44
|
||||
destBegin = 2123
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 5145
|
||||
destBegin = 2352
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 5185
|
||||
destBegin = 2150
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 5192
|
||||
destBegin = 316D
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 51F2
|
||||
destBegin = 4665
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 5203
|
||||
destBegin = 2138
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 5272
|
||||
destBegin = 4667
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 1
|
||||
srcBegin = 52C7
|
||||
srcEnd = 52C9
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
2F25 FFFD 3558
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 5305
|
||||
destBegin = 2246
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 5313
|
||||
destBegin = 5074
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 1
|
||||
srcBegin = 5351
|
||||
srcEnd = 536B
|
||||
mappingOffset = 0003
|
||||
Mapping =
|
||||
2F38 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD 4674 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD 2A21 FFFD FFFD FFFD
|
||||
FFFD FFFD 212D
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 53CA
|
||||
destBegin = 2161
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 53DE
|
||||
destBegin = 3578
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 53EB
|
||||
destBegin = 225B
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 5438
|
||||
destBegin = 264E
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 5510
|
||||
destBegin = 357E
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 5584
|
||||
destBegin = 472A
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 1
|
||||
srcBegin = 55AB
|
||||
srcEnd = 55B6
|
||||
mappingOffset = 001E
|
||||
Mapping =
|
||||
4731 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 4729
|
||||
End of Item 0012
|
||||
|
||||
Begin of Item 0013
|
||||
Format 2
|
||||
srcBegin = 55E0
|
||||
destBegin = 5143
|
||||
End of Item 0013
|
||||
|
||||
Begin of Item 0014
|
||||
Format 2
|
||||
srcBegin = 5606
|
||||
destBegin = 5136
|
||||
End of Item 0014
|
||||
|
||||
Begin of Item 0015
|
||||
Format 2
|
||||
srcBegin = 575A
|
||||
destBegin = 2667
|
||||
End of Item 0015
|
||||
|
||||
Begin of Item 0016
|
||||
Format 2
|
||||
srcBegin = 57CE
|
||||
destBegin = 3635
|
||||
End of Item 0016
|
||||
|
||||
Begin of Item 0017
|
||||
Format 2
|
||||
srcBegin = 5900
|
||||
destBegin = 5C2F
|
||||
End of Item 0017
|
||||
|
||||
Begin of Item 0018
|
||||
Format 2
|
||||
srcBegin = 5922
|
||||
destBegin = 515E
|
||||
End of Item 0018
|
||||
|
||||
Begin of Item 0019
|
||||
Format 2
|
||||
srcBegin = 5962
|
||||
destBegin = 4756
|
||||
End of Item 0019
|
||||
|
||||
Begin of Item 001A
|
||||
Format 2
|
||||
srcBegin = 5A30
|
||||
destBegin = 3657
|
||||
End of Item 001A
|
||||
|
||||
Begin of Item 001B
|
||||
Format 2
|
||||
srcBegin = 5A66
|
||||
destBegin = 3E50
|
||||
End of Item 001B
|
||||
|
||||
Begin of Item 001C
|
||||
Format 2
|
||||
srcBegin = 5BB2
|
||||
destBegin = 3666
|
||||
End of Item 001C
|
||||
|
||||
Begin of Item 001D
|
||||
Format 2
|
||||
srcBegin = 5BFF
|
||||
destBegin = 2721
|
||||
End of Item 001D
|
||||
|
||||
Begin of Item 001E
|
||||
Format 2
|
||||
srcBegin = 5D2B
|
||||
destBegin = 3E76
|
||||
End of Item 001E
|
||||
|
||||
Begin of Item 001F
|
||||
Format 2
|
||||
srcBegin = 5D43
|
||||
destBegin = 482B
|
||||
End of Item 001F
|
||||
|
||||
Begin of Item 0020
|
||||
Format 2
|
||||
srcBegin = 5DE1
|
||||
destBegin = 2736
|
||||
End of Item 0020
|
||||
|
||||
Begin of Item 0021
|
||||
Format 2
|
||||
srcBegin = 5DFD
|
||||
destBegin = 4837
|
||||
End of Item 0021
|
||||
|
||||
Begin of Item 0022
|
||||
Format 2
|
||||
srcBegin = 5E3D
|
||||
destBegin = 483C
|
||||
End of Item 0022
|
||||
|
||||
Begin of Item 0023
|
||||
Format 1
|
||||
srcBegin = 5EC3
|
||||
srcEnd = 5ECA
|
||||
mappingOffset = 002A
|
||||
Mapping =
|
||||
4845 FFFD FFFD FFFD FFFD FFFD FFFD 5240
|
||||
End of Item 0023
|
||||
|
||||
Begin of Item 0024
|
||||
Format 2
|
||||
srcBegin = 5FCD
|
||||
destBegin = 275F
|
||||
End of Item 0024
|
||||
|
||||
Begin of Item 0025
|
||||
Format 2
|
||||
srcBegin = 6139
|
||||
destBegin = 5264
|
||||
End of Item 0025
|
||||
|
||||
Begin of Item 0026
|
||||
Format 2
|
||||
srcBegin = 614E
|
||||
destBegin = 5266
|
||||
End of Item 0026
|
||||
|
||||
Begin of Item 0027
|
||||
Format 2
|
||||
srcBegin = 62B1
|
||||
destBegin = 2B63
|
||||
End of Item 0027
|
||||
|
||||
Begin of Item 0028
|
||||
Format 2
|
||||
srcBegin = 62E8
|
||||
destBegin = 2B60
|
||||
End of Item 0028
|
||||
|
||||
Begin of Item 0029
|
||||
Format 2
|
||||
srcBegin = 6368
|
||||
destBegin = 4036
|
||||
End of Item 0029
|
||||
|
||||
Begin of Item 002A
|
||||
Format 2
|
||||
srcBegin = 6383
|
||||
destBegin = 402B
|
||||
End of Item 002A
|
||||
|
||||
Begin of Item 002B
|
||||
Format 2
|
||||
srcBegin = 6530
|
||||
destBegin = 236C
|
||||
End of Item 002B
|
||||
|
||||
Begin of Item 002C
|
||||
Format 2
|
||||
srcBegin = 6577
|
||||
destBegin = 5D4B
|
||||
End of Item 002C
|
||||
|
||||
Begin of Item 002D
|
||||
Format 2
|
||||
srcBegin = 6691
|
||||
destBegin = 533C
|
||||
End of Item 002D
|
||||
|
||||
Begin of Item 002E
|
||||
Format 1
|
||||
srcBegin = 66F8
|
||||
srcEnd = 6700
|
||||
mappingOffset = 0032
|
||||
Mapping =
|
||||
3836 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
4978
|
||||
End of Item 002E
|
||||
|
||||
Begin of Item 002F
|
||||
Format 2
|
||||
srcBegin = 671B
|
||||
destBegin = 4058
|
||||
End of Item 002F
|
||||
|
||||
Begin of Item 0030
|
||||
Format 2
|
||||
srcBegin = 6753
|
||||
destBegin = 282E
|
||||
End of Item 0030
|
||||
|
||||
Begin of Item 0031
|
||||
Format 2
|
||||
srcBegin = 6804
|
||||
destBegin = 3172
|
||||
End of Item 0031
|
||||
|
||||
Begin of Item 0032
|
||||
Format 2
|
||||
srcBegin = 69A3
|
||||
destBegin = 5D68
|
||||
End of Item 0032
|
||||
|
||||
Begin of Item 0033
|
||||
Format 2
|
||||
srcBegin = 6B21
|
||||
destBegin = 2523
|
||||
End of Item 0033
|
||||
|
||||
Begin of Item 0034
|
||||
Format 2
|
||||
srcBegin = 6CBF
|
||||
destBegin = 2C5B
|
||||
End of Item 0034
|
||||
|
||||
Begin of Item 0035
|
||||
Format 2
|
||||
srcBegin = 6D3E
|
||||
destBegin = 3242
|
||||
End of Item 0035
|
||||
|
||||
Begin of Item 0036
|
||||
Format 2
|
||||
srcBegin = 6D69
|
||||
destBegin = 392D
|
||||
End of Item 0036
|
||||
|
||||
Begin of Item 0037
|
||||
Format 2
|
||||
srcBegin = 6D78
|
||||
destBegin = 3874
|
||||
End of Item 0037
|
||||
|
||||
Begin of Item 0038
|
||||
Format 2
|
||||
srcBegin = 6E2F
|
||||
destBegin = 4A65
|
||||
End of Item 0038
|
||||
|
||||
Begin of Item 0039
|
||||
Format 2
|
||||
srcBegin = 6E7F
|
||||
destBegin = 5444
|
||||
End of Item 0039
|
||||
|
||||
Begin of Item 003A
|
||||
Format 2
|
||||
srcBegin = 6ED7
|
||||
destBegin = 544E
|
||||
End of Item 003A
|
||||
|
||||
Begin of Item 003B
|
||||
Format 2
|
||||
srcBegin = 70AD
|
||||
destBegin = 3248
|
||||
End of Item 003B
|
||||
|
||||
Begin of Item 003C
|
||||
Format 2
|
||||
srcBegin = 733D
|
||||
destBegin = 547C
|
||||
End of Item 003C
|
||||
|
||||
Begin of Item 003D
|
||||
Format 2
|
||||
srcBegin = 76F4
|
||||
destBegin = 2D45
|
||||
End of Item 003D
|
||||
|
||||
Begin of Item 003E
|
||||
Format 2
|
||||
srcBegin = 771F
|
||||
destBegin = 3A2D
|
||||
End of Item 003E
|
||||
|
||||
Begin of Item 003F
|
||||
Format 2
|
||||
srcBegin = 7861
|
||||
destBegin = 4C2F
|
||||
End of Item 003F
|
||||
|
||||
Begin of Item 0040
|
||||
Format 1
|
||||
srcBegin = 7A01
|
||||
srcEnd = 7A06
|
||||
mappingOffset = 003B
|
||||
Mapping =
|
||||
4C48 FFFD FFFD FFFD FFFD 4C43
|
||||
End of Item 0040
|
||||
|
||||
Begin of Item 0041
|
||||
Format 2
|
||||
srcBegin = 7FE4
|
||||
destBegin = 6058
|
||||
End of Item 0041
|
||||
|
||||
Begin of Item 0042
|
||||
Format 2
|
||||
srcBegin = 8038
|
||||
destBegin = 3B21
|
||||
End of Item 0042
|
||||
|
||||
Begin of Item 0043
|
||||
Format 1
|
||||
srcBegin = 8081
|
||||
srcEnd = 8088
|
||||
mappingOffset = 0041
|
||||
Mapping =
|
||||
3B24 FFFD FFFD FFFD FFFD FFFD FFFD 6060
|
||||
End of Item 0043
|
||||
|
||||
Begin of Item 0044
|
||||
Format 2
|
||||
srcBegin = 80B2
|
||||
destBegin = 2D69
|
||||
End of Item 0044
|
||||
|
||||
Begin of Item 0045
|
||||
Format 2
|
||||
srcBegin = 8157
|
||||
destBegin = 4D47
|
||||
End of Item 0045
|
||||
|
||||
Begin of Item 0046
|
||||
Format 2
|
||||
srcBegin = 81F4
|
||||
destBegin = 3B3A
|
||||
End of Item 0046
|
||||
|
||||
Begin of Item 0047
|
||||
Format 2
|
||||
srcBegin = 828B
|
||||
destBegin = 2552
|
||||
End of Item 0047
|
||||
|
||||
Begin of Item 0048
|
||||
Format 2
|
||||
srcBegin = 829D
|
||||
destBegin = 2927
|
||||
End of Item 0048
|
||||
|
||||
Begin of Item 0049
|
||||
Format 2
|
||||
srcBegin = 82B1
|
||||
destBegin = 2928
|
||||
End of Item 0049
|
||||
|
||||
Begin of Item 004A
|
||||
Format 2
|
||||
srcBegin = 82BD
|
||||
destBegin = 2E22
|
||||
End of Item 004A
|
||||
|
||||
Begin of Item 004B
|
||||
Format 1
|
||||
srcBegin = 82E5
|
||||
srcEnd = 82E6
|
||||
mappingOffset = 0049
|
||||
Mapping =
|
||||
2E24 2E23
|
||||
End of Item 004B
|
||||
|
||||
Begin of Item 004C
|
||||
Format 1
|
||||
srcBegin = 83CA
|
||||
srcEnd = 83CC
|
||||
mappingOffset = 004B
|
||||
Mapping =
|
||||
443E FFFD 443C
|
||||
End of Item 004C
|
||||
|
||||
Begin of Item 004D
|
||||
Format 2
|
||||
srcBegin = 83DC
|
||||
destBegin = 443D
|
||||
End of Item 004D
|
||||
|
||||
Begin of Item 004E
|
||||
Format 2
|
||||
srcBegin = 83F7
|
||||
destBegin = 4D6E
|
||||
End of Item 004E
|
||||
|
||||
Begin of Item 004F
|
||||
Format 2
|
||||
srcBegin = 8457
|
||||
destBegin = 443B
|
||||
End of Item 004F
|
||||
|
||||
Begin of Item 0050
|
||||
Format 2
|
||||
srcBegin = 8650
|
||||
destBegin = 3447
|
||||
End of Item 0050
|
||||
|
||||
Begin of Item 0051
|
||||
Format 2
|
||||
srcBegin = 8849
|
||||
destBegin = 4E4F
|
||||
End of Item 0051
|
||||
|
||||
Begin of Item 0052
|
||||
Format 2
|
||||
srcBegin = 8999
|
||||
destBegin = 4E60
|
||||
End of Item 0052
|
||||
|
||||
Begin of Item 0053
|
||||
Format 2
|
||||
srcBegin = 8A24
|
||||
destBegin = 4470
|
||||
End of Item 0053
|
||||
|
||||
Begin of Item 0054
|
||||
Format 2
|
||||
srcBegin = 8D77
|
||||
destBegin = 3C3B
|
||||
End of Item 0054
|
||||
|
||||
Begin of Item 0055
|
||||
Format 2
|
||||
srcBegin = 8DC3
|
||||
destBegin = 4538
|
||||
End of Item 0055
|
||||
|
||||
Begin of Item 0056
|
||||
Format 2
|
||||
srcBegin = 8FEC
|
||||
destBegin = 3460
|
||||
End of Item 0056
|
||||
|
||||
Begin of Item 0057
|
||||
Format 2
|
||||
srcBegin = 921F
|
||||
destBegin = 4F6F
|
||||
End of Item 0057
|
||||
|
||||
Begin of Item 0058
|
||||
Format 2
|
||||
srcBegin = 9EBB
|
||||
destBegin = 463E
|
||||
End of Item 0058
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0059,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x001B,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0126,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0009 */
|
||||
/* Total of Format 2 : 0x0050 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2222, 0x2222, 0x1221, 0x2222, 0x2122, 0x2222, 0x2222, 0x2222,
|
||||
0x1222, 0x2222, 0x2222, 0x2122, 0x2222, 0x2222, 0x2222, 0x2222,
|
||||
0x1221, 0x2222, 0x1222, 0x2221, 0x2222, 0x2222, 0x0002,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x001B Start of MapCell Array */
|
||||
/* 0000 */ 0x4E38, 0x0000, 0x2131,
|
||||
/* 0001 */ 0x4E44, 0x0000, 0x2123,
|
||||
/* 0002 */ 0x5145, 0x0000, 0x2352,
|
||||
/* 0003 */ 0x5185, 0x0000, 0x2150,
|
||||
/* 0004 */ 0x5192, 0x0000, 0x316D,
|
||||
/* 0005 */ 0x51F2, 0x0000, 0x4665,
|
||||
/* 0006 */ 0x5203, 0x0000, 0x2138,
|
||||
/* 0007 */ 0x5272, 0x0000, 0x4667,
|
||||
/* 0008 */ 0x52C7, 0x52C9, 0x0000,
|
||||
/* 0009 */ 0x5305, 0x0000, 0x2246,
|
||||
/* 000A */ 0x5313, 0x0000, 0x5074,
|
||||
/* 000B */ 0x5351, 0x536B, 0x0003,
|
||||
/* 000C */ 0x53CA, 0x0000, 0x2161,
|
||||
/* 000D */ 0x53DE, 0x0000, 0x3578,
|
||||
/* 000E */ 0x53EB, 0x0000, 0x225B,
|
||||
/* 000F */ 0x5438, 0x0000, 0x264E,
|
||||
/* 0010 */ 0x5510, 0x0000, 0x357E,
|
||||
/* 0011 */ 0x5584, 0x0000, 0x472A,
|
||||
/* 0012 */ 0x55AB, 0x55B6, 0x001E,
|
||||
/* 0013 */ 0x55E0, 0x0000, 0x5143,
|
||||
/* 0014 */ 0x5606, 0x0000, 0x5136,
|
||||
/* 0015 */ 0x575A, 0x0000, 0x2667,
|
||||
/* 0016 */ 0x57CE, 0x0000, 0x3635,
|
||||
/* 0017 */ 0x5900, 0x0000, 0x5C2F,
|
||||
/* 0018 */ 0x5922, 0x0000, 0x515E,
|
||||
/* 0019 */ 0x5962, 0x0000, 0x4756,
|
||||
/* 001A */ 0x5A30, 0x0000, 0x3657,
|
||||
/* 001B */ 0x5A66, 0x0000, 0x3E50,
|
||||
/* 001C */ 0x5BB2, 0x0000, 0x3666,
|
||||
/* 001D */ 0x5BFF, 0x0000, 0x2721,
|
||||
/* 001E */ 0x5D2B, 0x0000, 0x3E76,
|
||||
/* 001F */ 0x5D43, 0x0000, 0x482B,
|
||||
/* 0020 */ 0x5DE1, 0x0000, 0x2736,
|
||||
/* 0021 */ 0x5DFD, 0x0000, 0x4837,
|
||||
/* 0022 */ 0x5E3D, 0x0000, 0x483C,
|
||||
/* 0023 */ 0x5EC3, 0x5ECA, 0x002A,
|
||||
/* 0024 */ 0x5FCD, 0x0000, 0x275F,
|
||||
/* 0025 */ 0x6139, 0x0000, 0x5264,
|
||||
/* 0026 */ 0x614E, 0x0000, 0x5266,
|
||||
/* 0027 */ 0x62B1, 0x0000, 0x2B63,
|
||||
/* 0028 */ 0x62E8, 0x0000, 0x2B60,
|
||||
/* 0029 */ 0x6368, 0x0000, 0x4036,
|
||||
/* 002A */ 0x6383, 0x0000, 0x402B,
|
||||
/* 002B */ 0x6530, 0x0000, 0x236C,
|
||||
/* 002C */ 0x6577, 0x0000, 0x5D4B,
|
||||
/* 002D */ 0x6691, 0x0000, 0x533C,
|
||||
/* 002E */ 0x66F8, 0x6700, 0x0032,
|
||||
/* 002F */ 0x671B, 0x0000, 0x4058,
|
||||
/* 0030 */ 0x6753, 0x0000, 0x282E,
|
||||
/* 0031 */ 0x6804, 0x0000, 0x3172,
|
||||
/* 0032 */ 0x69A3, 0x0000, 0x5D68,
|
||||
/* 0033 */ 0x6B21, 0x0000, 0x2523,
|
||||
/* 0034 */ 0x6CBF, 0x0000, 0x2C5B,
|
||||
/* 0035 */ 0x6D3E, 0x0000, 0x3242,
|
||||
/* 0036 */ 0x6D69, 0x0000, 0x392D,
|
||||
/* 0037 */ 0x6D78, 0x0000, 0x3874,
|
||||
/* 0038 */ 0x6E2F, 0x0000, 0x4A65,
|
||||
/* 0039 */ 0x6E7F, 0x0000, 0x5444,
|
||||
/* 003A */ 0x6ED7, 0x0000, 0x544E,
|
||||
/* 003B */ 0x70AD, 0x0000, 0x3248,
|
||||
/* 003C */ 0x733D, 0x0000, 0x547C,
|
||||
/* 003D */ 0x76F4, 0x0000, 0x2D45,
|
||||
/* 003E */ 0x771F, 0x0000, 0x3A2D,
|
||||
/* 003F */ 0x7861, 0x0000, 0x4C2F,
|
||||
/* 0040 */ 0x7A01, 0x7A06, 0x003B,
|
||||
/* 0041 */ 0x7FE4, 0x0000, 0x6058,
|
||||
/* 0042 */ 0x8038, 0x0000, 0x3B21,
|
||||
/* 0043 */ 0x8081, 0x8088, 0x0041,
|
||||
/* 0044 */ 0x80B2, 0x0000, 0x2D69,
|
||||
/* 0045 */ 0x8157, 0x0000, 0x4D47,
|
||||
/* 0046 */ 0x81F4, 0x0000, 0x3B3A,
|
||||
/* 0047 */ 0x828B, 0x0000, 0x2552,
|
||||
/* 0048 */ 0x829D, 0x0000, 0x2927,
|
||||
/* 0049 */ 0x82B1, 0x0000, 0x2928,
|
||||
/* 004A */ 0x82BD, 0x0000, 0x2E22,
|
||||
/* 004B */ 0x82E5, 0x82E6, 0x0049,
|
||||
/* 004C */ 0x83CA, 0x83CC, 0x004B,
|
||||
/* 004D */ 0x83DC, 0x0000, 0x443D,
|
||||
/* 004E */ 0x83F7, 0x0000, 0x4D6E,
|
||||
/* 004F */ 0x8457, 0x0000, 0x443B,
|
||||
/* 0050 */ 0x8650, 0x0000, 0x3447,
|
||||
/* 0051 */ 0x8849, 0x0000, 0x4E4F,
|
||||
/* 0052 */ 0x8999, 0x0000, 0x4E60,
|
||||
/* 0053 */ 0x8A24, 0x0000, 0x4470,
|
||||
/* 0054 */ 0x8D77, 0x0000, 0x3C3B,
|
||||
/* 0055 */ 0x8DC3, 0x0000, 0x4538,
|
||||
/* 0056 */ 0x8FEC, 0x0000, 0x3460,
|
||||
/* 0057 */ 0x921F, 0x0000, 0x4F6F,
|
||||
/* 0058 */ 0x9EBB, 0x0000, 0x463E,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0126 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x2F25, 0xFFFD, 0x3558, 0x2F38, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x4674, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x2A21,
|
||||
/* 0018 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x212D, 0x4731, 0xFFFD,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0028 */ 0xFFFD, 0x4729, 0x4845, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0x5240, 0x3836, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0x4978, 0x4C48, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0x4C43, 0x3B24, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0048 */ 0x6060, 0x2E24, 0x2E23, 0x443E, 0xFFFD, 0x443C,
|
||||
/* End of table Total Length = 0x0174 * 2 */
|
|
@ -1,647 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 1
|
||||
srcBegin = 2123
|
||||
srcEnd = 2138
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
4E44 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 536B FFFD FFFD FFFD 4E38 FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD 5203
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 2
|
||||
srcBegin = 2150
|
||||
destBegin = 5185
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 2161
|
||||
destBegin = 53CA
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 2246
|
||||
destBegin = 5305
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 225B
|
||||
destBegin = 53EB
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 2352
|
||||
destBegin = 5145
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 236C
|
||||
destBegin = 6530
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 2523
|
||||
destBegin = 6B21
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 2552
|
||||
destBegin = 828B
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 264E
|
||||
destBegin = 5438
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 2667
|
||||
destBegin = 575A
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 2721
|
||||
destBegin = 5BFF
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 2736
|
||||
destBegin = 5DE1
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 275F
|
||||
destBegin = 5FCD
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 282E
|
||||
destBegin = 6753
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 1
|
||||
srcBegin = 2927
|
||||
srcEnd = 2928
|
||||
mappingOffset = 0016
|
||||
Mapping =
|
||||
829D 82B1
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 2A21
|
||||
destBegin = 5365
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 1
|
||||
srcBegin = 2B60
|
||||
srcEnd = 2B63
|
||||
mappingOffset = 0018
|
||||
Mapping =
|
||||
62E8 FFFD FFFD 62B1
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 2C5B
|
||||
destBegin = 6CBF
|
||||
End of Item 0012
|
||||
|
||||
Begin of Item 0013
|
||||
Format 2
|
||||
srcBegin = 2D45
|
||||
destBegin = 76F4
|
||||
End of Item 0013
|
||||
|
||||
Begin of Item 0014
|
||||
Format 2
|
||||
srcBegin = 2D69
|
||||
destBegin = 80B2
|
||||
End of Item 0014
|
||||
|
||||
Begin of Item 0015
|
||||
Format 1
|
||||
srcBegin = 2E22
|
||||
srcEnd = 2E24
|
||||
mappingOffset = 001C
|
||||
Mapping =
|
||||
82BD 82E6 82E5
|
||||
End of Item 0015
|
||||
|
||||
Begin of Item 0016
|
||||
Format 2
|
||||
srcBegin = 2F25
|
||||
destBegin = 52C7
|
||||
End of Item 0016
|
||||
|
||||
Begin of Item 0017
|
||||
Format 2
|
||||
srcBegin = 2F38
|
||||
destBegin = 5351
|
||||
End of Item 0017
|
||||
|
||||
Begin of Item 0018
|
||||
Format 1
|
||||
srcBegin = 316D
|
||||
srcEnd = 3172
|
||||
mappingOffset = 001F
|
||||
Mapping =
|
||||
5192 FFFD FFFD FFFD FFFD 6804
|
||||
End of Item 0018
|
||||
|
||||
Begin of Item 0019
|
||||
Format 1
|
||||
srcBegin = 3242
|
||||
srcEnd = 3248
|
||||
mappingOffset = 0025
|
||||
Mapping =
|
||||
6D3E FFFD FFFD FFFD FFFD FFFD 70AD
|
||||
End of Item 0019
|
||||
|
||||
Begin of Item 001A
|
||||
Format 2
|
||||
srcBegin = 3447
|
||||
destBegin = 8650
|
||||
End of Item 001A
|
||||
|
||||
Begin of Item 001B
|
||||
Format 2
|
||||
srcBegin = 3460
|
||||
destBegin = 8FEC
|
||||
End of Item 001B
|
||||
|
||||
Begin of Item 001C
|
||||
Format 2
|
||||
srcBegin = 3558
|
||||
destBegin = 52C9
|
||||
End of Item 001C
|
||||
|
||||
Begin of Item 001D
|
||||
Format 1
|
||||
srcBegin = 3578
|
||||
srcEnd = 357E
|
||||
mappingOffset = 002C
|
||||
Mapping =
|
||||
53DE FFFD FFFD FFFD FFFD FFFD 5510
|
||||
End of Item 001D
|
||||
|
||||
Begin of Item 001E
|
||||
Format 2
|
||||
srcBegin = 3635
|
||||
destBegin = 57CE
|
||||
End of Item 001E
|
||||
|
||||
Begin of Item 001F
|
||||
Format 2
|
||||
srcBegin = 3657
|
||||
destBegin = 5A30
|
||||
End of Item 001F
|
||||
|
||||
Begin of Item 0020
|
||||
Format 2
|
||||
srcBegin = 3666
|
||||
destBegin = 5BB2
|
||||
End of Item 0020
|
||||
|
||||
Begin of Item 0021
|
||||
Format 2
|
||||
srcBegin = 3836
|
||||
destBegin = 66F8
|
||||
End of Item 0021
|
||||
|
||||
Begin of Item 0022
|
||||
Format 2
|
||||
srcBegin = 3874
|
||||
destBegin = 6D78
|
||||
End of Item 0022
|
||||
|
||||
Begin of Item 0023
|
||||
Format 2
|
||||
srcBegin = 392D
|
||||
destBegin = 6D69
|
||||
End of Item 0023
|
||||
|
||||
Begin of Item 0024
|
||||
Format 2
|
||||
srcBegin = 3A2D
|
||||
destBegin = 771F
|
||||
End of Item 0024
|
||||
|
||||
Begin of Item 0025
|
||||
Format 1
|
||||
srcBegin = 3B21
|
||||
srcEnd = 3B24
|
||||
mappingOffset = 0033
|
||||
Mapping =
|
||||
8038 FFFD FFFD 8081
|
||||
End of Item 0025
|
||||
|
||||
Begin of Item 0026
|
||||
Format 2
|
||||
srcBegin = 3B3A
|
||||
destBegin = 81F4
|
||||
End of Item 0026
|
||||
|
||||
Begin of Item 0027
|
||||
Format 2
|
||||
srcBegin = 3C3B
|
||||
destBegin = 8D77
|
||||
End of Item 0027
|
||||
|
||||
Begin of Item 0028
|
||||
Format 2
|
||||
srcBegin = 3E50
|
||||
destBegin = 5A66
|
||||
End of Item 0028
|
||||
|
||||
Begin of Item 0029
|
||||
Format 2
|
||||
srcBegin = 3E76
|
||||
destBegin = 5D2B
|
||||
End of Item 0029
|
||||
|
||||
Begin of Item 002A
|
||||
Format 1
|
||||
srcBegin = 402B
|
||||
srcEnd = 4036
|
||||
mappingOffset = 0037
|
||||
Mapping =
|
||||
6383 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD FFFD 6368
|
||||
End of Item 002A
|
||||
|
||||
Begin of Item 002B
|
||||
Format 2
|
||||
srcBegin = 4058
|
||||
destBegin = 671B
|
||||
End of Item 002B
|
||||
|
||||
Begin of Item 002C
|
||||
Format 1
|
||||
srcBegin = 443B
|
||||
srcEnd = 443E
|
||||
mappingOffset = 0043
|
||||
Mapping =
|
||||
8457 83CC 83DC 83CA
|
||||
End of Item 002C
|
||||
|
||||
Begin of Item 002D
|
||||
Format 2
|
||||
srcBegin = 4470
|
||||
destBegin = 8A24
|
||||
End of Item 002D
|
||||
|
||||
Begin of Item 002E
|
||||
Format 2
|
||||
srcBegin = 4538
|
||||
destBegin = 8DC3
|
||||
End of Item 002E
|
||||
|
||||
Begin of Item 002F
|
||||
Format 2
|
||||
srcBegin = 463E
|
||||
destBegin = 9EBB
|
||||
End of Item 002F
|
||||
|
||||
Begin of Item 0030
|
||||
Format 1
|
||||
srcBegin = 4665
|
||||
srcEnd = 4667
|
||||
mappingOffset = 0047
|
||||
Mapping =
|
||||
51F2 FFFD 5272
|
||||
End of Item 0030
|
||||
|
||||
Begin of Item 0031
|
||||
Format 2
|
||||
srcBegin = 4674
|
||||
destBegin = 535A
|
||||
End of Item 0031
|
||||
|
||||
Begin of Item 0032
|
||||
Format 1
|
||||
srcBegin = 4729
|
||||
srcEnd = 4731
|
||||
mappingOffset = 004A
|
||||
Mapping =
|
||||
55B6 5584 FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
55AB
|
||||
End of Item 0032
|
||||
|
||||
Begin of Item 0033
|
||||
Format 2
|
||||
srcBegin = 4756
|
||||
destBegin = 5962
|
||||
End of Item 0033
|
||||
|
||||
Begin of Item 0034
|
||||
Format 2
|
||||
srcBegin = 482B
|
||||
destBegin = 5D43
|
||||
End of Item 0034
|
||||
|
||||
Begin of Item 0035
|
||||
Format 1
|
||||
srcBegin = 4837
|
||||
srcEnd = 4845
|
||||
mappingOffset = 0053
|
||||
Mapping =
|
||||
5DFD FFFD FFFD FFFD FFFD 5E3D FFFD FFFD
|
||||
FFFD FFFD FFFD FFFD FFFD FFFD 5EC3
|
||||
End of Item 0035
|
||||
|
||||
Begin of Item 0036
|
||||
Format 2
|
||||
srcBegin = 4978
|
||||
destBegin = 6700
|
||||
End of Item 0036
|
||||
|
||||
Begin of Item 0037
|
||||
Format 2
|
||||
srcBegin = 4A65
|
||||
destBegin = 6E2F
|
||||
End of Item 0037
|
||||
|
||||
Begin of Item 0038
|
||||
Format 2
|
||||
srcBegin = 4C2F
|
||||
destBegin = 7861
|
||||
End of Item 0038
|
||||
|
||||
Begin of Item 0039
|
||||
Format 1
|
||||
srcBegin = 4C43
|
||||
srcEnd = 4C48
|
||||
mappingOffset = 0062
|
||||
Mapping =
|
||||
7A06 FFFD FFFD FFFD FFFD 7A01
|
||||
End of Item 0039
|
||||
|
||||
Begin of Item 003A
|
||||
Format 2
|
||||
srcBegin = 4D47
|
||||
destBegin = 8157
|
||||
End of Item 003A
|
||||
|
||||
Begin of Item 003B
|
||||
Format 2
|
||||
srcBegin = 4D6E
|
||||
destBegin = 83F7
|
||||
End of Item 003B
|
||||
|
||||
Begin of Item 003C
|
||||
Format 2
|
||||
srcBegin = 4E4F
|
||||
destBegin = 8849
|
||||
End of Item 003C
|
||||
|
||||
Begin of Item 003D
|
||||
Format 2
|
||||
srcBegin = 4E60
|
||||
destBegin = 8999
|
||||
End of Item 003D
|
||||
|
||||
Begin of Item 003E
|
||||
Format 2
|
||||
srcBegin = 4F6F
|
||||
destBegin = 921F
|
||||
End of Item 003E
|
||||
|
||||
Begin of Item 003F
|
||||
Format 2
|
||||
srcBegin = 5074
|
||||
destBegin = 5313
|
||||
End of Item 003F
|
||||
|
||||
Begin of Item 0040
|
||||
Format 2
|
||||
srcBegin = 5136
|
||||
destBegin = 5606
|
||||
End of Item 0040
|
||||
|
||||
Begin of Item 0041
|
||||
Format 2
|
||||
srcBegin = 5143
|
||||
destBegin = 55E0
|
||||
End of Item 0041
|
||||
|
||||
Begin of Item 0042
|
||||
Format 2
|
||||
srcBegin = 515E
|
||||
destBegin = 5922
|
||||
End of Item 0042
|
||||
|
||||
Begin of Item 0043
|
||||
Format 2
|
||||
srcBegin = 5240
|
||||
destBegin = 5ECA
|
||||
End of Item 0043
|
||||
|
||||
Begin of Item 0044
|
||||
Format 1
|
||||
srcBegin = 5264
|
||||
srcEnd = 5266
|
||||
mappingOffset = 0068
|
||||
Mapping =
|
||||
6139 FFFD 614E
|
||||
End of Item 0044
|
||||
|
||||
Begin of Item 0045
|
||||
Format 2
|
||||
srcBegin = 533C
|
||||
destBegin = 6691
|
||||
End of Item 0045
|
||||
|
||||
Begin of Item 0046
|
||||
Format 1
|
||||
srcBegin = 5444
|
||||
srcEnd = 544E
|
||||
mappingOffset = 006B
|
||||
Mapping =
|
||||
6E7F FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
FFFD FFFD 6ED7
|
||||
End of Item 0046
|
||||
|
||||
Begin of Item 0047
|
||||
Format 2
|
||||
srcBegin = 547C
|
||||
destBegin = 733D
|
||||
End of Item 0047
|
||||
|
||||
Begin of Item 0048
|
||||
Format 2
|
||||
srcBegin = 5C2F
|
||||
destBegin = 5900
|
||||
End of Item 0048
|
||||
|
||||
Begin of Item 0049
|
||||
Format 2
|
||||
srcBegin = 5D4B
|
||||
destBegin = 6577
|
||||
End of Item 0049
|
||||
|
||||
Begin of Item 004A
|
||||
Format 2
|
||||
srcBegin = 5D68
|
||||
destBegin = 69A3
|
||||
End of Item 004A
|
||||
|
||||
Begin of Item 004B
|
||||
Format 1
|
||||
srcBegin = 6058
|
||||
srcEnd = 6060
|
||||
mappingOffset = 0076
|
||||
Mapping =
|
||||
7FE4 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
8088
|
||||
End of Item 004B
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x004C,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0018,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x00FC,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0011 */
|
||||
/* Total of Format 2 : 0x003B */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2221, 0x2222, 0x2222, 0x1222, 0x2212, 0x2212, 0x2211, 0x2212,
|
||||
0x2222, 0x2212, 0x2122, 0x2221, 0x2121, 0x2212, 0x2212, 0x2222,
|
||||
0x2222, 0x2121, 0x1222, 0x0000,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0018 Start of MapCell Array */
|
||||
/* 0000 */ 0x2123, 0x2138, 0x0000,
|
||||
/* 0001 */ 0x2150, 0x0000, 0x5185,
|
||||
/* 0002 */ 0x2161, 0x0000, 0x53CA,
|
||||
/* 0003 */ 0x2246, 0x0000, 0x5305,
|
||||
/* 0004 */ 0x225B, 0x0000, 0x53EB,
|
||||
/* 0005 */ 0x2352, 0x0000, 0x5145,
|
||||
/* 0006 */ 0x236C, 0x0000, 0x6530,
|
||||
/* 0007 */ 0x2523, 0x0000, 0x6B21,
|
||||
/* 0008 */ 0x2552, 0x0000, 0x828B,
|
||||
/* 0009 */ 0x264E, 0x0000, 0x5438,
|
||||
/* 000A */ 0x2667, 0x0000, 0x575A,
|
||||
/* 000B */ 0x2721, 0x0000, 0x5BFF,
|
||||
/* 000C */ 0x2736, 0x0000, 0x5DE1,
|
||||
/* 000D */ 0x275F, 0x0000, 0x5FCD,
|
||||
/* 000E */ 0x282E, 0x0000, 0x6753,
|
||||
/* 000F */ 0x2927, 0x2928, 0x0016,
|
||||
/* 0010 */ 0x2A21, 0x0000, 0x5365,
|
||||
/* 0011 */ 0x2B60, 0x2B63, 0x0018,
|
||||
/* 0012 */ 0x2C5B, 0x0000, 0x6CBF,
|
||||
/* 0013 */ 0x2D45, 0x0000, 0x76F4,
|
||||
/* 0014 */ 0x2D69, 0x0000, 0x80B2,
|
||||
/* 0015 */ 0x2E22, 0x2E24, 0x001C,
|
||||
/* 0016 */ 0x2F25, 0x0000, 0x52C7,
|
||||
/* 0017 */ 0x2F38, 0x0000, 0x5351,
|
||||
/* 0018 */ 0x316D, 0x3172, 0x001F,
|
||||
/* 0019 */ 0x3242, 0x3248, 0x0025,
|
||||
/* 001A */ 0x3447, 0x0000, 0x8650,
|
||||
/* 001B */ 0x3460, 0x0000, 0x8FEC,
|
||||
/* 001C */ 0x3558, 0x0000, 0x52C9,
|
||||
/* 001D */ 0x3578, 0x357E, 0x002C,
|
||||
/* 001E */ 0x3635, 0x0000, 0x57CE,
|
||||
/* 001F */ 0x3657, 0x0000, 0x5A30,
|
||||
/* 0020 */ 0x3666, 0x0000, 0x5BB2,
|
||||
/* 0021 */ 0x3836, 0x0000, 0x66F8,
|
||||
/* 0022 */ 0x3874, 0x0000, 0x6D78,
|
||||
/* 0023 */ 0x392D, 0x0000, 0x6D69,
|
||||
/* 0024 */ 0x3A2D, 0x0000, 0x771F,
|
||||
/* 0025 */ 0x3B21, 0x3B24, 0x0033,
|
||||
/* 0026 */ 0x3B3A, 0x0000, 0x81F4,
|
||||
/* 0027 */ 0x3C3B, 0x0000, 0x8D77,
|
||||
/* 0028 */ 0x3E50, 0x0000, 0x5A66,
|
||||
/* 0029 */ 0x3E76, 0x0000, 0x5D2B,
|
||||
/* 002A */ 0x402B, 0x4036, 0x0037,
|
||||
/* 002B */ 0x4058, 0x0000, 0x671B,
|
||||
/* 002C */ 0x443B, 0x443E, 0x0043,
|
||||
/* 002D */ 0x4470, 0x0000, 0x8A24,
|
||||
/* 002E */ 0x4538, 0x0000, 0x8DC3,
|
||||
/* 002F */ 0x463E, 0x0000, 0x9EBB,
|
||||
/* 0030 */ 0x4665, 0x4667, 0x0047,
|
||||
/* 0031 */ 0x4674, 0x0000, 0x535A,
|
||||
/* 0032 */ 0x4729, 0x4731, 0x004A,
|
||||
/* 0033 */ 0x4756, 0x0000, 0x5962,
|
||||
/* 0034 */ 0x482B, 0x0000, 0x5D43,
|
||||
/* 0035 */ 0x4837, 0x4845, 0x0053,
|
||||
/* 0036 */ 0x4978, 0x0000, 0x6700,
|
||||
/* 0037 */ 0x4A65, 0x0000, 0x6E2F,
|
||||
/* 0038 */ 0x4C2F, 0x0000, 0x7861,
|
||||
/* 0039 */ 0x4C43, 0x4C48, 0x0062,
|
||||
/* 003A */ 0x4D47, 0x0000, 0x8157,
|
||||
/* 003B */ 0x4D6E, 0x0000, 0x83F7,
|
||||
/* 003C */ 0x4E4F, 0x0000, 0x8849,
|
||||
/* 003D */ 0x4E60, 0x0000, 0x8999,
|
||||
/* 003E */ 0x4F6F, 0x0000, 0x921F,
|
||||
/* 003F */ 0x5074, 0x0000, 0x5313,
|
||||
/* 0040 */ 0x5136, 0x0000, 0x5606,
|
||||
/* 0041 */ 0x5143, 0x0000, 0x55E0,
|
||||
/* 0042 */ 0x515E, 0x0000, 0x5922,
|
||||
/* 0043 */ 0x5240, 0x0000, 0x5ECA,
|
||||
/* 0044 */ 0x5264, 0x5266, 0x0068,
|
||||
/* 0045 */ 0x533C, 0x0000, 0x6691,
|
||||
/* 0046 */ 0x5444, 0x544E, 0x006B,
|
||||
/* 0047 */ 0x547C, 0x0000, 0x733D,
|
||||
/* 0048 */ 0x5C2F, 0x0000, 0x5900,
|
||||
/* 0049 */ 0x5D4B, 0x0000, 0x6577,
|
||||
/* 004A */ 0x5D68, 0x0000, 0x69A3,
|
||||
/* 004B */ 0x6058, 0x6060, 0x0076,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x00FC Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x4E44, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0xFFFD, 0xFFFD, 0x536B, 0xFFFD, 0xFFFD, 0xFFFD, 0x4E38, 0xFFFD,
|
||||
/* 0010 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x5203, 0x829D, 0x82B1,
|
||||
/* 0018 */ 0x62E8, 0xFFFD, 0xFFFD, 0x62B1, 0x82BD, 0x82E6, 0x82E5, 0x5192,
|
||||
/* 0020 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x6804, 0x6D3E, 0xFFFD, 0xFFFD,
|
||||
/* 0028 */ 0xFFFD, 0xFFFD, 0xFFFD, 0x70AD, 0x53DE, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0030 */ 0xFFFD, 0xFFFD, 0x5510, 0x8038, 0xFFFD, 0xFFFD, 0x8081, 0x6383,
|
||||
/* 0038 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0040 */ 0xFFFD, 0xFFFD, 0x6368, 0x8457, 0x83CC, 0x83DC, 0x83CA, 0x51F2,
|
||||
/* 0048 */ 0xFFFD, 0x5272, 0x55B6, 0x5584, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0050 */ 0xFFFD, 0xFFFD, 0x55AB, 0x5DFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0058 */ 0x5E3D, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0060 */ 0xFFFD, 0x5EC3, 0x7A06, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x7A01,
|
||||
/* 0068 */ 0x6139, 0xFFFD, 0x614E, 0x6E7F, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0070 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x6ED7, 0x7FE4, 0xFFFD,
|
||||
/* 0078 */ 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0x8088,
|
||||
/* End of table Total Length = 0x017B * 2 */
|
|
@ -1,176 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 2
|
||||
srcBegin = 5655
|
||||
destBegin = 2163
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 2
|
||||
srcBegin = 58C4
|
||||
destBegin = 2178
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 58E1
|
||||
destBegin = 4645
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 617F
|
||||
destBegin = 2271
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 6469
|
||||
destBegin = 232D
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 64F5
|
||||
destBegin = 3F62
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 6707
|
||||
destBegin = 5347
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 71D7
|
||||
destBegin = 2F4F
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 7674
|
||||
destBegin = 6452
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 7CD2
|
||||
destBegin = 312D
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 2
|
||||
srcBegin = 7CE9
|
||||
destBegin = 4857
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 7E64
|
||||
destBegin = 4159
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 7F80
|
||||
destBegin = 4161
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 81CB
|
||||
destBegin = 487C
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 1
|
||||
srcBegin = 8666
|
||||
srcEnd = 8667
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
3261 3B38
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 8D01
|
||||
destBegin = 4352
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 8F3A
|
||||
destBegin = 3432
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 95D9
|
||||
destBegin = 4B40
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 9A47
|
||||
destBegin = 5651
|
||||
End of Item 0012
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0013,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0042,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0001 */
|
||||
/* Total of Format 2 : 0x0012 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2222, 0x2222, 0x2222, 0x2122, 0x0222,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x5655, 0x0000, 0x2163,
|
||||
/* 0001 */ 0x58C4, 0x0000, 0x2178,
|
||||
/* 0002 */ 0x58E1, 0x0000, 0x4645,
|
||||
/* 0003 */ 0x617F, 0x0000, 0x2271,
|
||||
/* 0004 */ 0x6469, 0x0000, 0x232D,
|
||||
/* 0005 */ 0x64F5, 0x0000, 0x3F62,
|
||||
/* 0006 */ 0x6707, 0x0000, 0x5347,
|
||||
/* 0007 */ 0x71D7, 0x0000, 0x2F4F,
|
||||
/* 0008 */ 0x7674, 0x0000, 0x6452,
|
||||
/* 0009 */ 0x7CD2, 0x0000, 0x312D,
|
||||
/* 000A */ 0x7CE9, 0x0000, 0x4857,
|
||||
/* 000B */ 0x7E64, 0x0000, 0x4159,
|
||||
/* 000C */ 0x7F80, 0x0000, 0x4161,
|
||||
/* 000D */ 0x81CB, 0x0000, 0x487C,
|
||||
/* 000E */ 0x8666, 0x8667, 0x0000,
|
||||
/* 000F */ 0x8D01, 0x0000, 0x4352,
|
||||
/* 0010 */ 0x8F3A, 0x0000, 0x3432,
|
||||
/* 0011 */ 0x95D9, 0x0000, 0x4B40,
|
||||
/* 0012 */ 0x9A47, 0x0000, 0x5651,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0042 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x3261, 0x3B38,
|
||||
/* End of table Total Length = 0x0044 * 2 */
|
|
@ -1,178 +0,0 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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 is a Generated file. Please don't edit it.
|
||||
|
||||
The tool which used to generate this file is called fromu.
|
||||
If you have any problem of this file. Please contact
|
||||
Netscape Client International Team or
|
||||
ftang@netscape <Frank Tang>
|
||||
|
||||
Table in Debug form
|
||||
Begin of Item 0000
|
||||
Format 2
|
||||
srcBegin = 2163
|
||||
destBegin = 5655
|
||||
End of Item 0000
|
||||
|
||||
Begin of Item 0001
|
||||
Format 2
|
||||
srcBegin = 2178
|
||||
destBegin = 58C4
|
||||
End of Item 0001
|
||||
|
||||
Begin of Item 0002
|
||||
Format 2
|
||||
srcBegin = 2271
|
||||
destBegin = 617F
|
||||
End of Item 0002
|
||||
|
||||
Begin of Item 0003
|
||||
Format 2
|
||||
srcBegin = 232D
|
||||
destBegin = 6469
|
||||
End of Item 0003
|
||||
|
||||
Begin of Item 0004
|
||||
Format 2
|
||||
srcBegin = 2F4F
|
||||
destBegin = 71D7
|
||||
End of Item 0004
|
||||
|
||||
Begin of Item 0005
|
||||
Format 2
|
||||
srcBegin = 312D
|
||||
destBegin = 7CD2
|
||||
End of Item 0005
|
||||
|
||||
Begin of Item 0006
|
||||
Format 2
|
||||
srcBegin = 3261
|
||||
destBegin = 8666
|
||||
End of Item 0006
|
||||
|
||||
Begin of Item 0007
|
||||
Format 2
|
||||
srcBegin = 3432
|
||||
destBegin = 8F3A
|
||||
End of Item 0007
|
||||
|
||||
Begin of Item 0008
|
||||
Format 2
|
||||
srcBegin = 3B38
|
||||
destBegin = 8667
|
||||
End of Item 0008
|
||||
|
||||
Begin of Item 0009
|
||||
Format 2
|
||||
srcBegin = 3F62
|
||||
destBegin = 64F5
|
||||
End of Item 0009
|
||||
|
||||
Begin of Item 000A
|
||||
Format 1
|
||||
srcBegin = 4159
|
||||
srcEnd = 4161
|
||||
mappingOffset = 0000
|
||||
Mapping =
|
||||
7E64 FFFD FFFD FFFD FFFD FFFD FFFD FFFD
|
||||
7F80
|
||||
End of Item 000A
|
||||
|
||||
Begin of Item 000B
|
||||
Format 2
|
||||
srcBegin = 4352
|
||||
destBegin = 8D01
|
||||
End of Item 000B
|
||||
|
||||
Begin of Item 000C
|
||||
Format 2
|
||||
srcBegin = 4645
|
||||
destBegin = 58E1
|
||||
End of Item 000C
|
||||
|
||||
Begin of Item 000D
|
||||
Format 2
|
||||
srcBegin = 4857
|
||||
destBegin = 7CE9
|
||||
End of Item 000D
|
||||
|
||||
Begin of Item 000E
|
||||
Format 2
|
||||
srcBegin = 487C
|
||||
destBegin = 81CB
|
||||
End of Item 000E
|
||||
|
||||
Begin of Item 000F
|
||||
Format 2
|
||||
srcBegin = 4B40
|
||||
destBegin = 95D9
|
||||
End of Item 000F
|
||||
|
||||
Begin of Item 0010
|
||||
Format 2
|
||||
srcBegin = 5347
|
||||
destBegin = 6707
|
||||
End of Item 0010
|
||||
|
||||
Begin of Item 0011
|
||||
Format 2
|
||||
srcBegin = 5651
|
||||
destBegin = 9A47
|
||||
End of Item 0011
|
||||
|
||||
Begin of Item 0012
|
||||
Format 2
|
||||
srcBegin = 6452
|
||||
destBegin = 7674
|
||||
End of Item 0012
|
||||
|
||||
========================================================*/
|
||||
/* Offset=0x0000 ItemOfList */
|
||||
0x0013,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0001 offsetToFormatArray */
|
||||
0x0004,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0002 offsetToMapCellArray */
|
||||
0x0009,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0003 offsetToMappingTable */
|
||||
0x0042,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0004 Start of Format Array */
|
||||
/* Total of Format 0 : 0x0000 */
|
||||
/* Total of Format 1 : 0x0001 */
|
||||
/* Total of Format 2 : 0x0012 */
|
||||
/* Total of Format 3 : 0x0000 */
|
||||
|
||||
0x2222, 0x2222, 0x2122, 0x2222, 0x0222,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0009 Start of MapCell Array */
|
||||
/* 0000 */ 0x2163, 0x0000, 0x5655,
|
||||
/* 0001 */ 0x2178, 0x0000, 0x58C4,
|
||||
/* 0002 */ 0x2271, 0x0000, 0x617F,
|
||||
/* 0003 */ 0x232D, 0x0000, 0x6469,
|
||||
/* 0004 */ 0x2F4F, 0x0000, 0x71D7,
|
||||
/* 0005 */ 0x312D, 0x0000, 0x7CD2,
|
||||
/* 0006 */ 0x3261, 0x0000, 0x8666,
|
||||
/* 0007 */ 0x3432, 0x0000, 0x8F3A,
|
||||
/* 0008 */ 0x3B38, 0x0000, 0x8667,
|
||||
/* 0009 */ 0x3F62, 0x0000, 0x64F5,
|
||||
/* 000A */ 0x4159, 0x4161, 0x0000,
|
||||
/* 000B */ 0x4352, 0x0000, 0x8D01,
|
||||
/* 000C */ 0x4645, 0x0000, 0x58E1,
|
||||
/* 000D */ 0x4857, 0x0000, 0x7CE9,
|
||||
/* 000E */ 0x487C, 0x0000, 0x81CB,
|
||||
/* 000F */ 0x4B40, 0x0000, 0x95D9,
|
||||
/* 0010 */ 0x5347, 0x0000, 0x6707,
|
||||
/* 0011 */ 0x5651, 0x0000, 0x9A47,
|
||||
/* 0012 */ 0x6452, 0x0000, 0x7674,
|
||||
/*-------------------------------------------------------*/
|
||||
/* Offset=0x0042 Start of MappingTable */
|
||||
|
||||
/* 0000 */ 0x7E64, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD, 0xFFFD,
|
||||
/* 0008 */ 0x7F80,
|
||||
/* End of table Total Length = 0x004B * 2 */
|
|
@ -1,9 +0,0 @@
|
|||
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
||||
# vim: set filetype=python:
|
||||
# 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/.
|
||||
|
||||
EXPORTS += [
|
||||
'nsUCvTW2CID.h',
|
||||
]
|
|
@ -1,58 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "nsEUCTWToUnicode.h"
|
||||
#include "nsUCvTW2Dll.h"
|
||||
#include "nsUCConstructors.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Global functions and data [declaration]
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class nsEUCTWToUnicode [implementation]
|
||||
|
||||
nsresult
|
||||
nsEUCTWToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult)
|
||||
{
|
||||
static const uScanClassID g_EUCTWScanClassIDs [] = {
|
||||
u1ByteCharset,
|
||||
u2BytesGRCharset,
|
||||
u2BytesGRPrefix8EA2Charset,
|
||||
u2BytesGRPrefix8EA3Charset,
|
||||
u2BytesGRPrefix8EA4Charset,
|
||||
u2BytesGRPrefix8EA5Charset,
|
||||
u2BytesGRPrefix8EA6Charset,
|
||||
u2BytesGRPrefix8EA7Charset
|
||||
};
|
||||
|
||||
static const uint16_t *g_EUCTWMappingTableSet [] ={
|
||||
g_ASCIIMappingTable,
|
||||
g_utCNS1MappingTable,
|
||||
g_utCNS2MappingTable,
|
||||
g_utCNS3MappingTable,
|
||||
g_utCNS4MappingTable,
|
||||
g_utCNS5MappingTable,
|
||||
g_utCNS6MappingTable,
|
||||
g_utCNS7MappingTable
|
||||
};
|
||||
|
||||
static const uRange g_EUCTWRanges[] = {
|
||||
{ 0x00, 0x7E },
|
||||
{ 0xA1, 0xFE },
|
||||
{ 0x8E, 0x8E },
|
||||
{ 0x8E, 0x8E },
|
||||
{ 0x8E, 0x8E },
|
||||
{ 0x8E, 0x8E },
|
||||
{ 0x8E, 0x8E },
|
||||
{ 0x8E, 0x8E }
|
||||
};
|
||||
|
||||
return CreateMultiTableDecoder(8,
|
||||
(const uRange*) &g_EUCTWRanges,
|
||||
(uScanClassID*) &g_EUCTWScanClassIDs,
|
||||
(uMappingTable**) &g_EUCTWMappingTableSet,
|
||||
1, aOuter, aIID, aResult);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef nsEUCTWToUnicode_h___
|
||||
#define nsEUCTWToUnicode_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
/**
|
||||
* A character set converter from EUCTW to Unicode.
|
||||
*
|
||||
* @created 06/Apr/1999
|
||||
* @author Catalin Rotaru [CATA]
|
||||
*/
|
||||
nsresult
|
||||
nsEUCTWToUnicodeConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult);
|
||||
|
||||
#endif /* nsEUCTWToUnicode_h___ */
|
|
@ -1,21 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef nsUCvTW2CID_h___
|
||||
#define nsUCvTW2CID_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
// Class ID for our EUCTWToUnicode charset converter
|
||||
// {379C2771-EC77-11d2-8AAC-00600811A836}
|
||||
#define NS_EUCTWTOUNICODE_CID \
|
||||
{ 0x379c2771, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
||||
|
||||
// Class ID for our UnicodeToEUCTW charset converter
|
||||
// {379C2776-EC77-11d2-8AAC-00600811A836}
|
||||
#define NS_UNICODETOEUCTW_CID \
|
||||
{ 0x379c2776, 0xec77, 0x11d2, {0x8a, 0xac, 0x0, 0x60, 0x8, 0x11, 0xa8, 0x36}}
|
||||
|
||||
#endif /* nsUCvTW2CID_h___ */
|
|
@ -1,25 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef nsUCvTW2Dll_h_
|
||||
#define nsUCvTW2Dll_h_
|
||||
|
||||
extern const uint16_t g_ASCIIMappingTable[] ;
|
||||
extern const uint16_t g_ufCNS1MappingTable[];
|
||||
extern const uint16_t g_ufCNS2MappingTable[];
|
||||
extern const uint16_t g_ufCNS3MappingTable[];
|
||||
extern const uint16_t g_ufCNS4MappingTable[];
|
||||
extern const uint16_t g_ufCNS5MappingTable[];
|
||||
extern const uint16_t g_ufCNS6MappingTable[];
|
||||
extern const uint16_t g_ufCNS7MappingTable[];
|
||||
extern const uint16_t g_utCNS1MappingTable[];
|
||||
extern const uint16_t g_utCNS2MappingTable[];
|
||||
extern const uint16_t g_utCNS3MappingTable[];
|
||||
extern const uint16_t g_utCNS4MappingTable[];
|
||||
extern const uint16_t g_utCNS5MappingTable[];
|
||||
extern const uint16_t g_utCNS6MappingTable[];
|
||||
extern const uint16_t g_utCNS7MappingTable[];
|
||||
|
||||
#endif /* nsUCvTW2Dll_h_ */
|
|
@ -1,48 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#include "nsUnicodeToEUCTW.h"
|
||||
#include "nsUCvTW2Dll.h"
|
||||
#include "nsUCConstructors.h"
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Global functions and data [declaration]
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Class nsUnicodeToEUCTW [implementation]
|
||||
|
||||
nsresult
|
||||
nsUnicodeToEUCTWConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult)
|
||||
{
|
||||
static const uScanClassID g_EUCTWScanClassSet [] = {
|
||||
u1ByteCharset,
|
||||
u2BytesGRCharset,
|
||||
u2BytesGRPrefix8EA2Charset,
|
||||
u2BytesGRPrefix8EA3Charset,
|
||||
u2BytesGRPrefix8EA4Charset,
|
||||
u2BytesGRPrefix8EA5Charset,
|
||||
u2BytesGRPrefix8EA6Charset,
|
||||
u2BytesGRPrefix8EA7Charset
|
||||
};
|
||||
|
||||
static const uint16_t *g_EUCTWMappingTableSet [] ={
|
||||
g_ASCIIMappingTable,
|
||||
g_ufCNS1MappingTable,
|
||||
g_ufCNS2MappingTable,
|
||||
g_ufCNS3MappingTable,
|
||||
g_ufCNS4MappingTable,
|
||||
g_ufCNS5MappingTable,
|
||||
g_ufCNS6MappingTable,
|
||||
g_ufCNS7MappingTable
|
||||
};
|
||||
|
||||
return CreateMultiTableEncoder(8,
|
||||
(uScanClassID*) &g_EUCTWScanClassSet,
|
||||
(uMappingTable**) &g_EUCTWMappingTableSet,
|
||||
4 /* max length = src * 4 */,
|
||||
aOuter, aIID, aResult);
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* 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/. */
|
||||
|
||||
#ifndef nsUnicodeToEUCTW_h___
|
||||
#define nsUnicodeToEUCTW_h___
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
/**
|
||||
* A character set converter from Unicode to EUCTW.
|
||||
*
|
||||
* @created 06/Apr/1999
|
||||
* @author Catalin Rotaru [CATA]
|
||||
*/
|
||||
nsresult
|
||||
nsUnicodeToEUCTWConstructor(nsISupports *aOuter, REFNSIID aIID,
|
||||
void **aResult);
|
||||
|
||||
#endif /* nsUnicodeToEUCTW_h___ */
|
|
@ -1,2 +0,0 @@
|
|||
We should put EUC-TW and ISO-2022-CN (Traditional Chinese one)
|
||||
converter into this directory/dll
|
|
@ -30,6 +30,8 @@
|
|||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "mozilla/TaggedAnonymousMemory.h"
|
||||
|
||||
#include "assembler/wtf/Assertions.h"
|
||||
#include "assembler/wtf/VMTags.h"
|
||||
#include "js/Utility.h"
|
||||
|
@ -43,7 +45,7 @@ size_t ExecutableAllocator::determinePageSize()
|
|||
|
||||
ExecutablePool::Allocation ExecutableAllocator::systemAlloc(size_t n)
|
||||
{
|
||||
void *allocation = mmap(NULL, n, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0);
|
||||
void *allocation = MozTaggedAnonymousMmap(NULL, n, INITIAL_PROTECTION_FLAGS, MAP_PRIVATE | MAP_ANON, VM_TAG_FOR_EXECUTABLEALLOCATOR_MEMORY, 0, "js-jit-code");
|
||||
if (allocation == MAP_FAILED)
|
||||
allocation = NULL;
|
||||
ExecutablePool::Allocation alloc = { reinterpret_cast<char*>(allocation), n };
|
||||
|
|
|
@ -89,11 +89,10 @@ js::CreateRegExpMatchResult(JSContext *cx, HandleString input, const MatchPairs
|
|||
}
|
||||
|
||||
static RegExpRunStatus
|
||||
ExecuteRegExpImpl(JSContext *cx, RegExpStatics *res, RegExpShared &re,
|
||||
HandleLinearString input, const jschar *chars, size_t length,
|
||||
ExecuteRegExpImpl(JSContext *cx, RegExpStatics *res, RegExpShared &re, HandleLinearString input,
|
||||
size_t *lastIndex, MatchPairs &matches)
|
||||
{
|
||||
RegExpRunStatus status = re.execute(cx, chars, length, lastIndex, matches);
|
||||
RegExpRunStatus status = re.execute(cx, input, lastIndex, matches);
|
||||
if (status == RegExpRunStatus_Success && res) {
|
||||
if (!res->updateFromMatchPairs(cx, input, matches))
|
||||
return RegExpRunStatus_Error;
|
||||
|
@ -104,8 +103,8 @@ ExecuteRegExpImpl(JSContext *cx, RegExpStatics *res, RegExpShared &re,
|
|||
/* Legacy ExecuteRegExp behavior is baked into the JSAPI. */
|
||||
bool
|
||||
js::ExecuteRegExpLegacy(JSContext *cx, RegExpStatics *res, RegExpObject &reobj,
|
||||
HandleLinearString input_, const jschar *chars, size_t length,
|
||||
size_t *lastIndex, bool test, MutableHandleValue rval)
|
||||
HandleLinearString input, size_t *lastIndex, bool test,
|
||||
MutableHandleValue rval)
|
||||
{
|
||||
RegExpGuard shared(cx);
|
||||
if (!reobj.getShared(cx, &shared))
|
||||
|
@ -113,9 +112,7 @@ js::ExecuteRegExpLegacy(JSContext *cx, RegExpStatics *res, RegExpObject &reobj,
|
|||
|
||||
ScopedMatchPairs matches(&cx->tempLifoAlloc());
|
||||
|
||||
RegExpRunStatus status =
|
||||
ExecuteRegExpImpl(cx, res, *shared, input_, chars, length, lastIndex, matches);
|
||||
|
||||
RegExpRunStatus status = ExecuteRegExpImpl(cx, res, *shared, input, lastIndex, matches);
|
||||
if (status == RegExpRunStatus_Error)
|
||||
return false;
|
||||
|
||||
|
@ -131,13 +128,6 @@ js::ExecuteRegExpLegacy(JSContext *cx, RegExpStatics *res, RegExpObject &reobj,
|
|||
return true;
|
||||
}
|
||||
|
||||
RootedString input(cx, input_);
|
||||
if (!input) {
|
||||
input = js_NewStringCopyN<CanGC>(cx, chars, length);
|
||||
if (!input)
|
||||
return false;
|
||||
}
|
||||
|
||||
return CreateRegExpMatchResult(cx, input, matches, rval);
|
||||
}
|
||||
|
||||
|
@ -589,11 +579,8 @@ js::ExecuteRegExp(JSContext *cx, HandleObject regexp, HandleString string,
|
|||
}
|
||||
|
||||
/* Steps 8-21. */
|
||||
const jschar *chars = input->chars();
|
||||
size_t lastIndexInt(i);
|
||||
RegExpRunStatus status =
|
||||
ExecuteRegExpImpl(cx, res, *re, input, chars, length, &lastIndexInt, matches);
|
||||
|
||||
RegExpRunStatus status = ExecuteRegExpImpl(cx, res, *re, input, &lastIndexInt, matches);
|
||||
if (status == RegExpRunStatus_Error)
|
||||
return RegExpRunStatus_Error;
|
||||
|
||||
|
@ -630,7 +617,6 @@ regexp_exec_impl(JSContext *cx, HandleObject regexp, HandleString string,
|
|||
ScopedMatchPairs matches(&cx->tempLifoAlloc());
|
||||
|
||||
RegExpRunStatus status = ExecuteRegExp(cx, regexp, string, matches, staticsUpdate);
|
||||
|
||||
if (status == RegExpRunStatus_Error)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ ExecuteRegExp(JSContext *cx, HandleObject regexp, HandleString string,
|
|||
*/
|
||||
bool
|
||||
ExecuteRegExpLegacy(JSContext *cx, RegExpStatics *res, RegExpObject &reobj,
|
||||
HandleLinearString input, const jschar *chars, size_t length,
|
||||
size_t *lastIndex, bool test, MutableHandleValue rval);
|
||||
HandleLinearString input, size_t *lastIndex, bool test,
|
||||
MutableHandleValue rval);
|
||||
|
||||
/* Translation from MatchPairs to a JS array in regexp_exec()'s output format. */
|
||||
bool
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include "gc/Memory.h"
|
||||
|
||||
#include "mozilla/TaggedAnonymousMemory.h"
|
||||
|
||||
#include "js/HeapAPI.h"
|
||||
#include "vm/Runtime.h"
|
||||
|
||||
|
@ -378,7 +380,7 @@ MapMemory(size_t length, int prot = PROT_READ | PROT_WRITE,
|
|||
}
|
||||
return region;
|
||||
#else
|
||||
void *region = mmap(nullptr, length, prot, flags, fd, offset);
|
||||
void *region = MozTaggedAnonymousMmap(nullptr, length, prot, flags, fd, offset, "js-gc-heap");
|
||||
if (region == MAP_FAILED)
|
||||
return nullptr;
|
||||
return region;
|
||||
|
|
|
@ -1533,10 +1533,27 @@ RegExpCompiler::Assemble(JSContext *cx,
|
|||
return code;
|
||||
}
|
||||
|
||||
template <typename CharT>
|
||||
static void
|
||||
SampleChars(FrequencyCollator *collator, const CharT *chars, size_t length)
|
||||
{
|
||||
// Sample some characters from the middle of the string.
|
||||
static const int kSampleSize = 128;
|
||||
|
||||
int chars_sampled = 0;
|
||||
int half_way = (int(length) - kSampleSize) / 2;
|
||||
for (size_t i = Max(0, half_way);
|
||||
i < length && chars_sampled < kSampleSize;
|
||||
i++, chars_sampled++)
|
||||
{
|
||||
collator->CountCharacter(chars[i]);
|
||||
}
|
||||
}
|
||||
|
||||
RegExpCode
|
||||
irregexp::CompilePattern(JSContext *cx, RegExpShared *shared, RegExpCompileData *data,
|
||||
const jschar *sampleChars, size_t sampleLength,
|
||||
bool is_global, bool ignore_case, bool is_ascii)
|
||||
HandleLinearString sample, bool is_global, bool ignore_case,
|
||||
bool is_ascii)
|
||||
{
|
||||
if ((data->capture_count + 1) * 2 - 1 > RegExpMacroAssembler::kMaxRegister) {
|
||||
JS_ReportError(cx, "regexp too big");
|
||||
|
@ -1547,15 +1564,12 @@ irregexp::CompilePattern(JSContext *cx, RegExpShared *shared, RegExpCompileData
|
|||
RegExpCompiler compiler(&alloc, data->capture_count, ignore_case, is_ascii);
|
||||
|
||||
// Sample some characters from the middle of the string.
|
||||
static const int kSampleSize = 128;
|
||||
|
||||
int chars_sampled = 0;
|
||||
int half_way = (sampleLength - kSampleSize) / 2;
|
||||
for (size_t i = Max(0, half_way);
|
||||
i < sampleLength && chars_sampled < kSampleSize;
|
||||
i++, chars_sampled++)
|
||||
{
|
||||
compiler.frequency_collator()->CountCharacter(sampleChars[i]);
|
||||
if (sample->hasLatin1Chars()) {
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
SampleChars(compiler.frequency_collator(), sample->latin1Chars(nogc), sample->length());
|
||||
} else {
|
||||
JS::AutoCheckCannotGC nogc;
|
||||
SampleChars(compiler.frequency_collator(), sample->twoByteChars(nogc), sample->length());
|
||||
}
|
||||
|
||||
// Wrap the body of the regexp in capture #0.
|
||||
|
|
|
@ -103,8 +103,8 @@ struct RegExpCode
|
|||
|
||||
RegExpCode
|
||||
CompilePattern(JSContext *cx, RegExpShared *shared, RegExpCompileData *data,
|
||||
const jschar *sampleChars, size_t sampleLength,
|
||||
bool is_global, bool ignore_case = false, bool is_ascii = false);
|
||||
HandleLinearString sample, bool is_global, bool ignore_case = false,
|
||||
bool is_ascii = false);
|
||||
|
||||
// Note: this may return RegExpRunStatus_Error if an interrupt was requested
|
||||
// while the code was executing.
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
// |jit-test| error:ReferenceError
|
||||
toPrinted(this.reason);
|
||||
function toPrinted(value)
|
||||
value = String(value);
|
||||
var lfcode = new Array();
|
||||
lfcode.push = loadFile;
|
||||
lfcode.push("enableTrackAllocations();");
|
||||
lfcode.push("\
|
||||
gczeal(9, 2);\
|
||||
newGlobal();\
|
||||
''.addDebuggee(g1);\
|
||||
");
|
||||
function loadFile(lfVarx) {
|
||||
evaluate(lfVarx, { noScriptRval : true, compileAndGo : true });
|
||||
}
|
|
@ -1427,22 +1427,22 @@ class MOZ_STACK_CLASS ModuleCompiler
|
|||
}
|
||||
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
bool trackProfiledFunction(const Func &func, unsigned endCodeOffset) {
|
||||
bool addProfiledFunction(const Func &func, unsigned endCodeOffset) {
|
||||
unsigned lineno = 0U, columnIndex = 0U;
|
||||
tokenStream().srcCoords.lineNumAndColumnIndex(func.srcOffset(), &lineno, &columnIndex);
|
||||
unsigned startCodeOffset = func.code()->offset();
|
||||
return module_->trackProfiledFunction(func.name(), startCodeOffset, endCodeOffset,
|
||||
lineno, columnIndex);
|
||||
return module_->addProfiledFunction(func.name(), startCodeOffset, endCodeOffset,
|
||||
lineno, columnIndex);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JS_ION_PERF
|
||||
bool trackPerfProfiledBlocks(AsmJSPerfSpewer &perfSpewer, const Func &func, unsigned endCodeOffset) {
|
||||
bool addPerfProfiledBlocks(AsmJSPerfSpewer &perfSpewer, const Func &func, unsigned endCodeOffset) {
|
||||
unsigned startCodeOffset = func.code()->offset();
|
||||
perfSpewer.noteBlocksOffsets();
|
||||
unsigned endInlineCodeOffset = perfSpewer.endInlineCode.offset();
|
||||
return module_->trackPerfProfiledBlocks(func.name(), startCodeOffset, endInlineCodeOffset,
|
||||
endCodeOffset, perfSpewer.basicBlocks());
|
||||
return module_->addPerfProfiledBlocks(func.name(), startCodeOffset, endInlineCodeOffset,
|
||||
endCodeOffset, perfSpewer.basicBlocks());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1450,11 +1450,15 @@ class MOZ_STACK_CLASS ModuleCompiler
|
|||
return module_->addFunctionCounts(counts);
|
||||
}
|
||||
|
||||
void startFunctionBodies() {
|
||||
JS_ASSERT(masm_.size() == 0);
|
||||
module_->startFunctionBodies();
|
||||
}
|
||||
void finishFunctionBodies() {
|
||||
JS_ASSERT(!finishedFunctionBodies_);
|
||||
masm_.align(AsmJSPageSize);
|
||||
finishedFunctionBodies_ = true;
|
||||
module_->initFunctionBytes(masm_.size());
|
||||
module_->finishFunctionBodies(masm_.size());
|
||||
}
|
||||
|
||||
void setInterpExitOffset(unsigned exitIndex) {
|
||||
|
@ -1506,86 +1510,15 @@ class MOZ_STACK_CLASS ModuleCompiler
|
|||
|
||||
bool finish(ScopedJSDeletePtr<AsmJSModule> *module)
|
||||
{
|
||||
module_->initFuncEnd(tokenStream().currentToken().pos.end,
|
||||
tokenStream().peekTokenPos().end);
|
||||
masm_.finish();
|
||||
if (masm_.oom())
|
||||
return false;
|
||||
|
||||
module_->assignCallSites(masm_.extractCallSites());
|
||||
module_->assignHeapAccesses(masm_.extractAsmJSHeapAccesses());
|
||||
|
||||
#if defined(JS_CODEGEN_ARM)
|
||||
// Now that compilation has finished, we need to update offsets to
|
||||
// reflect actual offsets (an ARM distinction).
|
||||
for (unsigned i = 0; i < module_->numHeapAccesses(); i++) {
|
||||
AsmJSHeapAccess &a = module_->heapAccess(i);
|
||||
a.setOffset(masm_.actualOffset(a.offset()));
|
||||
}
|
||||
for (unsigned i = 0; i < module_->numCallSites(); i++) {
|
||||
CallSite &c = module_->callSite(i);
|
||||
c.setReturnAddressOffset(masm_.actualOffset(c.returnAddressOffset()));
|
||||
}
|
||||
#endif
|
||||
|
||||
// The returned memory is owned by module_.
|
||||
if (!module_->allocateAndCopyCode(cx_, masm_))
|
||||
if (!module_->finish(cx_, tokenStream(), masm_, interruptLabel_))
|
||||
return false;
|
||||
|
||||
// c.f. JitCode::copyFrom
|
||||
JS_ASSERT(masm_.jumpRelocationTableBytes() == 0);
|
||||
JS_ASSERT(masm_.dataRelocationTableBytes() == 0);
|
||||
JS_ASSERT(masm_.preBarrierTableBytes() == 0);
|
||||
JS_ASSERT(!masm_.hasEnteredExitFrame());
|
||||
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
// Fix up the code offsets. Note the endCodeOffset should not be
|
||||
// filtered through 'actualOffset' as it is generated using 'size()'
|
||||
// rather than a label.
|
||||
for (unsigned i = 0; i < module_->numProfiledFunctions(); i++) {
|
||||
AsmJSModule::ProfiledFunction &func = module_->profiledFunction(i);
|
||||
func.pod.startCodeOffset = masm_.actualOffset(func.pod.startCodeOffset);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef JS_ION_PERF
|
||||
for (unsigned i = 0; i < module_->numPerfBlocksFunctions(); i++) {
|
||||
AsmJSModule::ProfiledBlocksFunction &func = module_->perfProfiledBlocksFunction(i);
|
||||
func.pod.startCodeOffset = masm_.actualOffset(func.pod.startCodeOffset);
|
||||
func.endInlineCodeOffset = masm_.actualOffset(func.endInlineCodeOffset);
|
||||
BasicBlocksVector &basicBlocks = func.blocks;
|
||||
for (uint32_t i = 0; i < basicBlocks.length(); i++) {
|
||||
Record &r = basicBlocks[i];
|
||||
r.startOffset = masm_.actualOffset(r.startOffset);
|
||||
r.endOffset = masm_.actualOffset(r.endOffset);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
module_->setInterruptOffset(masm_.actualOffset(interruptLabel_.offset()));
|
||||
|
||||
// CodeLabels produced during codegen
|
||||
for (size_t i = 0; i < masm_.numCodeLabels(); i++) {
|
||||
CodeLabel src = masm_.codeLabel(i);
|
||||
int32_t labelOffset = src.dest()->offset();
|
||||
int32_t targetOffset = masm_.actualOffset(src.src()->offset());
|
||||
// The patched uses of a label embed a linked list where the
|
||||
// to-be-patched immediate is the offset of the next to-be-patched
|
||||
// instruction.
|
||||
while (labelOffset != LabelBase::INVALID_OFFSET) {
|
||||
size_t patchAtOffset = masm_.labelOffsetToPatchOffset(labelOffset);
|
||||
AsmJSModule::RelativeLink link(AsmJSModule::RelativeLink::CodeLabel);
|
||||
link.patchAtOffset = patchAtOffset;
|
||||
link.targetOffset = targetOffset;
|
||||
if (!module_->addRelativeLink(link))
|
||||
return false;
|
||||
|
||||
labelOffset = Assembler::extractCodeLabelOffset(module_->codeBase() +
|
||||
patchAtOffset);
|
||||
}
|
||||
}
|
||||
|
||||
// Function-pointer-table entries
|
||||
// Finally, convert all the function-pointer table elements into
|
||||
// RelativeLinks that will be patched by AsmJSModule::staticallyLink.
|
||||
for (unsigned tableIndex = 0; tableIndex < funcPtrTables_.length(); tableIndex++) {
|
||||
FuncPtrTable &table = funcPtrTables_[tableIndex];
|
||||
unsigned tableBaseOffset = module_->offsetOfGlobalData() + table.globalDataOffset();
|
||||
|
@ -1598,58 +1531,6 @@ class MOZ_STACK_CLASS ModuleCompiler
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
// Global data accesses in x86 need to be patched with the absolute
|
||||
// address of the global. Globals are allocated sequentially after the
|
||||
// code section so we can just use an RelativeLink.
|
||||
for (unsigned i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i);
|
||||
AsmJSModule::RelativeLink link(AsmJSModule::RelativeLink::InstructionImmediate);
|
||||
link.patchAtOffset = masm_.labelOffsetToPatchOffset(a.patchAt.offset());
|
||||
link.targetOffset = module_->offsetOfGlobalData() + a.globalDataOffset;
|
||||
if (!module_->addRelativeLink(link))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
// Global data accesses on x64 use rip-relative addressing and thus do
|
||||
// not need patching after deserialization.
|
||||
uint8_t *code = module_->codeBase();
|
||||
for (unsigned i = 0; i < masm_.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm_.asmJSGlobalAccess(i);
|
||||
masm_.patchAsmJSGlobalAccess(a.patchAt, code, module_->globalData(), a.globalDataOffset);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(JS_CODEGEN_MIPS)
|
||||
// On MIPS we need to update all the long jumps because they contain an
|
||||
// absolute adress.
|
||||
for (size_t i = 0; i < masm_.numLongJumps(); i++) {
|
||||
uint32_t patchAtOffset = masm_.longJump(i);
|
||||
|
||||
AsmJSModule::RelativeLink link(AsmJSModule::RelativeLink::InstructionImmediate);
|
||||
link.patchAtOffset = patchAtOffset;
|
||||
|
||||
InstImm *inst = (InstImm *)(module_->codeBase() + patchAtOffset);
|
||||
link.targetOffset = Assembler::extractLuiOriValue(inst, inst->next()) -
|
||||
(uint32_t)module_->codeBase();
|
||||
|
||||
if (!module_->addRelativeLink(link))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Absolute links
|
||||
for (size_t i = 0; i < masm_.numAsmJSAbsoluteLinks(); i++) {
|
||||
AsmJSAbsoluteLink src = masm_.asmJSAbsoluteLink(i);
|
||||
AsmJSModule::AbsoluteLink link;
|
||||
link.patchAt = CodeOffsetLabel(masm_.actualOffset(src.patchAt.offset()));
|
||||
link.target = src.target;
|
||||
if (!module_->addAbsoluteLink(link))
|
||||
return false;
|
||||
}
|
||||
|
||||
*module = module_.forget();
|
||||
return true;
|
||||
}
|
||||
|
@ -5516,7 +5397,7 @@ GenerateCode(ModuleCompiler &m, ModuleCompiler::Func &func, MIRGenerator &mir, L
|
|||
// after the module has been cached and reloaded from the cache). Function
|
||||
// profiling info isn't huge, so store it always (in --enable-profiling
|
||||
// builds, which is only Nightly builds, but default).
|
||||
if (!m.trackProfiledFunction(func, m.masm().size()))
|
||||
if (!m.addProfiledFunction(func, m.masm().size()))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
|
@ -5524,7 +5405,7 @@ GenerateCode(ModuleCompiler &m, ModuleCompiler::Func &func, MIRGenerator &mir, L
|
|||
// Per-block profiling info uses significantly more memory so only store
|
||||
// this information if it is actively requested.
|
||||
if (PerfBlockEnabled()) {
|
||||
if (!m.trackPerfProfiledBlocks(mir.perfSpewer(), func, m.masm().size()))
|
||||
if (!m.addPerfProfiledBlocks(mir.perfSpewer(), func, m.masm().size()))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -6139,7 +6020,7 @@ GenerateEntry(ModuleCompiler &m, const AsmJSModule::ExportedFunction &exportedFu
|
|||
// ARM, MIPS and x64 have a globally-pinned HeapReg (x86 uses immediates in
|
||||
// effective addresses).
|
||||
#if defined(JS_CODEGEN_X64) || defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS)
|
||||
masm.loadPtr(Address(IntArgReg1, m.module().heapOffset()), HeapReg);
|
||||
masm.loadPtr(Address(IntArgReg1, AsmJSModule::heapGlobalDataOffset()), HeapReg);
|
||||
#endif
|
||||
|
||||
// Get 'argv' into a non-arg register and save it on the stack.
|
||||
|
@ -6931,10 +6812,10 @@ GenerateInterruptExit(ModuleCompiler &m, Label *throwLabel)
|
|||
|
||||
// Pop resumePC into PC. Clobber HeapReg to make the jump and restore it
|
||||
// during jump delay slot.
|
||||
JS_ASSERT(Imm16::isInSignedRange(m.module().heapOffset()));
|
||||
JS_ASSERT(Imm16::isInSignedRange(AsmJSModule::heapGlobalDataOffset()));
|
||||
masm.pop(HeapReg);
|
||||
masm.as_jr(HeapReg);
|
||||
masm.loadPtr(Address(GlobalReg, m.module().heapOffset()), HeapReg);
|
||||
masm.loadPtr(Address(GlobalReg, AsmJSModule::heapGlobalDataOffset()), HeapReg);
|
||||
#elif defined(JS_CODEGEN_ARM)
|
||||
masm.setFramePushed(0); // set to zero so we can use masm.framePushed() below
|
||||
masm.PushRegsInMask(RegisterSet(GeneralRegisterSet(Registers::AllMask & ~(1<<Registers::sp)), FloatRegisterSet(uint32_t(0)))); // save all GP registers,excep sp
|
||||
|
@ -7100,6 +6981,8 @@ CheckModule(ExclusiveContext *cx, AsmJSParser &parser, ParseNode *stmtList,
|
|||
if (!CheckModuleGlobals(m))
|
||||
return false;
|
||||
|
||||
m.startFunctionBodies();
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
if (!CheckFunctionsParallel(m))
|
||||
return false;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "jit/AsmJSLink.h"
|
||||
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
|
||||
#ifdef MOZ_VTUNE
|
||||
|
@ -32,7 +31,6 @@
|
|||
using namespace js;
|
||||
using namespace js::jit;
|
||||
|
||||
using mozilla::BinarySearch;
|
||||
using mozilla::IsNaN;
|
||||
using mozilla::PodZero;
|
||||
|
||||
|
@ -93,30 +91,15 @@ AsmJSFrameIterator::operator++()
|
|||
settle(ReturnAddressForJitCall(sp_));
|
||||
}
|
||||
|
||||
struct GetCallSite
|
||||
{
|
||||
const AsmJSModule &module;
|
||||
explicit GetCallSite(const AsmJSModule &module) : module(module) {}
|
||||
uint32_t operator[](size_t index) const {
|
||||
return module.callSite(index).returnAddressOffset();
|
||||
}
|
||||
};
|
||||
|
||||
void
|
||||
AsmJSFrameIterator::settle(uint8_t *returnAddress)
|
||||
{
|
||||
uint32_t target = returnAddress - module_->codeBase();
|
||||
size_t lowerBound = 0;
|
||||
size_t upperBound = module_->numCallSites();
|
||||
|
||||
size_t match;
|
||||
if (!BinarySearch(GetCallSite(*module_), lowerBound, upperBound, target, &match)) {
|
||||
callsite_ = module_->lookupCallSite(returnAddress);
|
||||
if (!callsite_ || callsite_->isEntry()) {
|
||||
module_ = nullptr;
|
||||
return;
|
||||
}
|
||||
|
||||
callsite_ = &module_->callSite(match);
|
||||
|
||||
if (callsite_->isEntry()) {
|
||||
module_ = nullptr;
|
||||
return;
|
||||
|
@ -727,8 +710,8 @@ SendModuleToAttachedProfiler(JSContext *cx, AsmJSModule &module)
|
|||
|
||||
#if defined(JS_ION_PERF)
|
||||
if (module.numExportedFunctions() > 0) {
|
||||
size_t firstEntryCode = (size_t) module.entryTrampoline(module.exportedFunction(0));
|
||||
writePerfSpewerAsmJSEntriesAndExits(firstEntryCode, (size_t) module.globalData() - firstEntryCode);
|
||||
size_t firstEntryCode = size_t(module.codeBase() + module.functionBytes());
|
||||
writePerfSpewerAsmJSEntriesAndExits(firstEntryCode, module.codeBytes() - module.functionBytes());
|
||||
}
|
||||
if (!SendBlocksToPerf(cx, module))
|
||||
return false;
|
||||
|
|
|
@ -12,8 +12,10 @@
|
|||
# include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
#include "mozilla/BinarySearch.h"
|
||||
#include "mozilla/Compression.h"
|
||||
#include "mozilla/PodOperations.h"
|
||||
#include "mozilla/TaggedAnonymousMemory.h"
|
||||
|
||||
#include "jslibmath.h"
|
||||
#include "jsmath.h"
|
||||
|
@ -34,41 +36,11 @@
|
|||
using namespace js;
|
||||
using namespace jit;
|
||||
using namespace frontend;
|
||||
using mozilla::BinarySearch;
|
||||
using mozilla::PodCopy;
|
||||
using mozilla::PodEqual;
|
||||
using mozilla::Compression::LZ4;
|
||||
|
||||
void
|
||||
AsmJSModule::initHeap(Handle<ArrayBufferObject*> heap, JSContext *cx)
|
||||
{
|
||||
JS_ASSERT(IsValidAsmJSHeapLength(heap->byteLength()));
|
||||
JS_ASSERT(dynamicallyLinked_);
|
||||
JS_ASSERT(!maybeHeap_);
|
||||
|
||||
maybeHeap_ = heap;
|
||||
heapDatum() = heap->dataPointer();
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
uint8_t *heapOffset = heap->dataPointer();
|
||||
void *heapLength = (void*)heap->byteLength();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
const jit::AsmJSHeapAccess &access = heapAccesses_[i];
|
||||
if (access.hasLengthCheck())
|
||||
JSC::X86Assembler::setPointer(access.patchLengthAt(code_), heapLength);
|
||||
void *addr = access.patchOffsetAt(code_);
|
||||
uint32_t disp = reinterpret_cast<uint32_t>(JSC::X86Assembler::getPointer(addr));
|
||||
JS_ASSERT(disp <= INT32_MAX);
|
||||
JSC::X86Assembler::setPointer(addr, (void *)(heapOffset + disp));
|
||||
}
|
||||
#elif defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS)
|
||||
uint32_t heapLength = heap->byteLength();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
jit::Assembler::updateBoundsCheck(heapLength,
|
||||
(jit::Instruction*)(heapAccesses_[i].offset() + code_));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint8_t *
|
||||
AllocateExecutableMemory(ExclusiveContext *cx, size_t totalBytes)
|
||||
{
|
||||
|
@ -81,9 +53,9 @@ AllocateExecutableMemory(ExclusiveContext *cx, size_t totalBytes)
|
|||
return nullptr;
|
||||
}
|
||||
#else // assume Unix
|
||||
void *p = mmap(nullptr, totalBytes,
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON,
|
||||
-1, 0);
|
||||
void *p = MozTaggedAnonymousMmap(nullptr, totalBytes,
|
||||
PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANON,
|
||||
-1, 0, "asm-js-code");
|
||||
if (p == MAP_FAILED) {
|
||||
js_ReportOutOfMemory(cx);
|
||||
return nullptr;
|
||||
|
@ -103,10 +75,173 @@ DeallocateExecutableMemory(uint8_t *code, size_t totalBytes)
|
|||
#endif
|
||||
}
|
||||
|
||||
bool
|
||||
AsmJSModule::allocateAndCopyCode(ExclusiveContext *cx, MacroAssembler &masm)
|
||||
AsmJSModule::AsmJSModule(ScriptSource *scriptSource, uint32_t funcStart,
|
||||
uint32_t offsetToEndOfUseAsm, bool strict)
|
||||
: funcStart_(funcStart),
|
||||
offsetToEndOfUseAsm_(offsetToEndOfUseAsm),
|
||||
scriptSource_(scriptSource),
|
||||
globalArgumentName_(nullptr),
|
||||
importArgumentName_(nullptr),
|
||||
bufferArgumentName_(nullptr),
|
||||
code_(nullptr),
|
||||
interruptExit_(nullptr),
|
||||
dynamicallyLinked_(false),
|
||||
loadedFromCache_(false),
|
||||
codeIsProtected_(false)
|
||||
{
|
||||
JS_ASSERT(!code_);
|
||||
mozilla::PodZero(&pod);
|
||||
pod.funcPtrTableAndExitBytes_ = SIZE_MAX;
|
||||
pod.functionBytes_ = UINT32_MAX;
|
||||
pod.minHeapLength_ = AsmJSAllocationGranularity;
|
||||
pod.strict_ = strict;
|
||||
|
||||
scriptSource_->incref();
|
||||
}
|
||||
|
||||
AsmJSModule::~AsmJSModule()
|
||||
{
|
||||
scriptSource_->decref();
|
||||
|
||||
if (code_) {
|
||||
for (unsigned i = 0; i < numExits(); i++) {
|
||||
AsmJSModule::ExitDatum &exitDatum = exitIndexToGlobalDatum(i);
|
||||
if (!exitDatum.fun)
|
||||
continue;
|
||||
|
||||
if (!exitDatum.fun->hasScript())
|
||||
continue;
|
||||
|
||||
JSScript *script = exitDatum.fun->nonLazyScript();
|
||||
if (!script->hasIonScript())
|
||||
continue;
|
||||
|
||||
jit::DependentAsmJSModuleExit exit(this, i);
|
||||
script->ionScript()->removeDependentAsmJSModule(exit);
|
||||
}
|
||||
|
||||
DeallocateExecutableMemory(code_, pod.totalBytes_);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < numFunctionCounts(); i++)
|
||||
js_delete(functionCounts(i));
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::trace(JSTracer *trc)
|
||||
{
|
||||
for (unsigned i = 0; i < globals_.length(); i++)
|
||||
globals_[i].trace(trc);
|
||||
for (unsigned i = 0; i < exits_.length(); i++) {
|
||||
if (exitIndexToGlobalDatum(i).fun)
|
||||
MarkObject(trc, &exitIndexToGlobalDatum(i).fun, "asm.js imported function");
|
||||
}
|
||||
for (unsigned i = 0; i < exports_.length(); i++)
|
||||
exports_[i].trace(trc);
|
||||
for (unsigned i = 0; i < functionNames_.length(); i++)
|
||||
MarkStringUnbarriered(trc, &functionNames_[i].name(), "asm.js module function name");
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
for (unsigned i = 0; i < profiledFunctions_.length(); i++)
|
||||
profiledFunctions_[i].trace(trc);
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
for (unsigned i = 0; i < perfProfiledBlocksFunctions_.length(); i++)
|
||||
perfProfiledBlocksFunctions_[i].trace(trc);
|
||||
#endif
|
||||
if (globalArgumentName_)
|
||||
MarkStringUnbarriered(trc, &globalArgumentName_, "asm.js global argument name");
|
||||
if (importArgumentName_)
|
||||
MarkStringUnbarriered(trc, &importArgumentName_, "asm.js import argument name");
|
||||
if (bufferArgumentName_)
|
||||
MarkStringUnbarriered(trc, &bufferArgumentName_, "asm.js buffer argument name");
|
||||
if (maybeHeap_)
|
||||
gc::MarkObject(trc, &maybeHeap_, "asm.js heap");
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::addSizeOfMisc(mozilla::MallocSizeOf mallocSizeOf, size_t *asmJSModuleCode,
|
||||
size_t *asmJSModuleData)
|
||||
{
|
||||
*asmJSModuleCode += pod.totalBytes_;
|
||||
*asmJSModuleData += mallocSizeOf(this) +
|
||||
globals_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
exits_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
exports_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
callSites_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
functionNames_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
heapAccesses_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
functionCounts_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
profiledFunctions_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
perfProfiledBlocksFunctions_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
#endif
|
||||
staticLinkData_.sizeOfExcludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
struct CallSiteRetAddrOffset
|
||||
{
|
||||
const CallSiteVector &callSites;
|
||||
explicit CallSiteRetAddrOffset(const CallSiteVector &callSites) : callSites(callSites) {}
|
||||
uint32_t operator[](size_t index) const {
|
||||
return callSites[index].returnAddressOffset();
|
||||
}
|
||||
};
|
||||
|
||||
const CallSite *
|
||||
AsmJSModule::lookupCallSite(uint8_t *returnAddress) const
|
||||
{
|
||||
JS_ASSERT(isFinished());
|
||||
|
||||
uint32_t target = returnAddress - code_;
|
||||
size_t lowerBound = 0;
|
||||
size_t upperBound = callSites_.length();
|
||||
|
||||
size_t match;
|
||||
if (!BinarySearch(CallSiteRetAddrOffset(callSites_), lowerBound, upperBound, target, &match))
|
||||
return nullptr;
|
||||
|
||||
return &callSites_[match];
|
||||
}
|
||||
|
||||
struct HeapAccessOffset
|
||||
{
|
||||
const AsmJSHeapAccessVector &accesses;
|
||||
explicit HeapAccessOffset(const AsmJSHeapAccessVector &accesses) : accesses(accesses) {}
|
||||
uintptr_t operator[](size_t index) const {
|
||||
return accesses[index].offset();
|
||||
}
|
||||
};
|
||||
|
||||
const AsmJSHeapAccess *
|
||||
AsmJSModule::lookupHeapAccess(uint8_t *pc) const
|
||||
{
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(containsPC(pc));
|
||||
|
||||
uint32_t target = pc - code_;
|
||||
size_t lowerBound = 0;
|
||||
size_t upperBound = heapAccesses_.length();
|
||||
|
||||
size_t match;
|
||||
if (!BinarySearch(HeapAccessOffset(heapAccesses_), lowerBound, upperBound, target, &match))
|
||||
return nullptr;
|
||||
|
||||
return &heapAccesses_[match];
|
||||
}
|
||||
|
||||
bool
|
||||
AsmJSModule::finish(ExclusiveContext *cx, TokenStream &tokenStream, MacroAssembler &masm,
|
||||
const Label &interruptLabel)
|
||||
{
|
||||
JS_ASSERT(isFinishedWithFunctionBodies() && !isFinished());
|
||||
|
||||
uint32_t endBeforeCurly = tokenStream.currentToken().pos.end;
|
||||
uint32_t endAfterCurly = tokenStream.peekTokenPos().end;
|
||||
JS_ASSERT(endBeforeCurly >= offsetToEndOfUseAsm_);
|
||||
JS_ASSERT(endAfterCurly >= offsetToEndOfUseAsm_);
|
||||
pod.funcLength_ = endBeforeCurly - funcStart_;
|
||||
pod.funcLengthWithRightBrace_ = endAfterCurly - funcStart_;
|
||||
|
||||
// The global data section sits immediately after the executable (and
|
||||
// other) data allocated by the MacroAssembler, so ensure it is
|
||||
|
@ -117,15 +252,148 @@ AsmJSModule::allocateAndCopyCode(ExclusiveContext *cx, MacroAssembler &masm)
|
|||
// units of pages.
|
||||
pod.totalBytes_ = AlignBytes(pod.codeBytes_ + globalDataBytes(), AsmJSPageSize);
|
||||
|
||||
JS_ASSERT(!code_);
|
||||
code_ = AllocateExecutableMemory(cx, pod.totalBytes_);
|
||||
if (!code_)
|
||||
return false;
|
||||
|
||||
// Copy the code from the MacroAssembler into its final resting place in the
|
||||
// AsmJSModule.
|
||||
JS_ASSERT(uintptr_t(code_) % AsmJSPageSize == 0);
|
||||
masm.executableCopy(code_);
|
||||
|
||||
// c.f. JitCode::copyFrom
|
||||
JS_ASSERT(masm.jumpRelocationTableBytes() == 0);
|
||||
JS_ASSERT(masm.dataRelocationTableBytes() == 0);
|
||||
JS_ASSERT(masm.preBarrierTableBytes() == 0);
|
||||
JS_ASSERT(!masm.hasEnteredExitFrame());
|
||||
|
||||
// Copy over metadata, making sure to update all offsets on ARM.
|
||||
|
||||
staticLinkData_.interruptExitOffset = masm.actualOffset(interruptLabel.offset());
|
||||
|
||||
// Heap-access metadata used for link-time patching and fault-handling.
|
||||
heapAccesses_ = masm.extractAsmJSHeapAccesses();
|
||||
|
||||
// Call-site metadata used for stack unwinding.
|
||||
callSites_ = masm.extractCallSites();
|
||||
|
||||
#if defined(JS_CODEGEN_ARM)
|
||||
// ARM requires the offsets to be updated.
|
||||
for (size_t i = 0; i < heapAccesses_.length(); i++) {
|
||||
AsmJSHeapAccess &a = heapAccesses_[i];
|
||||
a.setOffset(masm.actualOffset(a.offset()));
|
||||
}
|
||||
for (size_t i = 0; i < callSites_.length(); i++) {
|
||||
CallSite &c = callSites_[i];
|
||||
c.setReturnAddressOffset(masm.actualOffset(c.returnAddressOffset()));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Absolute link metadata: absolute addresses that refer to some fixed
|
||||
// address in the address space.
|
||||
for (size_t i = 0; i < masm.numAsmJSAbsoluteLinks(); i++) {
|
||||
AsmJSAbsoluteLink src = masm.asmJSAbsoluteLink(i);
|
||||
AbsoluteLink link;
|
||||
link.patchAt = CodeOffsetLabel(masm.actualOffset(src.patchAt.offset()));
|
||||
link.target = src.target;
|
||||
if (!staticLinkData_.absoluteLinks.append(link))
|
||||
return false;
|
||||
}
|
||||
|
||||
// Relative link metadata: absolute addresses that refer to another point within
|
||||
// the asm.js module.
|
||||
|
||||
// CodeLabels are used for switch cases and loads from doubles in the
|
||||
// constant pool.
|
||||
for (size_t i = 0; i < masm.numCodeLabels(); i++) {
|
||||
CodeLabel src = masm.codeLabel(i);
|
||||
int32_t labelOffset = src.dest()->offset();
|
||||
int32_t targetOffset = masm.actualOffset(src.src()->offset());
|
||||
// The patched uses of a label embed a linked list where the
|
||||
// to-be-patched immediate is the offset of the next to-be-patched
|
||||
// instruction.
|
||||
while (labelOffset != LabelBase::INVALID_OFFSET) {
|
||||
size_t patchAtOffset = masm.labelOffsetToPatchOffset(labelOffset);
|
||||
RelativeLink link(RelativeLink::CodeLabel);
|
||||
link.patchAtOffset = patchAtOffset;
|
||||
link.targetOffset = targetOffset;
|
||||
if (!staticLinkData_.relativeLinks.append(link))
|
||||
return false;
|
||||
|
||||
labelOffset = Assembler::extractCodeLabelOffset(code_ + patchAtOffset);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
// Global data accesses in x86 need to be patched with the absolute
|
||||
// address of the global. Globals are allocated sequentially after the
|
||||
// code section so we can just use an RelativeLink.
|
||||
for (size_t i = 0; i < masm.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm.asmJSGlobalAccess(i);
|
||||
RelativeLink link(RelativeLink::InstructionImmediate);
|
||||
link.patchAtOffset = masm.labelOffsetToPatchOffset(a.patchAt.offset());
|
||||
link.targetOffset = offsetOfGlobalData() + a.globalDataOffset;
|
||||
if (!staticLinkData_.relativeLinks.append(link))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(JS_CODEGEN_MIPS)
|
||||
// On MIPS we need to update all the long jumps because they contain an
|
||||
// absolute adress.
|
||||
for (size_t i = 0; i < masm.numLongJumps(); i++) {
|
||||
RelativeLink link(RelativeLink::InstructionImmediate);
|
||||
link.patchAtOffset = masm.longJump(i);
|
||||
InstImm *inst = (InstImm *)(code_ + masm.longJump(i));
|
||||
link.targetOffset = Assembler::extractLuiOriValue(inst, inst->next()) - (uint32_t)code_;
|
||||
if (!staticLinkData_.relativeLinks.append(link))
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(JS_CODEGEN_X64)
|
||||
// Global data accesses on x64 use rip-relative addressing and thus do
|
||||
// not need patching after deserialization.
|
||||
for (size_t i = 0; i < masm.numAsmJSGlobalAccesses(); i++) {
|
||||
AsmJSGlobalAccess a = masm.asmJSGlobalAccess(i);
|
||||
masm.patchAsmJSGlobalAccess(a.patchAt, code_, globalData(), a.globalDataOffset);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
// Fix up the code offsets. Note the endCodeOffset should not be
|
||||
// filtered through 'actualOffset' as it is generated using 'size()'
|
||||
// rather than a label.
|
||||
for (size_t i = 0; i < profiledFunctions_.length(); i++) {
|
||||
ProfiledFunction &pf = profiledFunctions_[i];
|
||||
pf.pod.startCodeOffset = masm.actualOffset(pf.pod.startCodeOffset);
|
||||
}
|
||||
#endif
|
||||
#ifdef JS_ION_PERF
|
||||
for (size_t i = 0; i < perfProfiledBlocksFunctions_.length(); i++) {
|
||||
ProfiledBlocksFunction &pbf = perfProfiledBlocksFunctions_[i];
|
||||
pbf.pod.startCodeOffset = masm.actualOffset(pbf.pod.startCodeOffset);
|
||||
pbf.endInlineCodeOffset = masm.actualOffset(pbf.endInlineCodeOffset);
|
||||
BasicBlocksVector &basicBlocks = pbf.blocks;
|
||||
for (uint32_t i = 0; i < basicBlocks.length(); i++) {
|
||||
Record &r = basicBlocks[i];
|
||||
r.startOffset = masm.actualOffset(r.startOffset);
|
||||
r.endOffset = masm.actualOffset(r.endOffset);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::setAutoFlushICacheRange()
|
||||
{
|
||||
JS_ASSERT(isFinished());
|
||||
AutoFlushICache::setRange(uintptr_t(code_), pod.codeBytes_);
|
||||
}
|
||||
|
||||
static int32_t
|
||||
CoerceInPlace_ToInt32(JSContext *cx, MutableHandleValue val)
|
||||
{
|
||||
|
@ -271,44 +539,12 @@ AddressOf(AsmJSImmKind kind, ExclusiveContext *cx)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::restoreToInitialState(ArrayBufferObject *maybePrevBuffer, ExclusiveContext *cx)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// Put the absolute links back to -1 so patchDataWithValueCheck assertions
|
||||
// in staticallyLink are valid.
|
||||
for (size_t i = 0; i < staticLinkData_.absoluteLinks.length(); i++) {
|
||||
AbsoluteLink link = staticLinkData_.absoluteLinks[i];
|
||||
Assembler::patchDataWithValueCheck(CodeLocationLabel(code_ + link.patchAt.offset()),
|
||||
PatchedImmPtr((void*)-1),
|
||||
PatchedImmPtr(AddressOf(link.target, cx)));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (maybePrevBuffer) {
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
// Subtract out the base-pointer added by AsmJSModule::initHeap.
|
||||
uint8_t *ptrBase = maybePrevBuffer->dataPointer();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
const jit::AsmJSHeapAccess &access = heapAccesses_[i];
|
||||
void *addr = access.patchOffsetAt(code_);
|
||||
uint8_t *ptr = reinterpret_cast<uint8_t*>(JSC::X86Assembler::getPointer(addr));
|
||||
JS_ASSERT(ptr >= ptrBase);
|
||||
JSC::X86Assembler::setPointer(addr, (void *)(ptr - ptrBase));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::setAutoFlushICacheRange()
|
||||
{
|
||||
AutoFlushICache::setRange(uintptr_t(code_), pod.codeBytes_);
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::staticallyLink(ExclusiveContext *cx)
|
||||
{
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(!isStaticallyLinked());
|
||||
|
||||
// Process staticLinkData_
|
||||
|
||||
interruptExit_ = code_ + staticLinkData_.interruptExitOffset;
|
||||
|
@ -336,76 +572,68 @@ AsmJSModule::staticallyLink(ExclusiveContext *cx)
|
|||
exitIndexToGlobalDatum(i).exit = interpExitTrampoline(exits_[i]);
|
||||
exitIndexToGlobalDatum(i).fun = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
AsmJSModule::AsmJSModule(ScriptSource *scriptSource, uint32_t funcStart,
|
||||
uint32_t offsetToEndOfUseAsm, bool strict)
|
||||
: globalArgumentName_(nullptr),
|
||||
importArgumentName_(nullptr),
|
||||
bufferArgumentName_(nullptr),
|
||||
code_(nullptr),
|
||||
interruptExit_(nullptr),
|
||||
dynamicallyLinked_(false),
|
||||
loadedFromCache_(false),
|
||||
funcStart_(funcStart),
|
||||
offsetToEndOfUseAsm_(offsetToEndOfUseAsm),
|
||||
scriptSource_(scriptSource),
|
||||
codeIsProtected_(false)
|
||||
{
|
||||
mozilla::PodZero(&pod);
|
||||
scriptSource_->incref();
|
||||
pod.minHeapLength_ = AsmJSAllocationGranularity;
|
||||
pod.strict_ = strict;
|
||||
}
|
||||
|
||||
AsmJSModule::~AsmJSModule()
|
||||
{
|
||||
scriptSource_->decref();
|
||||
|
||||
if (code_) {
|
||||
for (unsigned i = 0; i < numExits(); i++) {
|
||||
AsmJSModule::ExitDatum &exitDatum = exitIndexToGlobalDatum(i);
|
||||
if (!exitDatum.fun)
|
||||
continue;
|
||||
|
||||
if (!exitDatum.fun->hasScript())
|
||||
continue;
|
||||
|
||||
JSScript *script = exitDatum.fun->nonLazyScript();
|
||||
if (!script->hasIonScript())
|
||||
continue;
|
||||
|
||||
jit::DependentAsmJSModuleExit exit(this, i);
|
||||
script->ionScript()->removeDependentAsmJSModule(exit);
|
||||
}
|
||||
|
||||
DeallocateExecutableMemory(code_, pod.totalBytes_);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < numFunctionCounts(); i++)
|
||||
js_delete(functionCounts(i));
|
||||
JS_ASSERT(isStaticallyLinked());
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::addSizeOfMisc(mozilla::MallocSizeOf mallocSizeOf, size_t *asmJSModuleCode,
|
||||
size_t *asmJSModuleData)
|
||||
AsmJSModule::initHeap(Handle<ArrayBufferObject*> heap, JSContext *cx)
|
||||
{
|
||||
*asmJSModuleCode += pod.totalBytes_;
|
||||
*asmJSModuleData += mallocSizeOf(this) +
|
||||
globals_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
exits_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
exports_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
callSites_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
functionNames_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
heapAccesses_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
profiledFunctions_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
JS_ASSERT(IsValidAsmJSHeapLength(heap->byteLength()));
|
||||
JS_ASSERT(dynamicallyLinked_);
|
||||
JS_ASSERT(!maybeHeap_);
|
||||
|
||||
maybeHeap_ = heap;
|
||||
heapDatum() = heap->dataPointer();
|
||||
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
uint8_t *heapOffset = heap->dataPointer();
|
||||
void *heapLength = (void*)heap->byteLength();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
const jit::AsmJSHeapAccess &access = heapAccesses_[i];
|
||||
if (access.hasLengthCheck())
|
||||
JSC::X86Assembler::setPointer(access.patchLengthAt(code_), heapLength);
|
||||
void *addr = access.patchOffsetAt(code_);
|
||||
uint32_t disp = reinterpret_cast<uint32_t>(JSC::X86Assembler::getPointer(addr));
|
||||
JS_ASSERT(disp <= INT32_MAX);
|
||||
JSC::X86Assembler::setPointer(addr, (void *)(heapOffset + disp));
|
||||
}
|
||||
#elif defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_MIPS)
|
||||
uint32_t heapLength = heap->byteLength();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
jit::Assembler::updateBoundsCheck(heapLength,
|
||||
(jit::Instruction*)(heapAccesses_[i].offset() + code_));
|
||||
}
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
perfProfiledBlocksFunctions_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
}
|
||||
|
||||
void
|
||||
AsmJSModule::restoreToInitialState(ArrayBufferObject *maybePrevBuffer, ExclusiveContext *cx)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// Put the absolute links back to -1 so patchDataWithValueCheck assertions
|
||||
// in staticallyLink are valid.
|
||||
for (size_t i = 0; i < staticLinkData_.absoluteLinks.length(); i++) {
|
||||
AbsoluteLink link = staticLinkData_.absoluteLinks[i];
|
||||
Assembler::patchDataWithValueCheck(CodeLocationLabel(code_ + link.patchAt.offset()),
|
||||
PatchedImmPtr((void*)-1),
|
||||
PatchedImmPtr(AddressOf(link.target, cx)));
|
||||
}
|
||||
#endif
|
||||
functionCounts_.sizeOfExcludingThis(mallocSizeOf) +
|
||||
staticLinkData_.sizeOfExcludingThis(mallocSizeOf);
|
||||
|
||||
if (maybePrevBuffer) {
|
||||
#if defined(JS_CODEGEN_X86)
|
||||
// Subtract out the base-pointer added by AsmJSModule::initHeap.
|
||||
uint8_t *ptrBase = maybePrevBuffer->dataPointer();
|
||||
for (unsigned i = 0; i < heapAccesses_.length(); i++) {
|
||||
const jit::AsmJSHeapAccess &access = heapAccesses_[i];
|
||||
void *addr = access.patchOffsetAt(code_);
|
||||
uint8_t *ptr = reinterpret_cast<uint8_t*>(JSC::X86Assembler::getPointer(addr));
|
||||
JS_ASSERT(ptr >= ptrBase);
|
||||
JSC::X86Assembler::setPointer(addr, (void *)(ptr - ptrBase));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -966,6 +1194,7 @@ AsmJSModule::clone(JSContext *cx, ScopedJSDeletePtr<AsmJSModule> *moduleOut) con
|
|||
void
|
||||
AsmJSModule::protectCode(JSRuntime *rt) const
|
||||
{
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
JS_ASSERT(rt->currentThreadOwnsInterruptLock());
|
||||
|
||||
codeIsProtected_ = true;
|
||||
|
@ -989,6 +1218,7 @@ AsmJSModule::protectCode(JSRuntime *rt) const
|
|||
void
|
||||
AsmJSModule::unprotectCode(JSRuntime *rt) const
|
||||
{
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
JS_ASSERT(rt->currentThreadOwnsInterruptLock());
|
||||
|
||||
codeIsProtected_ = false;
|
||||
|
@ -1009,6 +1239,7 @@ AsmJSModule::unprotectCode(JSRuntime *rt) const
|
|||
bool
|
||||
AsmJSModule::codeIsProtected(JSRuntime *rt) const
|
||||
{
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
JS_ASSERT(rt->currentThreadOwnsInterruptLock());
|
||||
return codeIsProtected_;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
namespace js {
|
||||
|
||||
namespace frontend { class TokenStream; }
|
||||
|
||||
// These EcmaScript-defined coercions form the basis of the asm.js type system.
|
||||
enum AsmJSCoercion
|
||||
{
|
||||
|
@ -209,6 +211,15 @@ class AsmJSModule
|
|||
};
|
||||
typedef int32_t (*CodePtr)(uint64_t *args, uint8_t *global);
|
||||
|
||||
// An Exit holds bookkeeping information about an exit; the ExitDatum
|
||||
// struct overlays the actual runtime data stored in the global data
|
||||
// section.
|
||||
struct ExitDatum
|
||||
{
|
||||
uint8_t *exit;
|
||||
HeapPtrFunction fun;
|
||||
};
|
||||
|
||||
typedef Vector<AsmJSCoercion, 0, SystemAllocPolicy> ArgCoercionVector;
|
||||
|
||||
enum ReturnType { Return_Int32, Return_Double, Return_Void };
|
||||
|
@ -436,69 +447,50 @@ class AsmJSModule
|
|||
};
|
||||
|
||||
private:
|
||||
typedef Vector<Global, 0, SystemAllocPolicy> GlobalVector;
|
||||
typedef Vector<Exit, 0, SystemAllocPolicy> ExitVector;
|
||||
typedef Vector<ExportedFunction, 0, SystemAllocPolicy> ExportedFunctionVector;
|
||||
typedef Vector<jit::CallSite, 0, SystemAllocPolicy> CallSiteVector;
|
||||
typedef Vector<Name, 0, SystemAllocPolicy> FunctionNameVector;
|
||||
typedef Vector<jit::AsmJSHeapAccess, 0, SystemAllocPolicy> HeapAccessVector;
|
||||
typedef Vector<jit::IonScriptCounts *, 0, SystemAllocPolicy> FunctionCountsVector;
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
typedef Vector<ProfiledFunction, 0, SystemAllocPolicy> ProfiledFunctionVector;
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
typedef Vector<ProfiledBlocksFunction, 0, SystemAllocPolicy> ProfiledBlocksFunctionVector;
|
||||
#endif
|
||||
|
||||
private:
|
||||
PropertyName * globalArgumentName_;
|
||||
PropertyName * importArgumentName_;
|
||||
PropertyName * bufferArgumentName_;
|
||||
|
||||
GlobalVector globals_;
|
||||
ExitVector exits_;
|
||||
ExportedFunctionVector exports_;
|
||||
CallSiteVector callSites_;
|
||||
FunctionNameVector functionNames_;
|
||||
HeapAccessVector heapAccesses_;
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
ProfiledFunctionVector profiledFunctions_;
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
ProfiledBlocksFunctionVector perfProfiledBlocksFunctions_;
|
||||
#endif
|
||||
|
||||
struct Pod {
|
||||
uint32_t funcLength_;
|
||||
uint32_t funcLengthWithRightBrace_;
|
||||
bool strict_;
|
||||
uint32_t numGlobalVars_;
|
||||
uint32_t numFFIs_;
|
||||
size_t funcPtrTableAndExitBytes_;
|
||||
bool hasArrayView_;
|
||||
size_t functionBytes_; // just the function bodies, no stubs
|
||||
size_t codeBytes_; // function bodies and stubs
|
||||
size_t totalBytes_; // function bodies, stubs, and global data
|
||||
uint32_t minHeapLength_;
|
||||
uint32_t numGlobalVars_;
|
||||
uint32_t numFFIs_;
|
||||
uint32_t funcLength_;
|
||||
uint32_t funcLengthWithRightBrace_;
|
||||
bool strict_;
|
||||
bool hasArrayView_;
|
||||
} pod;
|
||||
|
||||
uint8_t * code_;
|
||||
uint8_t * interruptExit_;
|
||||
// These two fields need to be kept out pod as they depend on the position
|
||||
// of the module within the ScriptSource and thus aren't invariant with
|
||||
// respect to caching.
|
||||
const uint32_t funcStart_;
|
||||
const uint32_t offsetToEndOfUseAsm_;
|
||||
|
||||
StaticLinkData staticLinkData_;
|
||||
bool dynamicallyLinked_;
|
||||
bool loadedFromCache_;
|
||||
HeapPtrArrayBufferObject maybeHeap_;
|
||||
|
||||
// The next two fields need to be kept out of the Pod as they depend on the
|
||||
// position of the module within the ScriptSource and thus aren't invariant
|
||||
// with caching.
|
||||
uint32_t funcStart_;
|
||||
uint32_t offsetToEndOfUseAsm_;
|
||||
Vector<Global, 0, SystemAllocPolicy> globals_;
|
||||
Vector<Exit, 0, SystemAllocPolicy> exits_;
|
||||
Vector<ExportedFunction, 0, SystemAllocPolicy> exports_;
|
||||
Vector<jit::CallSite, 0, SystemAllocPolicy> callSites_;
|
||||
Vector<Name, 0, SystemAllocPolicy> functionNames_;
|
||||
Vector<jit::AsmJSHeapAccess, 0, SystemAllocPolicy> heapAccesses_;
|
||||
Vector<jit::IonScriptCounts*, 0, SystemAllocPolicy> functionCounts_;
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
Vector<ProfiledFunction, 0, SystemAllocPolicy> profiledFunctions_;
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
Vector<ProfiledBlocksFunction, 0, SystemAllocPolicy> perfProfiledBlocksFunctions_;
|
||||
#endif
|
||||
|
||||
ScriptSource * scriptSource_;
|
||||
|
||||
FunctionCountsVector functionCounts_;
|
||||
PropertyName * globalArgumentName_;
|
||||
PropertyName * importArgumentName_;
|
||||
PropertyName * bufferArgumentName_;
|
||||
uint8_t * code_;
|
||||
uint8_t * interruptExit_;
|
||||
StaticLinkData staticLinkData_;
|
||||
HeapPtrArrayBufferObject maybeHeap_;
|
||||
bool dynamicallyLinked_;
|
||||
bool loadedFromCache_;
|
||||
|
||||
// This field is accessed concurrently when requesting an interrupt.
|
||||
// Access must be synchronized via the runtime's interrupt lock.
|
||||
|
@ -507,73 +499,90 @@ class AsmJSModule
|
|||
public:
|
||||
explicit AsmJSModule(ScriptSource *scriptSource, uint32_t functStart,
|
||||
uint32_t offsetToEndOfUseAsm, bool strict);
|
||||
void trace(JSTracer *trc);
|
||||
~AsmJSModule();
|
||||
|
||||
void trace(JSTracer *trc) {
|
||||
for (unsigned i = 0; i < globals_.length(); i++)
|
||||
globals_[i].trace(trc);
|
||||
for (unsigned i = 0; i < exports_.length(); i++)
|
||||
exports_[i].trace(trc);
|
||||
for (unsigned i = 0; i < exits_.length(); i++) {
|
||||
if (exitIndexToGlobalDatum(i).fun)
|
||||
MarkObject(trc, &exitIndexToGlobalDatum(i).fun, "asm.js imported function");
|
||||
}
|
||||
for (unsigned i = 0; i < functionNames_.length(); i++)
|
||||
MarkStringUnbarriered(trc, &functionNames_[i].name(), "asm.js module function name");
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
for (unsigned i = 0; i < profiledFunctions_.length(); i++)
|
||||
profiledFunctions_[i].trace(trc);
|
||||
#endif
|
||||
#if defined(JS_ION_PERF)
|
||||
for (unsigned i = 0; i < perfProfiledBlocksFunctions_.length(); i++)
|
||||
perfProfiledBlocksFunctions_[i].trace(trc);
|
||||
#endif
|
||||
if (maybeHeap_)
|
||||
gc::MarkObject(trc, &maybeHeap_, "asm.js heap");
|
||||
// An AsmJSModule transitions monotonically through these states:
|
||||
bool isFinishedWithModulePrologue() const { return pod.funcPtrTableAndExitBytes_ != SIZE_MAX; }
|
||||
bool isFinishedWithFunctionBodies() const { return pod.functionBytes_ != UINT32_MAX; }
|
||||
bool isFinished() const { return !!code_; }
|
||||
bool isStaticallyLinked() const { return !!interruptExit_; }
|
||||
bool isDynamicallyLinked() const { return dynamicallyLinked_; }
|
||||
|
||||
if (globalArgumentName_)
|
||||
MarkStringUnbarriered(trc, &globalArgumentName_, "asm.js global argument name");
|
||||
if (importArgumentName_)
|
||||
MarkStringUnbarriered(trc, &importArgumentName_, "asm.js import argument name");
|
||||
if (bufferArgumentName_)
|
||||
MarkStringUnbarriered(trc, &bufferArgumentName_, "asm.js buffer argument name");
|
||||
}
|
||||
/*************************************************************************/
|
||||
// These functions may be used as soon as the module is constructed:
|
||||
|
||||
ScriptSource *scriptSource() const {
|
||||
JS_ASSERT(scriptSource_ != nullptr);
|
||||
JS_ASSERT(scriptSource_);
|
||||
return scriptSource_;
|
||||
}
|
||||
|
||||
/*
|
||||
* funcStart() refers to the offset in the ScriptSource to the beginning
|
||||
* of the function. If the function has been created with the Function
|
||||
* constructor, this will be the first character in the function source.
|
||||
* Otherwise, it will be the opening parenthesis of the arguments list.
|
||||
*/
|
||||
uint32_t funcStart() const {
|
||||
return funcStart_;
|
||||
}
|
||||
uint32_t offsetToEndOfUseAsm() const {
|
||||
return offsetToEndOfUseAsm_;
|
||||
}
|
||||
void initFuncEnd(uint32_t endBeforeCurly, uint32_t endAfterCurly) {
|
||||
JS_ASSERT(endBeforeCurly >= offsetToEndOfUseAsm_);
|
||||
JS_ASSERT(endAfterCurly >= offsetToEndOfUseAsm_);
|
||||
pod.funcLength_ = endBeforeCurly - funcStart_;
|
||||
pod.funcLengthWithRightBrace_ = endAfterCurly - funcStart_;
|
||||
}
|
||||
uint32_t funcEndBeforeCurly() const {
|
||||
return funcStart_ + pod.funcLength_;
|
||||
}
|
||||
uint32_t funcEndAfterCurly() const {
|
||||
return funcStart_ + pod.funcLengthWithRightBrace_;
|
||||
}
|
||||
bool strict() const {
|
||||
return pod.strict_;
|
||||
}
|
||||
bool loadedFromCache() const {
|
||||
return loadedFromCache_;
|
||||
}
|
||||
|
||||
// funcStart() refers to the offset in the ScriptSource to the beginning
|
||||
// of the function. If the function has been created with the Function
|
||||
// constructor, this will be the first character in the function source.
|
||||
// Otherwise, it will be the opening parenthesis of the arguments list.
|
||||
uint32_t funcStart() const {
|
||||
return funcStart_;
|
||||
}
|
||||
|
||||
// offsetToEndOfUseAsm() refers to the offset in the ScriptSource to the end
|
||||
// of the 'use asm' string-literal token.
|
||||
uint32_t offsetToEndOfUseAsm() const {
|
||||
return offsetToEndOfUseAsm_;
|
||||
}
|
||||
|
||||
// While these functions may be accessed at any time, their values will
|
||||
// change as the module is compiled.
|
||||
uint32_t minHeapLength() const {
|
||||
return pod.minHeapLength_;
|
||||
}
|
||||
unsigned numFunctionCounts() const {
|
||||
return functionCounts_.length();
|
||||
}
|
||||
jit::IonScriptCounts *functionCounts(unsigned i) {
|
||||
return functionCounts_[i];
|
||||
}
|
||||
|
||||
// about:memory reporting
|
||||
void addSizeOfMisc(mozilla::MallocSizeOf mallocSizeOf, size_t *asmJSModuleCode,
|
||||
size_t *asmJSModuleData);
|
||||
|
||||
/*************************************************************************/
|
||||
// These functions build the global scope of the module while parsing the
|
||||
// module prologue (before the function bodies):
|
||||
|
||||
void initGlobalArgumentName(PropertyName *n) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
globalArgumentName_ = n;
|
||||
}
|
||||
void initImportArgumentName(PropertyName *n) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
importArgumentName_ = n;
|
||||
}
|
||||
void initBufferArgumentName(PropertyName *n) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
bufferArgumentName_ = n;
|
||||
}
|
||||
PropertyName *globalArgumentName() const {
|
||||
return globalArgumentName_;
|
||||
}
|
||||
PropertyName *importArgumentName() const {
|
||||
return importArgumentName_;
|
||||
}
|
||||
PropertyName *bufferArgumentName() const {
|
||||
return bufferArgumentName_;
|
||||
}
|
||||
bool addGlobalVarInit(const Value &v, AsmJSCoercion coercion, uint32_t *globalIndex) {
|
||||
JS_ASSERT(pod.funcPtrTableAndExitBytes_ == 0);
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
if (pod.numGlobalVars_ == UINT32_MAX)
|
||||
return false;
|
||||
Global g(Global::Variable, nullptr);
|
||||
|
@ -584,7 +593,7 @@ class AsmJSModule
|
|||
return globals_.append(g);
|
||||
}
|
||||
bool addGlobalVarImport(PropertyName *name, AsmJSCoercion coercion, uint32_t *globalIndex) {
|
||||
JS_ASSERT(pod.funcPtrTableAndExitBytes_ == 0);
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
Global g(Global::Variable, name);
|
||||
g.pod.u.var.initKind_ = Global::InitImport;
|
||||
g.pod.u.var.coercion_ = coercion;
|
||||
|
@ -592,6 +601,7 @@ class AsmJSModule
|
|||
return globals_.append(g);
|
||||
}
|
||||
bool addFFI(PropertyName *field, uint32_t *ffiIndex) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
if (pod.numFFIs_ == UINT32_MAX)
|
||||
return false;
|
||||
Global g(Global::FFI, field);
|
||||
|
@ -599,37 +609,69 @@ class AsmJSModule
|
|||
return globals_.append(g);
|
||||
}
|
||||
bool addArrayView(ArrayBufferView::ViewType vt, PropertyName *field) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
pod.hasArrayView_ = true;
|
||||
Global g(Global::ArrayView, field);
|
||||
g.pod.u.viewType_ = vt;
|
||||
return globals_.append(g);
|
||||
}
|
||||
bool addMathBuiltinFunction(AsmJSMathBuiltinFunction func, PropertyName *field) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
Global g(Global::MathBuiltinFunction, field);
|
||||
g.pod.u.mathBuiltinFunc_ = func;
|
||||
return globals_.append(g);
|
||||
}
|
||||
bool addMathBuiltinConstant(double value, PropertyName *field) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
Global g(Global::Constant, field);
|
||||
g.pod.u.constant.value_ = value;
|
||||
g.pod.u.constant.kind_ = Global::MathConstant;
|
||||
return globals_.append(g);
|
||||
}
|
||||
bool addGlobalConstant(double value, PropertyName *name) {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
Global g(Global::Constant, name);
|
||||
g.pod.u.constant.value_ = value;
|
||||
g.pod.u.constant.kind_ = Global::GlobalConstant;
|
||||
return globals_.append(g);
|
||||
}
|
||||
bool addFuncPtrTable(unsigned numElems, uint32_t *globalDataOffset) {
|
||||
JS_ASSERT(IsPowerOfTwo(numElems));
|
||||
if (SIZE_MAX - pod.funcPtrTableAndExitBytes_ < numElems * sizeof(void*))
|
||||
unsigned numGlobals() const {
|
||||
return globals_.length();
|
||||
}
|
||||
Global &global(unsigned i) {
|
||||
return globals_[i];
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void startFunctionBodies() {
|
||||
JS_ASSERT(!isFinishedWithModulePrologue());
|
||||
pod.funcPtrTableAndExitBytes_ = 0;
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
// These functions are called while parsing/compiling function bodies:
|
||||
|
||||
void requireHeapLengthToBeAtLeast(uint32_t len) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
if (len > pod.minHeapLength_)
|
||||
pod.minHeapLength_ = len;
|
||||
}
|
||||
bool addFunctionName(PropertyName *name, uint32_t *nameIndex) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
JS_ASSERT(name->isTenured());
|
||||
if (functionNames_.length() > jit::CallSiteDesc::FUNCTION_NAME_INDEX_MAX)
|
||||
return false;
|
||||
*globalDataOffset = globalDataBytes();
|
||||
pod.funcPtrTableAndExitBytes_ += numElems * sizeof(void*);
|
||||
return true;
|
||||
*nameIndex = functionNames_.length();
|
||||
return functionNames_.append(name);
|
||||
}
|
||||
PropertyName *functionName(uint32_t i) const {
|
||||
JS_ASSERT(isFinished());
|
||||
return functionNames_[i].name();
|
||||
}
|
||||
bool addExit(unsigned ffiIndex, unsigned *exitIndex) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
if (SIZE_MAX - pod.funcPtrTableAndExitBytes_ < sizeof(ExitDatum))
|
||||
return false;
|
||||
uint32_t globalDataOffset = globalDataBytes();
|
||||
|
@ -638,15 +680,92 @@ class AsmJSModule
|
|||
*exitIndex = unsigned(exits_.length());
|
||||
return exits_.append(Exit(ffiIndex, globalDataOffset));
|
||||
}
|
||||
unsigned numExits() const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return exits_.length();
|
||||
}
|
||||
Exit &exit(unsigned i) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return exits_[i];
|
||||
}
|
||||
const Exit &exit(unsigned i) const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return exits_[i];
|
||||
}
|
||||
bool addFuncPtrTable(unsigned numElems, uint32_t *globalDataOffset) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinished());
|
||||
JS_ASSERT(IsPowerOfTwo(numElems));
|
||||
if (SIZE_MAX - pod.funcPtrTableAndExitBytes_ < numElems * sizeof(void*))
|
||||
return false;
|
||||
*globalDataOffset = globalDataBytes();
|
||||
pod.funcPtrTableAndExitBytes_ += numElems * sizeof(void*);
|
||||
return true;
|
||||
}
|
||||
bool addFunctionCounts(jit::IonScriptCounts *counts) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
return functionCounts_.append(counts);
|
||||
}
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
bool addProfiledFunction(PropertyName *name, unsigned startCodeOffset, unsigned endCodeOffset,
|
||||
unsigned line, unsigned column)
|
||||
{
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
ProfiledFunction func(name, startCodeOffset, endCodeOffset, line, column);
|
||||
return profiledFunctions_.append(func);
|
||||
}
|
||||
unsigned numProfiledFunctions() const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return profiledFunctions_.length();
|
||||
}
|
||||
ProfiledFunction &profiledFunction(unsigned i) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return profiledFunctions_[i];
|
||||
}
|
||||
#endif
|
||||
#ifdef JS_ION_PERF
|
||||
bool addPerfProfiledBlocks(PropertyName *name, unsigned startCodeOffset,
|
||||
unsigned endInlineCodeOffset, unsigned endCodeOffset,
|
||||
jit::BasicBlocksVector &basicBlocks)
|
||||
{
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
ProfiledBlocksFunction func(name, startCodeOffset, endInlineCodeOffset, endCodeOffset,
|
||||
basicBlocks);
|
||||
return perfProfiledBlocksFunctions_.append(mozilla::Move(func));
|
||||
}
|
||||
unsigned numPerfBlocksFunctions() const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return perfProfiledBlocksFunctions_.length();
|
||||
}
|
||||
ProfiledBlocksFunction &perfProfiledBlocksFunction(unsigned i) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return perfProfiledBlocksFunctions_[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
bool addExportedFunction(PropertyName *name, uint32_t srcStart, uint32_t srcEnd,
|
||||
/*************************************************************************/
|
||||
|
||||
// This function is called after compiling the function bodies (before
|
||||
// compiling entries/exits) to record the extent of compiled function code.
|
||||
void finishFunctionBodies(size_t functionBytes) {
|
||||
JS_ASSERT(isFinishedWithModulePrologue() && !isFinishedWithFunctionBodies());
|
||||
JS_ASSERT(functionBytes % AsmJSPageSize == 0);
|
||||
pod.functionBytes_ = functionBytes;
|
||||
JS_ASSERT(isFinishedWithFunctionBodies());
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
// Exported functions are added after finishFunctionBodies() and before
|
||||
// finish(). The list of exported functions can be accessed any time after
|
||||
// the exported functions have been added.
|
||||
|
||||
bool addExportedFunction(PropertyName *name,
|
||||
uint32_t srcStart,
|
||||
uint32_t srcEnd,
|
||||
PropertyName *maybeFieldName,
|
||||
ArgCoercionVector &&argCoercions,
|
||||
ReturnType returnType)
|
||||
{
|
||||
JS_ASSERT(isFinishedWithFunctionBodies() && !isFinished());
|
||||
ExportedFunction func(name, srcStart, srcEnd, maybeFieldName,
|
||||
mozilla::Move(argCoercions), returnType);
|
||||
if (exports_.length() >= UINT32_MAX)
|
||||
|
@ -654,109 +773,84 @@ class AsmJSModule
|
|||
return exports_.append(mozilla::Move(func));
|
||||
}
|
||||
unsigned numExportedFunctions() const {
|
||||
JS_ASSERT(isFinishedWithFunctionBodies());
|
||||
return exports_.length();
|
||||
}
|
||||
const ExportedFunction &exportedFunction(unsigned i) const {
|
||||
JS_ASSERT(isFinishedWithFunctionBodies());
|
||||
return exports_[i];
|
||||
}
|
||||
ExportedFunction &exportedFunction(unsigned i) {
|
||||
JS_ASSERT(isFinishedWithFunctionBodies());
|
||||
return exports_[i];
|
||||
}
|
||||
CodePtr entryTrampoline(const ExportedFunction &func) const {
|
||||
JS_ASSERT(func.pod.codeOffset_ != UINT32_MAX);
|
||||
return JS_DATA_TO_FUNC_PTR(CodePtr, code_ + func.pod.codeOffset_);
|
||||
}
|
||||
|
||||
bool addFunctionName(PropertyName *name, uint32_t *nameIndex) {
|
||||
JS_ASSERT(name->isTenured());
|
||||
if (functionNames_.length() > jit::CallSiteDesc::FUNCTION_NAME_INDEX_MAX)
|
||||
return false;
|
||||
*nameIndex = functionNames_.length();
|
||||
return functionNames_.append(name);
|
||||
}
|
||||
PropertyName *functionName(uint32_t i) const {
|
||||
return functionNames_[i].name();
|
||||
}
|
||||
/*************************************************************************/
|
||||
|
||||
#if defined(MOZ_VTUNE) || defined(JS_ION_PERF)
|
||||
bool trackProfiledFunction(PropertyName *name, unsigned startCodeOffset, unsigned endCodeOffset,
|
||||
unsigned line, unsigned column)
|
||||
{
|
||||
ProfiledFunction func(name, startCodeOffset, endCodeOffset, line, column);
|
||||
return profiledFunctions_.append(func);
|
||||
}
|
||||
unsigned numProfiledFunctions() const {
|
||||
return profiledFunctions_.length();
|
||||
}
|
||||
ProfiledFunction &profiledFunction(unsigned i) {
|
||||
return profiledFunctions_[i];
|
||||
}
|
||||
#endif
|
||||
// finish() is called once the entire module has been parsed (via
|
||||
// tokenStream) and all function and entry/exit trampolines have been
|
||||
// generated (via masm). After this function, the module must still be
|
||||
// statically and dynamically linked before code can be run.
|
||||
bool finish(ExclusiveContext *cx,
|
||||
frontend::TokenStream &tokenStream,
|
||||
jit::MacroAssembler &masm,
|
||||
const jit::Label &interruptLabel);
|
||||
|
||||
#ifdef JS_ION_PERF
|
||||
bool trackPerfProfiledBlocks(PropertyName *name, unsigned startCodeOffset, unsigned endInlineCodeOffset,
|
||||
unsigned endCodeOffset, jit::BasicBlocksVector &basicBlocks) {
|
||||
ProfiledBlocksFunction func(name, startCodeOffset, endInlineCodeOffset, endCodeOffset, basicBlocks);
|
||||
return perfProfiledBlocksFunctions_.append(mozilla::Move(func));
|
||||
}
|
||||
unsigned numPerfBlocksFunctions() const {
|
||||
return perfProfiledBlocksFunctions_.length();
|
||||
}
|
||||
ProfiledBlocksFunction &perfProfiledBlocksFunction(unsigned i) {
|
||||
return perfProfiledBlocksFunctions_[i];
|
||||
}
|
||||
#endif
|
||||
/*************************************************************************/
|
||||
// These accessor functions can be used after finish():
|
||||
|
||||
bool hasArrayView() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return pod.hasArrayView_;
|
||||
}
|
||||
unsigned numFFIs() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return pod.numFFIs_;
|
||||
}
|
||||
unsigned numGlobalVars() const {
|
||||
return pod.numGlobalVars_;
|
||||
uint32_t funcEndBeforeCurly() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return funcStart_ + pod.funcLength_;
|
||||
}
|
||||
unsigned numGlobals() const {
|
||||
return globals_.length();
|
||||
uint32_t funcEndAfterCurly() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return funcStart_ + pod.funcLengthWithRightBrace_;
|
||||
}
|
||||
Global &global(unsigned i) {
|
||||
return globals_[i];
|
||||
uint8_t *codeBase() const {
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(uintptr_t(code_) % AsmJSPageSize == 0);
|
||||
return code_;
|
||||
}
|
||||
unsigned numExits() const {
|
||||
return exits_.length();
|
||||
size_t functionBytes() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return pod.functionBytes_;
|
||||
}
|
||||
Exit &exit(unsigned i) {
|
||||
return exits_[i];
|
||||
size_t codeBytes() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return pod.codeBytes_;
|
||||
}
|
||||
const Exit &exit(unsigned i) const {
|
||||
return exits_[i];
|
||||
bool containsPC(void *pc) const {
|
||||
JS_ASSERT(isFinished());
|
||||
return pc >= code_ && pc < (code_ + functionBytes());
|
||||
}
|
||||
uint8_t *interpExitTrampoline(const Exit &exit) const {
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(exit.interpCodeOffset_);
|
||||
return code_ + exit.interpCodeOffset_;
|
||||
}
|
||||
uint8_t *ionExitTrampoline(const Exit &exit) const {
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(exit.ionCodeOffset_);
|
||||
return code_ + exit.ionCodeOffset_;
|
||||
}
|
||||
unsigned numFunctionCounts() const {
|
||||
return functionCounts_.length();
|
||||
}
|
||||
jit::IonScriptCounts *functionCounts(unsigned i) {
|
||||
return functionCounts_[i];
|
||||
}
|
||||
|
||||
// An Exit holds bookkeeping information about an exit; the ExitDatum
|
||||
// struct overlays the actual runtime data stored in the global data
|
||||
// section.
|
||||
struct ExitDatum
|
||||
{
|
||||
uint8_t *exit;
|
||||
HeapPtrFunction fun;
|
||||
};
|
||||
// Lookup a callsite by the return pc (from the callee to the caller).
|
||||
// Return null if no callsite was found.
|
||||
const jit::CallSite *lookupCallSite(uint8_t *returnAddress) const;
|
||||
|
||||
// Lookup a heap access site by the pc which performs the access. Return
|
||||
// null if no heap access was found.
|
||||
const jit::AsmJSHeapAccess *lookupHeapAccess(uint8_t *pc) const;
|
||||
|
||||
// Global data section
|
||||
//
|
||||
// The global data section is placed after the executable code (i.e., at
|
||||
// offset codeBytes_) in the module's linear allocation. The global data
|
||||
// are laid out in this order:
|
||||
|
@ -767,10 +861,11 @@ class AsmJSModule
|
|||
// while type checking function bodies (as exits and uses of
|
||||
// function-pointer tables are encountered).
|
||||
size_t offsetOfGlobalData() const {
|
||||
JS_ASSERT(code_);
|
||||
JS_ASSERT(isFinished());
|
||||
return pod.codeBytes_;
|
||||
}
|
||||
uint8_t *globalData() const {
|
||||
JS_ASSERT(isFinished());
|
||||
return code_ + offsetOfGlobalData();
|
||||
}
|
||||
size_t globalDataBytes() const {
|
||||
|
@ -778,168 +873,108 @@ class AsmJSModule
|
|||
pod.numGlobalVars_ * sizeof(uint64_t) +
|
||||
pod.funcPtrTableAndExitBytes_;
|
||||
}
|
||||
unsigned heapOffset() const {
|
||||
static unsigned heapGlobalDataOffset() {
|
||||
return 0;
|
||||
}
|
||||
uint8_t *&heapDatum() const {
|
||||
return *(uint8_t**)(globalData() + heapOffset());
|
||||
JS_ASSERT(isFinished());
|
||||
return *(uint8_t**)(globalData() + heapGlobalDataOffset());
|
||||
}
|
||||
unsigned globalVarIndexToGlobalDataOffset(unsigned i) const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
JS_ASSERT(i < pod.numGlobalVars_);
|
||||
return sizeof(uint64_t) +
|
||||
i * sizeof(uint64_t);
|
||||
}
|
||||
void *globalVarIndexToGlobalDatum(unsigned i) const {
|
||||
JS_ASSERT(isFinished());
|
||||
return (void *)(globalData() + globalVarIndexToGlobalDataOffset(i));
|
||||
}
|
||||
uint8_t **globalDataOffsetToFuncPtrTable(unsigned globalDataOffset) const {
|
||||
JS_ASSERT(isFinished());
|
||||
JS_ASSERT(globalDataOffset < globalDataBytes());
|
||||
return (uint8_t **)(globalData() + globalDataOffset);
|
||||
}
|
||||
unsigned exitIndexToGlobalDataOffset(unsigned exitIndex) const {
|
||||
JS_ASSERT(isFinishedWithModulePrologue());
|
||||
return exits_[exitIndex].globalDataOffset();
|
||||
}
|
||||
ExitDatum &exitIndexToGlobalDatum(unsigned exitIndex) const {
|
||||
JS_ASSERT(isFinished());
|
||||
return *(ExitDatum *)(globalData() + exitIndexToGlobalDataOffset(exitIndex));
|
||||
}
|
||||
|
||||
void initFunctionBytes(size_t functionBytes) {
|
||||
JS_ASSERT(pod.functionBytes_ == 0);
|
||||
JS_ASSERT(functionBytes % AsmJSPageSize == 0);
|
||||
pod.functionBytes_ = functionBytes;
|
||||
}
|
||||
size_t functionBytes() const {
|
||||
JS_ASSERT(pod.functionBytes_);
|
||||
JS_ASSERT(pod.functionBytes_ % AsmJSPageSize == 0);
|
||||
return pod.functionBytes_;
|
||||
}
|
||||
bool containsPC(void *pc) const {
|
||||
return pc >= code_ && pc < (code_ + functionBytes());
|
||||
}
|
||||
|
||||
void assignHeapAccesses(jit::AsmJSHeapAccessVector &&accesses) {
|
||||
heapAccesses_ = Move(accesses);
|
||||
}
|
||||
unsigned numHeapAccesses() const {
|
||||
return heapAccesses_.length();
|
||||
}
|
||||
const jit::AsmJSHeapAccess &heapAccess(unsigned i) const {
|
||||
return heapAccesses_[i];
|
||||
}
|
||||
jit::AsmJSHeapAccess &heapAccess(unsigned i) {
|
||||
return heapAccesses_[i];
|
||||
}
|
||||
|
||||
void assignCallSites(jit::CallSiteVector &&callsites) {
|
||||
callSites_ = Move(callsites);
|
||||
}
|
||||
unsigned numCallSites() const {
|
||||
return callSites_.length();
|
||||
}
|
||||
const jit::CallSite &callSite(unsigned i) const {
|
||||
return callSites_[i];
|
||||
}
|
||||
jit::CallSite &callSite(unsigned i) {
|
||||
return callSites_[i];
|
||||
}
|
||||
|
||||
void initHeap(Handle<ArrayBufferObject*> heap, JSContext *cx);
|
||||
|
||||
void requireHeapLengthToBeAtLeast(uint32_t len) {
|
||||
if (len > pod.minHeapLength_)
|
||||
pod.minHeapLength_ = len;
|
||||
}
|
||||
uint32_t minHeapLength() const {
|
||||
return pod.minHeapLength_;
|
||||
}
|
||||
|
||||
bool allocateAndCopyCode(ExclusiveContext *cx, jit::MacroAssembler &masm);
|
||||
|
||||
// StaticLinkData setters (called after finishing compilation, before
|
||||
// staticLink).
|
||||
bool addRelativeLink(RelativeLink link) {
|
||||
return staticLinkData_.relativeLinks.append(link);
|
||||
}
|
||||
bool addAbsoluteLink(AbsoluteLink link) {
|
||||
return staticLinkData_.absoluteLinks.append(link);
|
||||
}
|
||||
void setInterruptOffset(uint32_t offset) {
|
||||
staticLinkData_.interruptExitOffset = offset;
|
||||
}
|
||||
|
||||
void restoreToInitialState(ArrayBufferObject *maybePrevBuffer, ExclusiveContext *cx);
|
||||
void setAutoFlushICacheRange();
|
||||
void staticallyLink(ExclusiveContext *cx);
|
||||
|
||||
uint8_t *codeBase() const {
|
||||
JS_ASSERT(code_);
|
||||
JS_ASSERT(uintptr_t(code_) % AsmJSPageSize == 0);
|
||||
return code_;
|
||||
}
|
||||
|
||||
uint8_t *interruptExit() const {
|
||||
return interruptExit_;
|
||||
}
|
||||
|
||||
void setIsDynamicallyLinked() {
|
||||
JS_ASSERT(!dynamicallyLinked_);
|
||||
dynamicallyLinked_ = true;
|
||||
}
|
||||
bool isDynamicallyLinked() const {
|
||||
return dynamicallyLinked_;
|
||||
}
|
||||
uint8_t *maybeHeap() const {
|
||||
JS_ASSERT(dynamicallyLinked_);
|
||||
return heapDatum();
|
||||
}
|
||||
ArrayBufferObject *maybeHeapBufferObject() const {
|
||||
JS_ASSERT(dynamicallyLinked_);
|
||||
return maybeHeap_;
|
||||
}
|
||||
size_t heapLength() const {
|
||||
JS_ASSERT(dynamicallyLinked_);
|
||||
return maybeHeap_ ? maybeHeap_->byteLength() : 0;
|
||||
}
|
||||
|
||||
void initGlobalArgumentName(PropertyName *n) {
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
globalArgumentName_ = n;
|
||||
}
|
||||
void initImportArgumentName(PropertyName *n) {
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
importArgumentName_ = n;
|
||||
}
|
||||
void initBufferArgumentName(PropertyName *n) {
|
||||
JS_ASSERT_IF(n, n->isTenured());
|
||||
bufferArgumentName_ = n;
|
||||
}
|
||||
|
||||
PropertyName *globalArgumentName() const {
|
||||
return globalArgumentName_;
|
||||
}
|
||||
PropertyName *importArgumentName() const {
|
||||
return importArgumentName_;
|
||||
}
|
||||
PropertyName *bufferArgumentName() const {
|
||||
return bufferArgumentName_;
|
||||
}
|
||||
|
||||
void detachIonCompilation(size_t exitIndex) const {
|
||||
JS_ASSERT(isFinished());
|
||||
exitIndexToGlobalDatum(exitIndex).exit = interpExitTrampoline(exit(exitIndex));
|
||||
}
|
||||
|
||||
void addSizeOfMisc(mozilla::MallocSizeOf mallocSizeOf, size_t *asmJSModuleCode,
|
||||
size_t *asmJSModuleData);
|
||||
/*************************************************************************/
|
||||
// These functions are called after finish() but before staticallyLink():
|
||||
|
||||
bool addRelativeLink(RelativeLink link) {
|
||||
JS_ASSERT(isFinished() && !isStaticallyLinked());
|
||||
return staticLinkData_.relativeLinks.append(link);
|
||||
}
|
||||
|
||||
// A module is serialized after it is finished but before it is statically
|
||||
// linked. (Technically, it could be serialized after static linking, but it
|
||||
// would still need to be statically linked on deserialization.)
|
||||
size_t serializedSize() const;
|
||||
uint8_t *serialize(uint8_t *cursor) const;
|
||||
const uint8_t *deserialize(ExclusiveContext *cx, const uint8_t *cursor);
|
||||
bool loadedFromCache() const { return loadedFromCache_; }
|
||||
|
||||
// Additionally, this function is called to flush the i-cache after
|
||||
// deserialization and cloning (but still before static linking, to prevent
|
||||
// a bunch of expensive micro-flushes).
|
||||
void setAutoFlushICacheRange();
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
// After a module isFinished compiling or deserializing, it is "statically
|
||||
// linked" which specializes the code to its current address (this allows
|
||||
// code to be relocated between serialization and deserialization).
|
||||
void staticallyLink(ExclusiveContext *cx);
|
||||
|
||||
// After a module is statically linked, it is "dynamically linked" which
|
||||
// specializes it to a particular set of arguments. In particular, this
|
||||
// binds the code to a particular heap (via initHeap) and set of global
|
||||
// variables. A given asm.js module cannot be dynamically linked more than
|
||||
// once so, if JS tries, the module is cloned.
|
||||
void setIsDynamicallyLinked() {
|
||||
JS_ASSERT(!isDynamicallyLinked());
|
||||
dynamicallyLinked_ = true;
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
}
|
||||
void initHeap(Handle<ArrayBufferObject*> heap, JSContext *cx);
|
||||
bool clone(JSContext *cx, ScopedJSDeletePtr<AsmJSModule> *moduleOut) const;
|
||||
void restoreToInitialState(ArrayBufferObject *maybePrevBuffer, ExclusiveContext *cx);
|
||||
|
||||
// These methods may only be called while holding the Runtime's interrupt
|
||||
// lock.
|
||||
/*************************************************************************/
|
||||
// Functions that can be called after dynamic linking succeeds:
|
||||
|
||||
CodePtr entryTrampoline(const ExportedFunction &func) const {
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
return JS_DATA_TO_FUNC_PTR(CodePtr, code_ + func.pod.codeOffset_);
|
||||
}
|
||||
uint8_t *interruptExit() const {
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
return interruptExit_;
|
||||
}
|
||||
uint8_t *maybeHeap() const {
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
return heapDatum();
|
||||
}
|
||||
ArrayBufferObject *maybeHeapBufferObject() const {
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
return maybeHeap_;
|
||||
}
|
||||
size_t heapLength() const {
|
||||
JS_ASSERT(isDynamicallyLinked());
|
||||
return maybeHeap_ ? maybeHeap_->byteLength() : 0;
|
||||
}
|
||||
|
||||
// Additionally, these functions may only be called while holding the
|
||||
// runtime's interrupt lock.
|
||||
void protectCode(JSRuntime *rt) const;
|
||||
void unprotectCode(JSRuntime *rt) const;
|
||||
bool codeIsProtected(JSRuntime *rt) const;
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
|
||||
#include "jit/AsmJSSignalHandlers.h"
|
||||
|
||||
#include "mozilla/BinarySearch.h"
|
||||
|
||||
#include "assembler/assembler/MacroAssembler.h"
|
||||
#include "jit/AsmJSModule.h"
|
||||
|
||||
|
@ -213,31 +211,6 @@ SetXMMRegToNaN(bool isFloat32, T *xmm_reg)
|
|||
dbls[1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
struct GetHeapAccessOffset
|
||||
{
|
||||
const AsmJSModule &module;
|
||||
explicit GetHeapAccessOffset(const AsmJSModule &module) : module(module) {}
|
||||
uintptr_t operator[](size_t index) const {
|
||||
return module.heapAccess(index).offset();
|
||||
}
|
||||
};
|
||||
|
||||
// Perform a binary search on the projected offsets of the known heap accesses
|
||||
// in the module.
|
||||
static const AsmJSHeapAccess *
|
||||
LookupHeapAccess(const AsmJSModule &module, uint8_t *pc)
|
||||
{
|
||||
JS_ASSERT(module.containsPC(pc));
|
||||
|
||||
uintptr_t pcOff = pc - module.codeBase();
|
||||
|
||||
size_t match;
|
||||
if (!BinarySearch(GetHeapAccessOffset(module), 0, module.numHeapAccesses(), pcOff, &match))
|
||||
return nullptr;
|
||||
|
||||
return &module.heapAccess(match);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(XP_WIN)
|
||||
|
@ -507,7 +480,7 @@ HandleException(PEXCEPTION_POINTERS exception)
|
|||
return false;
|
||||
}
|
||||
|
||||
const AsmJSHeapAccess *heapAccess = LookupHeapAccess(module, pc);
|
||||
const AsmJSHeapAccess *heapAccess = module.lookupHeapAccess(pc);
|
||||
if (!heapAccess)
|
||||
return false;
|
||||
|
||||
|
@ -713,7 +686,7 @@ HandleMachException(JSRuntime *rt, const ExceptionRequest &request)
|
|||
return false;
|
||||
}
|
||||
|
||||
const AsmJSHeapAccess *heapAccess = LookupHeapAccess(module, pc);
|
||||
const AsmJSHeapAccess *heapAccess = module.lookupHeapAccess(pc);
|
||||
if (!heapAccess)
|
||||
return false;
|
||||
|
||||
|
@ -960,7 +933,7 @@ HandleSignal(int signum, siginfo_t *info, void *ctx)
|
|||
return false;
|
||||
}
|
||||
|
||||
const AsmJSHeapAccess *heapAccess = LookupHeapAccess(module, pc);
|
||||
const AsmJSHeapAccess *heapAccess = module.lookupHeapAccess(pc);
|
||||
if (!heapAccess)
|
||||
return false;
|
||||
|
||||
|
|