Compare commits

..

966 Commits

Author SHA1 Message Date
cltbld
931d8eedab "Automated configuration bump, release for firefox 3.0.19build1"
git-svn-id: svn://10.0.0.236/branches/release@259954 18797224-902f-48f8-a5cc-f745e15eee43
2010-03-13 02:02:11 +00:00
cltbld
2a1a9ff2df "Automated configuration bump, release for firefox 3.0.18build1"
git-svn-id: svn://10.0.0.236/branches/release@259581 18797224-902f-48f8-a5cc-f745e15eee43
2010-02-03 03:05:03 +00:00
cltbld
0543390bce "Automated configuration bump, release for xulrunner 1.9.0.17build1"
git-svn-id: svn://10.0.0.236/branches/release@259282 18797224-902f-48f8-a5cc-f745e15eee43
2009-12-22 12:05:55 +00:00
cltbld
034d214153 "Automated configuration bump, release for xulrunner 1.9.0.17build1"
git-svn-id: svn://10.0.0.236/branches/release@259281 18797224-902f-48f8-a5cc-f745e15eee43
2009-12-22 11:53:54 +00:00
cltbld
71605a6a9a "Automated configuration bump, release for xulrunner 1.9.0.17build1"
git-svn-id: svn://10.0.0.236/branches/release@259280 18797224-902f-48f8-a5cc-f745e15eee43
2009-12-22 11:47:31 +00:00
cltbld
961845c47e "Automated configuration bump, release for firefox 3.0.17build1"
git-svn-id: svn://10.0.0.236/branches/release@259275 18797224-902f-48f8-a5cc-f745e15eee43
2009-12-21 23:38:05 +00:00
cltbld
1c627c7812 "Automated configuration bump, release for xulrunner 1.9.0.16build2"
git-svn-id: svn://10.0.0.236/branches/release@259138 18797224-902f-48f8-a5cc-f745e15eee43
2009-12-01 23:04:56 +00:00
cltbld
7f17e27cf0 "Automated configuration bump, release for firefox 3.0.16build1"
git-svn-id: svn://10.0.0.236/branches/release@259107 18797224-902f-48f8-a5cc-f745e15eee43
2009-11-30 18:25:22 +00:00
cltbld
c17680a4e5 "Automated configuration bump, release for xulrunner 1.9.0.15build1"
git-svn-id: svn://10.0.0.236/branches/release@258626 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-07 17:47:36 +00:00
cltbld
9bf6ea3c31 "Automated configuration bump, release for firefox 3.0.15build1"
git-svn-id: svn://10.0.0.236/branches/release@258610 18797224-902f-48f8-a5cc-f745e15eee43
2009-10-06 18:00:29 +00:00
cltbld
801a8d9999 "Automated configuration bump, release for xulrunner 1.9.0.14build1"
git-svn-id: svn://10.0.0.236/branches/release@258235 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-25 22:13:30 +00:00
cltbld
1ce29d2ed0 "Automated configuration bump, release for xulrunner 1.9.0.14build1"
git-svn-id: svn://10.0.0.236/branches/release@258231 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-25 21:16:07 +00:00
cltbld
cf5e912905 "Automated configuration bump, release for xulrunner 1.9.0.14build1"
git-svn-id: svn://10.0.0.236/branches/release@258230 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-25 20:42:20 +00:00
cltbld
991f66a42c "Automated configuration bump, release for firefox 3.0.14build1"
git-svn-id: svn://10.0.0.236/branches/release@258212 18797224-902f-48f8-a5cc-f745e15eee43
2009-08-24 17:38:55 +00:00
cltbld
0b3425a639 "Automated configuration bump, release for xulrunner 1.9.0.13build1"
git-svn-id: svn://10.0.0.236/branches/release@257896 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-31 17:00:01 +00:00
cltbld
095ae364d7 "Automated configuration bump, release for xulrunner 1.9.0.13build1"
git-svn-id: svn://10.0.0.236/branches/release@257895 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-31 16:20:22 +00:00
cltbld
4ee5de5033 "Automated configuration bump, release for firefox 3.0.13build1"
git-svn-id: svn://10.0.0.236/branches/release@257891 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-31 04:22:44 +00:00
cltbld
ae9b838489 "Automated configuration bump, release for firefox 3.0.13build1"
git-svn-id: svn://10.0.0.236/branches/release@257890 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-31 04:14:38 +00:00
cltbld
188ea73fac "Automated configuration bump, release for xulrunner 1.9.0.12build1"
git-svn-id: svn://10.0.0.236/branches/release@257654 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-07 23:15:10 +00:00
cltbld
3ad6129780 "Automated configuration bump, release for firefox 3.0.12build1"
git-svn-id: svn://10.0.0.236/branches/release@257641 18797224-902f-48f8-a5cc-f745e15eee43
2009-07-06 16:57:15 +00:00
cltbld
d1565f139b "Automated configuration bump, release for xulrunner 1.9.0.11build2"
git-svn-id: svn://10.0.0.236/branches/release@257383 18797224-902f-48f8-a5cc-f745e15eee43
2009-06-03 20:20:54 +00:00
cltbld
cb97343418 "Automated configuration bump, release for firefox 3.0.11build1"
git-svn-id: svn://10.0.0.236/branches/release@257227 18797224-902f-48f8-a5cc-f745e15eee43
2009-05-19 15:33:49 +00:00
cltbld
cf34e1edd4 "Automated configuration bump, release for xulrunner 1.9.0.10build1"
git-svn-id: svn://10.0.0.236/branches/release@257170 18797224-902f-48f8-a5cc-f745e15eee43
2009-05-12 15:53:22 +00:00
cltbld
dfd8c7a9f9 "Automated configuration bump, release for firefox 3.0.10build1"
git-svn-id: svn://10.0.0.236/branches/release@257037 18797224-902f-48f8-a5cc-f745e15eee43
2009-04-23 22:42:57 +00:00
cltbld
d104ac4be2 "Automated configuration bump, release for firefox 3.0.10build1"
git-svn-id: svn://10.0.0.236/branches/release@257036 18797224-902f-48f8-a5cc-f745e15eee43
2009-04-23 22:36:24 +00:00
cltbld
6dece5a779 "Automated configuration bump, release for firefox 3.0.9build1"
git-svn-id: svn://10.0.0.236/branches/release@256823 18797224-902f-48f8-a5cc-f745e15eee43
2009-04-06 16:38:02 +00:00
cltbld
6334f72206 "Automated configuration bump, release for firefox 3.0.8build1"
git-svn-id: svn://10.0.0.236/branches/release@256697 18797224-902f-48f8-a5cc-f745e15eee43
2009-03-26 00:07:38 +00:00
cltbld
c308e60f30 "Automated configuration bump, release for firefox 3.0.8build1"
git-svn-id: svn://10.0.0.236/branches/release@256696 18797224-902f-48f8-a5cc-f745e15eee43
2009-03-26 00:00:43 +00:00
cltbld
d7b0531318 "Automated configuration bump, release for xulrunner 1.9.0.7build1"
git-svn-id: svn://10.0.0.236/branches/release@256531 18797224-902f-48f8-a5cc-f745e15eee43
2009-03-13 16:47:56 +00:00
cltbld
eeb4968977 "Automated configuration bump, release for firefox 3.0.7build1"
git-svn-id: svn://10.0.0.236/branches/release@256242 18797224-902f-48f8-a5cc-f745e15eee43
2009-02-17 18:23:00 +00:00
cltbld
d78a15e213 "Automated configuration bump, release for xulrunner 1.9.0.6build1"
git-svn-id: svn://10.0.0.236/branches/release@256093 18797224-902f-48f8-a5cc-f745e15eee43
2009-02-04 19:32:51 +00:00
cltbld
45d22db0fb "Automated configuration bump, release for firefox 3.0.6build1"
git-svn-id: svn://10.0.0.236/branches/release@255853 18797224-902f-48f8-a5cc-f745e15eee43
2009-01-19 20:12:39 +00:00
cltbld
6620cb4f52 "Automated configuration bump, release for firefox 3.0.6build1"
git-svn-id: svn://10.0.0.236/branches/release@255852 18797224-902f-48f8-a5cc-f745e15eee43
2009-01-19 20:07:23 +00:00
cltbld
93bf4cbbfe "Automated configuration bump, release for xulrunner 1.9.0.5build1"
git-svn-id: svn://10.0.0.236/branches/release@255642 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-26 13:53:37 +00:00
cltbld
a460954b54 "Automated configuration bump, release for firefox 3.0.5build1"
git-svn-id: svn://10.0.0.236/branches/release@255293 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-02 05:08:39 +00:00
cltbld
4b4a7b0a1c "Automated configuration bump, release for firefox 3.0.5build1"
git-svn-id: svn://10.0.0.236/branches/release@255292 18797224-902f-48f8-a5cc-f745e15eee43
2008-12-02 05:03:03 +00:00
cltbld
2045a62f5f "Automated configuration bump, release for xulrunner 1.9.0.4build1"
git-svn-id: svn://10.0.0.236/branches/release@255030 18797224-902f-48f8-a5cc-f745e15eee43
2008-11-13 20:28:50 +00:00
cltbld
dc69be5e0f "Automated configuration bump, release for xulrunner 1.9.0.4build1"
git-svn-id: svn://10.0.0.236/branches/release@255026 18797224-902f-48f8-a5cc-f745e15eee43
2008-11-13 18:37:45 +00:00
cltbld
8839bff2be "Automated configuration bump, release for firefox 3.0.4build1"
git-svn-id: svn://10.0.0.236/branches/release@254824 18797224-902f-48f8-a5cc-f745e15eee43
2008-10-30 03:22:46 +00:00
cltbld
7b8d870520 "Automated configuration bump, release for xulrunner 1.9.0.3build1"
git-svn-id: svn://10.0.0.236/branches/release@254438 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-26 04:38:52 +00:00
cltbld
bd80e8e97b "Automated configuration bump, release for xulrunner 1.9.0.3build1"
git-svn-id: svn://10.0.0.236/branches/release@254437 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-26 01:14:19 +00:00
cltbld
7b799934e7 "Automated configuration bump, release for firefox 3.0.3build1"
git-svn-id: svn://10.0.0.236/branches/release@254411 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-24 21:33:22 +00:00
cltbld
7b56b48f8b "Automated configuration bump, release for xulrunner 1.9.0.2build1"
git-svn-id: svn://10.0.0.236/branches/release@254386 18797224-902f-48f8-a5cc-f745e15eee43
2008-09-24 14:08:27 +00:00
cltbld
34ac30982e "Automated configuration bump, release for firefox 3.0.2build1"
git-svn-id: svn://10.0.0.236/branches/release@253878 18797224-902f-48f8-a5cc-f745e15eee43
2008-08-27 15:20:11 +00:00
nrthomas%gmail.com
fb63af635f Bug 445991, use Thunderbird.app on mac since not all the branding changes made the cutoff
git-svn-id: svn://10.0.0.236/branches/release@253324 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-29 04:58:25 +00:00
cltbld
9e6c560747 "Automated configuration bump, release for thunderbird 3.0a2build1"
git-svn-id: svn://10.0.0.236/branches/release@253267 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-25 01:26:22 +00:00
nrthomas%gmail.com
96fbdb013d Bug 445991, update release configs for branding changes, p=gozer, r=me
git-svn-id: svn://10.0.0.236/branches/release@253259 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-24 21:57:08 +00:00
nrthomas%gmail.com
0d8d580d24 Bug 441294, setup t'bird builds on release automation, r=bhearsum
git-svn-id: svn://10.0.0.236/branches/release@253258 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-24 21:20:34 +00:00
cltbld
6e2a9397d2 "Automated configuration bump, release for xulrunner 1.9.0.1build1"
git-svn-id: svn://10.0.0.236/branches/release@253234 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-24 13:14:52 +00:00
cltbld
efeae1d426 "Automated configuration bump, release for xulrunner 1.9.0.1build1"
git-svn-id: svn://10.0.0.236/branches/release@253233 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-24 13:08:58 +00:00
ted.mielczarek%gmail.com
bdedd3cda1 bug 444033 - drop throttled/enabled percentage of Windows client to 10% r=bhearsum
git-svn-id: svn://10.0.0.236/branches/release@252958 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-10 15:37:34 +00:00
cltbld
0915848efe "Automated configuration bump, release for firefox 3.0.1build1"
git-svn-id: svn://10.0.0.236/branches/release@252794 18797224-902f-48f8-a5cc-f745e15eee43
2008-07-02 13:19:56 +00:00
cltbld
8a14f98c41 "Automated configuration bump, release for xulrunner 1.9rc3build1"
git-svn-id: svn://10.0.0.236/branches/release@252226 18797224-902f-48f8-a5cc-f745e15eee43
2008-06-10 20:20:48 +00:00
mark.finkle%gmail.com
c991674af0 b=435460, r=nthomas. enable jemalloc on release branch
git-svn-id: svn://10.0.0.236/branches/release@252219 18797224-902f-48f8-a5cc-f745e15eee43
2008-06-10 14:34:58 +00:00
cltbld
b32f67bbcc "Automated configuration bump, release for firefox 3.0rc3build1"
git-svn-id: svn://10.0.0.236/branches/release@252213 18797224-902f-48f8-a5cc-f745e15eee43
2008-06-10 11:00:42 +00:00
nrthomas%gmail.com
7ffebcee9f Bug 435460, enable SDK and push the files correctly for XULrunner releases, r=bhearsum
git-svn-id: svn://10.0.0.236/branches/release@252079 18797224-902f-48f8-a5cc-f745e15eee43
2008-06-03 14:24:08 +00:00
nrthomas%gmail.com
51e14c93a9 Bug 435460, enable symbol generation and upload, with source server support, r=bhearsum & carrying over r=ted on the nightly config for source server
git-svn-id: svn://10.0.0.236/branches/release@251950 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-29 22:04:23 +00:00
cltbld
c5ef8c5224 "Automated configuration bump, release for xulrunner 1.9rc2build1"
git-svn-id: svn://10.0.0.236/branches/release@251948 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-29 21:58:55 +00:00
cltbld
95ea8913db "Automated configuration bump, release for xulrunner 1.9rc2build1"
git-svn-id: svn://10.0.0.236/branches/release@251947 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-29 21:53:31 +00:00
cltbld
e3cd6d1fc1 "Automated configuration bump, release for firefox 3.0rc2build1"
git-svn-id: svn://10.0.0.236/branches/release@251923 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-29 10:37:05 +00:00
cltbld
9c8381e790 "Automated configuration bump, release for firefox 3.0rc2build1"
git-svn-id: svn://10.0.0.236/branches/release@251921 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-29 10:22:47 +00:00
cltbld
f04cd31af4 "Automated configuration bump, release for firefox 3.0rc1build1"
git-svn-id: svn://10.0.0.236/branches/release@251543 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-12 09:43:29 +00:00
cltbld
2d24a33b99 "Automated configuration bump, release for thunderbird 3.0a1build1"
git-svn-id: svn://10.0.0.236/branches/release@251364 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-07 22:19:07 +00:00
cltbld
166e784f13 "Automated configuration bump, release for thunderbird 3.0a1build1"
git-svn-id: svn://10.0.0.236/branches/release@251361 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-07 21:51:06 +00:00
nrthomas%gmail.com
3fe9a4989d Bug 431788, followup to fix quoting
git-svn-id: svn://10.0.0.236/branches/release@251358 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-07 21:34:26 +00:00
cltbld
648068e289 "Automated configuration bump, release for thunderbird 3.0a1build1"
git-svn-id: svn://10.0.0.236/branches/release@251356 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-07 21:21:19 +00:00
nrthomas%gmail.com
5ff8ee481d Bug 431788, add configs on release branch for Tb3.0a1, r=bhearsum
git-svn-id: svn://10.0.0.236/branches/release@251338 18797224-902f-48f8-a5cc-f745e15eee43
2008-05-07 17:40:08 +00:00
nrthomas%gmail.com
63fa433d8e Bug 428074, change update channel to release for 3.0 RC builds, r=bhearsum
git-svn-id: svn://10.0.0.236/branches/release@251003 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-30 20:51:24 +00:00
(no author)
76c7e61a68 This commit was manufactured by cvs2svn to create branch 'release'.
git-svn-id: svn://10.0.0.236/branches/release@250880 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-28 18:04:07 +00:00
ted.mielczarek%gmail.com
862b59a69e bug 424240, bug 428615 - env vars for srcsrv support. patches by Lukas Blakk <lukasblakk@gmail.com>, r=me, a=beltzner, r=nthomas for landing on release branch
git-svn-id: svn://10.0.0.236/branches/release@250254 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-15 10:37:23 +00:00
cltbld
c522f79ece "Automated configuration bump, release for xulrunner 3.0b4rc1"
git-svn-id: svn://10.0.0.236/branches/release@250128 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-12 18:05:30 +00:00
cltbld
e592827a71 "Automated configuration bump, release for xulrunner 3.0b4rc1"
git-svn-id: svn://10.0.0.236/branches/release@250126 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-12 17:11:33 +00:00
cltbld
fe7436ebaf "Automated configuration bump, release for xulrunner 3.0b4rc1"
git-svn-id: svn://10.0.0.236/branches/release@250118 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-12 08:06:06 +00:00
cltbld
e1a7f7e17d "Automated configuration bump, release for xulrunner 3.0b4rc1"
git-svn-id: svn://10.0.0.236/branches/release@250098 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-11 22:45:51 +00:00
ted.mielczarek%gmail.com
3e048fdef2 bug 424960 - only enable crash reporting for X% of release builds--set enable percent to 25% on fx-win32-tbox. r=rhelmer
git-svn-id: svn://10.0.0.236/branches/release@249803 18797224-902f-48f8-a5cc-f745e15eee43
2008-04-08 14:54:02 +00:00
nrthomas%gmail.com
81cf65bb4a Bug 421012, global s/md5/sha1/ for update hash function (even for configs that don't use it)
git-svn-id: svn://10.0.0.236/branches/release@248902 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-31 19:35:14 +00:00
cltbld
561dfdcf56 "Automated configuration bump, release for firefox 3.0b5rc1"
git-svn-id: svn://10.0.0.236/branches/release@248589 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-26 11:52:47 +00:00
rhelmer%mozilla.com
671a47eab2 set JAVA_HOME explicitly b=415180 r=bsmedberg
git-svn-id: svn://10.0.0.236/branches/release@248013 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-17 19:35:11 +00:00
rhelmer%mozilla.com
46e82a1ece bustage fix, missing semicolon
git-svn-id: svn://10.0.0.236/branches/release@247216 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-06 19:15:33 +00:00
rhelmer%mozilla.com
84ecf071e1 create xulrunner release branch for use with release automation b=415180 r=nthomas
git-svn-id: svn://10.0.0.236/branches/release@247196 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-06 16:51:57 +00:00
cltbld
7e3a0bcda8 "Automated configuration bump, release for firefox 3.0b4rc1"
git-svn-id: svn://10.0.0.236/branches/release@246960 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-04 00:29:17 +00:00
nrthomas%gmail.com
faab209902 Bug 418926, config changes for PGO on releases, p=joduinn, r=me
git-svn-id: svn://10.0.0.236/branches/release@246953 18797224-902f-48f8-a5cc-f745e15eee43
2008-03-03 23:07:18 +00:00
rhelmer%mozilla.com
891d00f3cf take optimizations from nightlies, b=409880, r=nthomas
git-svn-id: svn://10.0.0.236/branches/release@244936 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-05 18:20:00 +00:00
cltbld
41c933f51e "Automated configuration bump, release for firefox 3.0b3rc1"
git-svn-id: svn://10.0.0.236/branches/release@244908 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-05 02:57:15 +00:00
cltbld
2aa37796fa "Automated configuration bump, release for firefox 3.0b3rc1"
git-svn-id: svn://10.0.0.236/branches/release@244906 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-05 02:41:51 +00:00
(no author)
f7ca841056 This commit was manufactured by cvs2svn to create branch 'release'.
git-svn-id: svn://10.0.0.236/branches/release@244825 18797224-902f-48f8-a5cc-f745e15eee43
2008-02-03 20:43:46 +00:00
rhelmer%mozilla.com
232773f5f4 set WIN32_REDIST_DIR as env var instead b=407988
git-svn-id: svn://10.0.0.236/branches/release@240897 18797224-902f-48f8-a5cc-f745e15eee43
2007-12-12 02:52:43 +00:00
rhelmer%mozilla.com
76874b45d1 set WIN32_REDIST_DIR in mozconfig b=407988 r=mconnor
git-svn-id: svn://10.0.0.236/branches/release@240885 18797224-902f-48f8-a5cc-f745e15eee43
2007-12-12 01:08:07 +00:00
cltbld
c56f7bb4fb "Automated configuration bump, release for firefox 3.0b2rc1"
git-svn-id: svn://10.0.0.236/branches/release@240749 18797224-902f-48f8-a5cc-f745e15eee43
2007-12-10 20:37:25 +00:00
bhearsum%mozilla.com
8a6ccb43c2 bug 406016: add symbol server config variables to 'release' tinder-config.pl's. r=cf patch=me
git-svn-id: svn://10.0.0.236/branches/release@240119 18797224-902f-48f8-a5cc-f745e15eee43
2007-11-29 18:06:33 +00:00
nrthomas%gmail.com
19f1281ca6 Bug 401741, release build configs for 3.0b1, r=coop
git-svn-id: svn://10.0.0.236/branches/release@238601 18797224-902f-48f8-a5cc-f745e15eee43
2007-11-06 22:32:58 +00:00
nrthomas%gmail.com
b0ea7ee81e Bug 402724, sync en-US nightly, en-US releases & l10n nightly configs for easier diffing (Firefox Trunk only), r=coop
git-svn-id: svn://10.0.0.236/branches/release@238589 18797224-902f-48f8-a5cc-f745e15eee43
2007-11-06 18:06:36 +00:00
bhearsum%mozilla.com
d7084ee4fd bug 402541: add CONFIG lines to tinder-config.pl's on release tag. r=cf, patch=me
git-svn-id: svn://10.0.0.236/branches/release@238538 18797224-902f-48f8-a5cc-f745e15eee43
2007-11-05 16:30:10 +00:00
preed%mozilla.com
6893804145 Point the release tinder configs at the new (MozillaBuild) location of blat.
git-svn-id: svn://10.0.0.236/branches/release@235921 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-12 21:05:24 +00:00
cltbld
2b283f97a6 Bug 394037, tinderbox config bumps for gecko 1.9a8, me=joduinn
git-svn-id: svn://10.0.0.236/branches/release@235533 18797224-902f-48f8-a5cc-f745e15eee43
2007-09-12 08:36:48 +00:00
rhelmer%mozilla.com
3a2ac33def make buildtree configurable by bootstrap b=391968 r=cf
git-svn-id: svn://10.0.0.236/branches/release@232425 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-21 00:22:10 +00:00
nrthomas%gmail.com
dc6eef1493 Bug 390514, tinderbox config bumps for gecko 1.9a7, plus pull in the mozconfig trimming already in nightly builds from bug 387181, and fix up the comment headers, r=coop
git-svn-id: svn://10.0.0.236/branches/release@231311 18797224-902f-48f8-a5cc-f745e15eee43
2007-08-02 15:28:02 +00:00
nrthomas%gmail.com
bec02b88eb Bug 386114, changes for 1.9a6 from libxul landing, r=mconnor
git-svn-id: svn://10.0.0.236/branches/release@229006 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-29 15:09:48 +00:00
nrthomas%gmail.com
4091110aaf Bug 386114, update linux mozconfig for 1.9a6 & tinderbox change, p=rhelmer, r=cf
git-svn-id: svn://10.0.0.236/branches/release@229000 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-29 13:34:54 +00:00
nrthomas%gmail.com
a2f8f6afa8 Bug 386114, push Breakpad symbols on Linux for 1.9a6, r=luser
git-svn-id: svn://10.0.0.236/branches/release@228998 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-29 11:35:23 +00:00
rhelmer%mozilla.com
a00b159b55 Bug 386114: Tinderconfig bumps for the 1.9a6 release. patch=joduinn, r=rhelmer.
git-svn-id: svn://10.0.0.236/branches/release@228912 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-28 00:47:48 +00:00
ccooper%deadsquid.com
4ca79d331e b=373373
-set MofoRoot


git-svn-id: svn://10.0.0.236/branches/release@228845 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-27 15:26:13 +00:00
preed%mozilla.com
3ffbe5b70c Bug 382873: Tinderconfig bumps for the 1.9a5 release. patch=joduinn, r=preed.
git-svn-id: svn://10.0.0.236/branches/release@227387 18797224-902f-48f8-a5cc-f745e15eee43
2007-06-01 22:31:55 +00:00
nrthomas%gmail.com
01bac7c6a0 Enable pushing Breakpad symbols to server on release builds, b=378905, r=preed
git-svn-id: svn://10.0.0.236/branches/release@225521 18797224-902f-48f8-a5cc-f745e15eee43
2007-05-03 10:11:36 +00:00
rhelmer%mozilla.com
730d946722 config changes for gecko1.9a4 b=378905 r=cf
git-svn-id: svn://10.0.0.236/branches/release@225105 18797224-902f-48f8-a5cc-f745e15eee43
2007-04-26 20:07:04 +00:00
preed%mozilla.com
a2d0a7429a For the 1.9a3 release, make sure all the mozconfigs have -j1, bump tag and milestone, and add tinder-config options to build the breakbag symbols, but NOT push them up (yet).
git-svn-id: svn://10.0.0.236/branches/release@222228 18797224-902f-48f8-a5cc-f745e15eee43
2007-03-23 03:14:00 +00:00
rhelmer%mozilla.com
01092a0067 add appv/extv r=preed
git-svn-id: svn://10.0.0.236/branches/release@219626 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 01:59:15 +00:00
rhelmer%mozilla.com
589c20624d fix comments r=preed b=369554
git-svn-id: svn://10.0.0.236/branches/release@219622 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-07 00:52:45 +00:00
rhelmer%mozilla.com
42f2431f28 checking in configs so builds can get started, b=369554 r=rhelmer
git-svn-id: svn://10.0.0.236/branches/release@219615 18797224-902f-48f8-a5cc-f745e15eee43
2007-02-06 23:54:47 +00:00
rhelmer%mozilla.com
771c30f1e3 disable non-alive tests on release branch b=362418 r=preed
git-svn-id: svn://10.0.0.236/branches/release@216432 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-04 20:03:17 +00:00
rhelmer%mozilla.com
e62ffa43cc disable update packaging for gecko 1.9a1 r=preed b=362418
git-svn-id: svn://10.0.0.236/branches/release@216272 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 18:50:28 +00:00
rhelmer%mozilla.com
0b87c1db22 remove unsupported optimizations r=vlad
git-svn-id: svn://10.0.0.236/branches/release@216214 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 04:27:03 +00:00
rhelmer%mozilla.com
da00a15686 use different code name for Mac r=preed b=362418
git-svn-id: svn://10.0.0.236/branches/release@216213 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 04:11:29 +00:00
rhelmer%mozilla.com
9628510565 time stamps should not be used for release builds b=362418 r=preed
git-svn-id: svn://10.0.0.236/branches/release@216212 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 03:50:24 +00:00
(no author)
65863d47ac This commit was manufactured by cvs2svn to create branch 'release'.
git-svn-id: svn://10.0.0.236/branches/release@216204 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 02:21:24 +00:00
rhelmer%mozilla.com
56c88ed433 config changes for gecko 1.9a1 r=preed r=vlad b=362418
git-svn-id: svn://10.0.0.236/trunk@216203 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 02:21:23 +00:00
jst%mozilla.org
feb9bb7fd3 Fixing bug 357651. Make sure the cached window.document property outlives document.open(). r+sr=bzbarsky@mit.edu, a=pavlov@mozilla.com
git-svn-id: svn://10.0.0.236/trunk@216201 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 01:17:15 +00:00
alexei.volkov.bugs%sun.com
85f93c516b 343231: certutil issues certs for invalid requests. r=nelson
git-svn-id: svn://10.0.0.236/trunk@216200 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 01:10:03 +00:00
wtchang%redhat.com
428c8e735c Bugzilla Bug 354593: checked in minor changes suggested by Nelson. r=nelson
git-svn-id: svn://10.0.0.236/trunk@216194 18797224-902f-48f8-a5cc-f745e15eee43
2006-12-01 00:26:35 +00:00
mattwillis%gmail.com
b03cd4b022 bug 361216 - typo fix
git-svn-id: svn://10.0.0.236/trunk@216190 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 22:49:33 +00:00
ghendricks%novell.com
f7d473cb54 Tag url's are too long. Use search terms instead.
git-svn-id: svn://10.0.0.236/trunk@216186 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 22:10:12 +00:00
mattwillis%gmail.com
6cb9d3a11b bug 361216 - Moves all New Event/Task strings into separate dtd file. Patch by Cédric Corazza <cedric.corazza@wanadoo.fr>, r=jminta
git-svn-id: svn://10.0.0.236/trunk@216185 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 22:07:15 +00:00
mattwillis%gmail.com
a68b712743 bug 361216 - Moves all New Event/Task strings into separate dtd file. Patch by Cédric Corazza <cedric.corazza@wanadoo.fr>, r=jminta
git-svn-id: svn://10.0.0.236/trunk@216183 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 22:03:37 +00:00
mrbkap%gmail.com
212c172527 Give the psuedo frame a scopeChain. bug 361571, r=brendan a=dveditz
git-svn-id: svn://10.0.0.236/trunk@216182 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:54:39 +00:00
mconnor%steelgryphon.com
026ede7768 replace Bon Echo about.png with generic unlabeled about.png, a=vlad
git-svn-id: svn://10.0.0.236/trunk@216181 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:44:40 +00:00
mrbkap%gmail.com
84a226dd66 Make argv as large as GC expects it to be. bug 361964, r=brendan
git-svn-id: svn://10.0.0.236/trunk@216180 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:43:57 +00:00
mattwillis%gmail.com
8f037d7496 bug 333688 - Converts STRING and VARCHAR columns to TEXT to avoid SQLite's auto-conversion of strings to numbers (10e4 to 10000) r=ctalbert,jminta
git-svn-id: svn://10.0.0.236/trunk@216179 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:40:44 +00:00
scott%scott-macgregor.org
170b5495b1 Bug #362385 --> fix type in phishingDetector intro text. Thanks to Ricardo Palomares for the patch.
git-svn-id: svn://10.0.0.236/trunk@216177 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:39:25 +00:00
scott%scott-macgregor.org
b58b476d1e remove wiindows line ending
git-svn-id: svn://10.0.0.236/trunk@216176 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:37:40 +00:00
despotdaemon
821170a62c Pseudo-automatic update of changes made by crowder@fiverocks.com.
git-svn-id: svn://10.0.0.236/trunk@216174 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:33:48 +00:00
smontagu%smontagu.org
f708518e84 Bug 361778: Firefox not rendering Malayalam. r=pavlov, a=stuart on IRC
git-svn-id: svn://10.0.0.236/trunk@216173 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:25:41 +00:00
ghendricks%novell.com
5411a53f83 Add components to multiple cases at once.
git-svn-id: svn://10.0.0.236/trunk@216172 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:23:44 +00:00
wtchang%redhat.com
7e47d9e409 Bugzilla Bug 354593: fixed a race condition in the creation of the lock
that protects localtime() by creating the lock during NSPR initialization.
r=aleksey.sanin,nelson.bolyard.  The patch is contributed by Mark Stevans
<marks@coral8.com>.
Modified files: primpl.h prinit.c prtime.c ptthread.c


git-svn-id: svn://10.0.0.236/trunk@216170 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 21:22:55 +00:00
despotdaemon
789af32cdf Pseudo-automatic update of changes made by knous@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@216169 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 20:58:10 +00:00
cvshook%sicking.cc
5c446ec16a properly initialize the result recycler when evaluating xslt PI params. r/sr=peterv b=362297 a=stuart
git-svn-id: svn://10.0.0.236/trunk@216167 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 19:33:29 +00:00
scott%scott-macgregor.org
c2a92b1212 Bug #362138 --> add strings for closing a tab before the l10n freeze. Thanks to Marek Stepien for catching the typo
git-svn-id: svn://10.0.0.236/trunk@216164 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 18:43:31 +00:00
benjamin%smedbergs.us
6f439c292f Second try, get libxul working with CUPS, NPODB
git-svn-id: svn://10.0.0.236/trunk@216163 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 18:43:25 +00:00
pavlov%pavlov.net
422525ec88 attempt to fix bustage
git-svn-id: svn://10.0.0.236/trunk@216161 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 18:27:27 +00:00
benjamin%smedbergs.us
650c0b871d Bug 362264 - Cross-platform Tamarin build system (early initial cut, only builds on mac-x86 right now), a=stejohns
git-svn-id: svn://10.0.0.236/trunk@216159 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 16:43:12 +00:00
benjamin%smedbergs.us
5e2e4ba442 Fix libxul bustage from bug 359124, NPODB
git-svn-id: svn://10.0.0.236/trunk@216158 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 16:42:23 +00:00
bzbarsky%mit.edu
cf9ad9872f Adding test for bug 361933
git-svn-id: svn://10.0.0.236/trunk@216146 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 06:39:47 +00:00
joshmoz%gmail.com
03ac088b9e fix submenus in context menus on mac os x. b=350165 r=smorgan sr=pav
git-svn-id: svn://10.0.0.236/trunk@216145 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 05:39:40 +00:00
scott%scott-macgregor.org
e325740439 Bug #328749 --> add strings for the improved phishing detector APIs. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@216144 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 05:28:32 +00:00
scott%scott-macgregor.org
f1ce183a98 add vista integration string before the l10n freeze
git-svn-id: svn://10.0.0.236/trunk@216142 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 04:58:10 +00:00
dveditz%cruzio.com
99da3d9a95 Sync executable extension list w/Outlook (bug 348763) r/sr=dougt, a=pavlov
git-svn-id: svn://10.0.0.236/trunk@216141 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 04:36:21 +00:00
mattwillis%gmail.com
39d018b589 bug 362000 - Makes AUS/Prefwindow &brandShortName localizable. r=jminta
git-svn-id: svn://10.0.0.236/trunk@216140 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 03:51:00 +00:00
pavlov%pavlov.net
7f2a9d3f9d fixing linux printing bustage
git-svn-id: svn://10.0.0.236/trunk@216137 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 02:12:03 +00:00
pavlov%pavlov.net
db587c788a don't implement nsIPrintingContext in cairo builds
git-svn-id: svn://10.0.0.236/trunk@216134 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 01:57:15 +00:00
wtchang%redhat.com
a0402341f1 Bugzilla Bug 355999: fix up for kfreebsd support. The patch is contributed
by Petr.Salinger@seznam.cz. r=wtc
Modified files: _linux.cfg _linux.h


git-svn-id: svn://10.0.0.236/trunk@216132 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 01:11:46 +00:00
wtchang%redhat.com
52dc80a8b2 Bugzilla Bug 353729: handle PR_vsmprintf failure in PR_vfprintf. r=timeless
git-svn-id: svn://10.0.0.236/trunk@216130 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 00:39:19 +00:00
wtchang%redhat.com
a5700b389e Bugzilla Bug 358785: fixed incorrect x509PolicyConstraints OID and typos in
a comment. r=relyea


git-svn-id: svn://10.0.0.236/trunk@216127 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 00:27:28 +00:00
wtchang%redhat.com
4ba9d7602c Bugzilla Bug 361089: fixed memory leaks in mp_bdivmod. r=douglas.stebila
git-svn-id: svn://10.0.0.236/trunk@216126 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 00:21:04 +00:00
cvshook%sicking.cc
d27a789c4f Bug 359888: Don't return NS_CONTENT_SCRIPT_IS_EVENTHANDLER to the sink/parser since they can't deal. r/sr=jst a=stuart
git-svn-id: svn://10.0.0.236/trunk@216124 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 00:06:00 +00:00
pavlov%pavlov.net
b838269a01 missed file
git-svn-id: svn://10.0.0.236/trunk@216122 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-30 00:04:33 +00:00
pavlov%pavlov.net
b0e82d440c printing on linux bug 323928. r=vlad
git-svn-id: svn://10.0.0.236/trunk@216121 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:40:16 +00:00
preed%mozilla.com
13ba9b9140 Bug 360034: Update Nagios monitoring for 1.5.0.8pre bump.
git-svn-id: svn://10.0.0.236/trunk@216120 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:34:54 +00:00
cvshook%sicking.cc
a326e22147 Bug 328468: Back out bug 323098 to fix mutations of xbl content. r/sr=bz
git-svn-id: svn://10.0.0.236/trunk@216118 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:17:53 +00:00
mnyromyr%tprac.de
9b4d6a8066 Bug 329018: Disable "Global Inbox" by default; p=Manuel Reimer <Manuel.Spam@nurfuerspam.de>, r=me, sr=neil/bienvenu
git-svn-id: svn://10.0.0.236/trunk@216117 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:13:50 +00:00
roc+%cs.cmu.edu
6b01227e23 Bug 324963. Keep a list of active popups to help us dispatch mouse events to them ... moving handling of 'always on top' popups towards a view-less world. r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@216116 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:09:13 +00:00
joshmoz%gmail.com
77ae840b24 crashes clicking on menubar while popup displayed (OS X 10.3 only) [@ FadeMenuWindows]. cocoa widgets fix. b=351230 r=mento
git-svn-id: svn://10.0.0.236/trunk@216115 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 23:06:11 +00:00
scott%scott-macgregor.org
22a223af3f Bug #362138 --> add strings for supporting message tabs before the l10n deadline. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@216112 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 22:26:11 +00:00
bzbarsky%mit.edu
48639c6889 Use DrawImage instaed of DrawTile when drawing a background and the entire
rect to be painted fits inside a single tile (either because we're no-repeat or
because the dirty rect is small enough).  Bug 359392, r=vlad, sr=roc, a=vlad
for 1.9a1 landing.


git-svn-id: svn://10.0.0.236/trunk@216109 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 21:58:13 +00:00
bugzilla%standard8.demon.co.uk
7c2cdb3c81 Backout all changes from bug 360777 due to Win32 bustage.
git-svn-id: svn://10.0.0.236/trunk@216106 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 21:12:49 +00:00
bienvenu%nventure.com
3e7c78d02e fix 362213 crash in MimeExternalBody_parse_eof, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@216105 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 21:00:59 +00:00
mvl%exedo.nl
867a062bf9 branch only bustage fix for bug 330371
git-svn-id: svn://10.0.0.236/trunk@216102 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 20:53:49 +00:00
bugzilla%standard8.demon.co.uk
d6c180e4c5 Possible Win/SeaMonkey bustage fix from bug 360777, backout some of the changes.
git-svn-id: svn://10.0.0.236/trunk@216098 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 20:37:59 +00:00
mvl%exedo.nl
9d683d3d39 bug 330371: add and implement calIPeriod. r=daniel boelzle
git-svn-id: svn://10.0.0.236/trunk@216095 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 20:35:12 +00:00
roc+%cs.cmu.edu
c90a54b7b1 Bug 322345. Cap maximum ft2 font size at 1000 pixels to avoid killing freetype2 and/or the X server. r=vlad
git-svn-id: svn://10.0.0.236/trunk@216092 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 20:19:35 +00:00
roc+%cs.cmu.edu
05cb2de3c2 Bug 357736. Use document widget for windowless plugin's reference widget whenever we can do that safely (the origin of the windowless plugin's nearest widget is equal to the origin of the document widget). Works around a regression in some cases. patch by Graham Sanderson, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@216091 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 20:15:56 +00:00
joshmoz%gmail.com
1e5cc522c0 Context menu in download manager is busted on Mac OS X. b=361240 r=enn r=mconnor
git-svn-id: svn://10.0.0.236/trunk@216082 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 19:30:34 +00:00
benjamin%smedbergs.us
d65ae5f520 Bug 362254 - Assining NULL to an integer type breaks some GCCs, r=stejohns
git-svn-id: svn://10.0.0.236/trunk@216080 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 19:18:36 +00:00
mozilla%justcameron.com
1231703cfb Bug 362060 - Rustico style change broke install.js, severely for themes (Download error -228)
Attachment 246947
p=Giorgio Maone (g.maone at informaction dot com)
r=Shaver
Actually tested this time :o


git-svn-id: svn://10.0.0.236/trunk@216077 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 18:13:57 +00:00
lpsolit%gmail.com
354a408da5 Bug 276497: Add link to Ravenbrook bugzilla-schema generator - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave
git-svn-id: svn://10.0.0.236/trunk@216075 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 18:00:53 +00:00
ccooper%deadsquid.com
3d6d3bc847 -removing access control file
git-svn-id: svn://10.0.0.236/trunk@216074 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 17:27:50 +00:00
ccooper%deadsquid.com
4c82109e92 - add access control
git-svn-id: svn://10.0.0.236/trunk@216073 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 17:27:04 +00:00
ccooper%deadsquid.com
8902a3fd99 - moving migration-related scripts to generic migration directory
git-svn-id: svn://10.0.0.236/trunk@216072 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 17:24:48 +00:00
igor.bukanov%gmail.com
f8f9a60d24 Bug 362180: optimizing slot access in JS_NewPropertyIterator.
git-svn-id: svn://10.0.0.236/trunk@216071 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 17:16:55 +00:00
bugzilla%standard8.demon.co.uk
04f43a2c90 Bug 360777 Change nsIAbCard::EditCardToDatabase to nsIAbDirectory::ModifyCard. r=bienvenu,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@216070 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 17:10:41 +00:00
mozilla.mano%sent.com
4818861e70 Replace monitor image (set desktop background dialog) in Pinstripe. Image from Kevin Gerich <kevin@kmgerich.com> on bug 296583, ui-r=mconnor.
git-svn-id: svn://10.0.0.236/trunk@216069 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:51:31 +00:00
mozilla%justcameron.com
c184c80a33 Bug 362060 - Rustico style change broke install.js, severely for themes (Download error -228)
Line 33, eEvent -> aEvent
No patch in bugzilla.. isn't there some law against this?
a=shaver so no problem :D


git-svn-id: svn://10.0.0.236/trunk@216068 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:50:46 +00:00
mozilla.mano%sent.com
cf32a81f73 Bug 296583 - Make 'Set Desktop Background' dialog skinable. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@216067 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:39:09 +00:00
mozilla%justcameron.com
c7f414f590 Bug 362060 - Rustico style change broke install.js, severely for themes (Download error -228)
Attachment 246924
p=Giorgio Maone (g.maone at informaction dot com)
r=Shaver


git-svn-id: svn://10.0.0.236/trunk@216066 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:34:20 +00:00
sayrer%gmail.com
01f4171f8c Bug 362232. Set XPCOM_DEBUG_BREAK so things run better on Windows. Patch by Wladimir Palant <trev@gtchat.de>. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@216065 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:23:23 +00:00
mozilla.mano%sent.com
ddb8fb3dc3 Bug 362074 - ns*TextFieldAccessible::CheckForEditor should use nsIDOMNSEditableElement. r=aaronlev.
git-svn-id: svn://10.0.0.236/trunk@216063 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:10:31 +00:00
sayrer%gmail.com
d7f9b6cd06 Bug 362230. Add more privileges for mochitest. Patch by Wladimir Palant <trev@gtchat.de>. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@216062 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 16:03:09 +00:00
wsharp%adobe.com
e4f8f1cedd bug 361388. More 64-bit fixes. r:stejohns
git-svn-id: svn://10.0.0.236/trunk@216061 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 14:39:14 +00:00
kairo%kairo.at
12391270b1 update nagios checks for bug 359687 checkin on 1.8.0 branch
git-svn-id: svn://10.0.0.236/trunk@216060 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 12:58:03 +00:00
Olli.Pettay%helsinki.fi
9a8ed1afbb Bug 361814, NS_ERROR_DOM_WRONG_DOCUMENT_ERR in select1.xml, p=surkov, r=me+doronr
git-svn-id: svn://10.0.0.236/trunk@216057 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 08:59:02 +00:00
mozilla.mano%sent.com
796cf6c0ba Bug 330102 - Switch pfs to use principal matching rather than string matching. r=gavin, sr=bz.
git-svn-id: svn://10.0.0.236/trunk@216056 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 08:06:22 +00:00
mozilla.mano%sent.com
a61731ba79 Bug 361608 - possible leak in Safari profile migrator. r=mento.
git-svn-id: svn://10.0.0.236/trunk@216055 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 08:01:33 +00:00
philringnalda%gmail.com
7aab1cac97 Bug 221891: Make customizing toolbars in two or more different types of mail window work, r+a=mscott
git-svn-id: svn://10.0.0.236/trunk@216054 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 05:12:55 +00:00
stuart.morgan%alumni.case.edu
f3648e4a0e Camino only - Bug 356708: Automatic bookmark backup. r=cl sr=pink
git-svn-id: svn://10.0.0.236/trunk@216053 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 05:10:18 +00:00
philringnalda%gmail.com
8567859c40 Bug 317424: Customize dialog doesn't cancel icon size and mode when canceled, r+a=mscott
git-svn-id: svn://10.0.0.236/trunk@216052 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 05:10:13 +00:00
stuart.morgan%alumni.case.edu
0c8a5ab065 Camino only - Bug 353433: use only https to find available browsers. r=kreeger sr=pink
git-svn-id: svn://10.0.0.236/trunk@216051 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 05:00:12 +00:00
stuart.morgan%alumni.case.edu
f1575a2a80 Camino only - Bug 300905: add en-US to generic en in accept-language headers. r=kreeger r=max sr=pink
git-svn-id: svn://10.0.0.236/trunk@216050 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 04:56:48 +00:00
tor%cs.brown.edu
06721f93fc Bug 362140 - inner svg not acting as coordinate context provider.
r=jwatt, sr=roc


git-svn-id: svn://10.0.0.236/trunk@216048 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 03:47:57 +00:00
cvshook%sicking.cc
57f03ac9c1 Bug 323924, Call CheckLoadURIWithPrincipal before issuing pings and on redirects. r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@216045 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 03:08:49 +00:00
mark%moxienet.com
63d34154f7 Attempting to fix more bustage following 359124: Camino, Thunderbird, C-Monkey.
git-svn-id: svn://10.0.0.236/trunk@216043 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 01:56:05 +00:00
stuart.morgan%alumni.case.edu
d72b16911a Camino only - Link libcups to fix bustage from bug 359124
git-svn-id: svn://10.0.0.236/trunk@216041 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 00:59:33 +00:00
ajschult%verizon.net
6cb4fa848c Bug 361170: "never show this dialog again" may be too confusing for end user. Patch by Benoît <benoit@gawab.com>, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@216040 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 00:38:50 +00:00
sspitzer%mozilla.org
82959fb332 fix warning, no bug #. r=gavin
git-svn-id: svn://10.0.0.236/trunk@216037 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 00:18:06 +00:00
pavlov%pavlov.net
826c9e387a adding cups to the linkline for macos
git-svn-id: svn://10.0.0.236/trunk@216036 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 00:14:57 +00:00
vladimir%pobox.com
6a28d026b6 b=362108, cairo ppc, hang when scrolling in a tree, r=stuart
git-svn-id: svn://10.0.0.236/trunk@216035 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-29 00:12:14 +00:00
bugzilla%arlen.demon.co.uk
704c0c620b Bug 357321 don't blindly trust address book recipients when loading remote content - Back port changes from SM to TB
p=me r=mscott


git-svn-id: svn://10.0.0.236/trunk@216032 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:42:19 +00:00
tor%cs.brown.edu
4679ef629c Bug 361589 - patterns on strokes not working in nquartz backend. r=vlad
git-svn-id: svn://10.0.0.236/trunk@216030 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:36:21 +00:00
scott%scott-macgregor.org
4b4374da24 Thunderbird no longer builds xpfe/components/build2 so remove that line from allmakefiles.sh
git-svn-id: svn://10.0.0.236/trunk@216027 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:33:02 +00:00
tor%cs.brown.edu
ff9e541360 Bug 361884 - gSVGRendererAvailable unused. r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@216026 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:29:53 +00:00
ccooper%deadsquid.com
3e98bba0c7 - preferentially sort subgroup and testcase lists by name to make it easier for admins to find what they're looking for
git-svn-id: svn://10.0.0.236/trunk@216025 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:28:33 +00:00
bienvenu%nventure.com
d29380c022 expose ability to get text of a message, so client code like the spotlight search integration can use it, 290057, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@216024 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:11:59 +00:00
joshmoz%gmail.com
f041ee2e8f Fix tabs on Mac OS X 10.3 under cairo.
Fix things so we don't depend on including local system headers. We should never do that because we should be using only sdk headers.

Remove a bunch of camino-specific hacks so they could compile. Everything should work for Camino now.

b=362014 r=smorgan sr=pinkerton


git-svn-id: svn://10.0.0.236/trunk@216023 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:07:13 +00:00
gijskruitbosch%gmail.com
d66487aca9 Bug 333570 - Key event not available on GTK2 warning (Switch Text Direction key)
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only


git-svn-id: svn://10.0.0.236/trunk@216022 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 23:05:36 +00:00
scott%scott-macgregor.org
70732f0d90 Bug #332160 --> hook up new mail alert notifications for unix.
Patch by magnus melin <mkmelin+mozilla@iki.fi>
sr=mscott


git-svn-id: svn://10.0.0.236/trunk@216016 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 22:22:37 +00:00
pavlov%pavlov.net
6abcf11249 fixing stupid camino bustage.
git-svn-id: svn://10.0.0.236/trunk@216014 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 22:08:56 +00:00
gijskruitbosch%gmail.com
694b3df28d Bug 332588 - Dropping link in single line input opens multiline input
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only


git-svn-id: svn://10.0.0.236/trunk@216009 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:50:08 +00:00
bienvenu%nventure.com
a1d47e4346 fix 197228 create special folders for local accounts lazily, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@216008 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:49:40 +00:00
scott%scott-macgregor.org
835d4bb9c2 Bug #362133 --> rename go back and go forward buttons to Back and Forward. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@216007 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:44:05 +00:00
bugzilla%arlen.demon.co.uk
b2aa34f0ff Bug 360288 SeaMonkey Front End Support for New Remote Content Policy
p=me r=neil sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@216003 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:26:08 +00:00
scott%scott-macgregor.org
02ad5b0e02 Bug #361434 --> add a separate access key for the mac system sound. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@216002 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:15:32 +00:00
pavlov%pavlov.net
ff3c16ff9a cocoa-cairo printing. bug 359124. r=vlad
git-svn-id: svn://10.0.0.236/trunk@216001 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:10:05 +00:00
gijskruitbosch%gmail.com
7f3f5e78f1 Bug 123970 - Should be able to scan user list of a channel
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only


git-svn-id: svn://10.0.0.236/trunk@216000 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 21:00:08 +00:00
cvshook%sicking.cc
0f2957680d Bug 323924, Call CheckLoadURIWithPrincipal before issuing pings. r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@215999 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 20:47:10 +00:00
dougt%meer.net
f24dc3b759 HTML injection in gopher dir listing. b=358128, r=dveditz
git-svn-id: svn://10.0.0.236/trunk@215996 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 20:32:27 +00:00
despotdaemon
a932ae54a2 Pseudo-automatic update of changes made by aravind@mozilla.com.
git-svn-id: svn://10.0.0.236/trunk@215995 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 20:07:13 +00:00
brendan%mozilla.org
5d91ffeec1 Hack around compare-and-swap prob (353962, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215993 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 19:53:56 +00:00
vladimir%pobox.com
7abbce922a b=359649, tree row painting broken, r=ndeakin
git-svn-id: svn://10.0.0.236/trunk@215992 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 19:28:39 +00:00
mconnor%steelgryphon.com
27a09efffd missed an unofficial branding file, adding now, NPOTB
git-svn-id: svn://10.0.0.236/trunk@215990 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 19:24:35 +00:00
bienvenu%nventure.com
df8e0bcf1e add support for custom folder identities, and support them for delegated imap folders, sr=mscott 285474
git-svn-id: svn://10.0.0.236/trunk@215986 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 18:11:39 +00:00
stridey%gmail.com
ed867a0694 Camino only - Bug 362067: Tab groups in bookmark menus need alternates. r=Wevah sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@215985 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 18:09:23 +00:00
bienvenu%nventure.com
5231945dc5 fix 359882 autoconfig checking for e-mail identity doesn't work if default account has multiple identities, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215983 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 18:02:18 +00:00
gavin%gavinsharp.com
39e5caf94b Bug 362047: fix bustage fix
git-svn-id: svn://10.0.0.236/trunk@215981 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 17:14:00 +00:00
wsharp%adobe.com
d5acd651d0 bug 361427. Fix debug build for Linux. r:mtilburg
git-svn-id: svn://10.0.0.236/trunk@215977 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 16:08:03 +00:00
daniel.boelzle%sun.com
037f035e35 Bug 340949: search API, encoding bug workaround, minor bug fixes
git-svn-id: svn://10.0.0.236/trunk@215976 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 15:55:45 +00:00
cltbld
189f20780c Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@215975 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 15:41:01 +00:00
benjamin%smedbergs.us
273724f82e Bug 360125 - --with-branding doesn't provide a way to set MOZ_APP_DISPLAYNAME, r=mconnor
git-svn-id: svn://10.0.0.236/trunk@215974 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 15:37:41 +00:00
mozilla%justcameron.com
d1d77c12ca Bug 362060 - New Rustico Install button broke install.js
p= Wladimir Palant (trev at gtchat dot de) and Giorgio Maone (g.maone at informaction dot com)
r=Shaver


git-svn-id: svn://10.0.0.236/trunk@215973 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 15:24:15 +00:00
mats.palmgren%bredband.net
93ff6ba7ca If there were errors reading "prefs.js" then make a backup copy of it in "Invalidprefs.js" before overwriting it. b=361102 r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@215971 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 14:11:40 +00:00
mats.palmgren%bredband.net
b59e8e0ac8 Fix a crash when onreadystatechange handler loads a new URL. b=361773 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@215970 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 13:56:40 +00:00
mats.palmgren%bredband.net
428dc5e234 Make sure text input onchange handler is called before onblur. b=357684 r=Olli.Pettay sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@215968 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 13:08:23 +00:00
bugzilla%standard8.demon.co.uk
815bad4993 Bug 343011 Searching Organization from LDAP address book yields no results. r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215967 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 12:44:18 +00:00
timeless%mozdev.org
ec4d37087d Bug 336183 [arm build] undefined reference _PrepareAndDispatch in xpcom_core
This is a GCC3.4 fix over a previous GCC fix it obsoletes the poorlly designed
patch which was written for bug 307418

__attribute__(()) uses pairs of parens :(

moa=timeless


git-svn-id: svn://10.0.0.236/trunk@215961 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 12:05:49 +00:00
mats.palmgren%bredband.net
a0d7552927 Use the unshifted charCode when the Shift key and other modifiers are down (for accesskey handling). b=351310 r=zeniko sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@215960 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 11:58:29 +00:00
philringnalda%gmail.com
a5fb9a250c Bug 362047 - bustage fix for bug 361146, missing paren, irc r=timeless
git-svn-id: svn://10.0.0.236/trunk@215959 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 08:44:04 +00:00
wr%rosenauer.org
aba3e90760 Bug 360941 - UpdateDriver and UpdateService update location mismatch, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215956 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 06:09:19 +00:00
stridey%gmail.com
758a292f3b Camino only - Bug 350806: Make Go menu history items respect the cmd/shift modifiers properly. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@215955 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 05:44:08 +00:00
stuart.morgan%alumni.case.edu
fe0f8c23f5 Camino only - removing project cruft accidentally checked in with bug 358390
git-svn-id: svn://10.0.0.236/trunk@215953 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 04:30:16 +00:00
bzbarsky%mit.edu
43242f0c03 Make XML serializer output an encoding="..." which matches the actual encoding
it's serializing to.  Bug 361933, r+sr=sicking


git-svn-id: svn://10.0.0.236/trunk@215952 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 04:01:46 +00:00
cls%seawood.org
a48f352138 Mingw builds require _WIN32_WINNT >= 0x0501 (XP) to use the IP_ADAPTER features of nsNotifyAddrListener.
Also fix header include case for cross-compile builds.
Bug #358023 r=bsmedberg


git-svn-id: svn://10.0.0.236/trunk@215951 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 03:43:05 +00:00
bzbarsky%mit.edu
9cac9633d9 Fix bug 277724 -- make <select>, <textarea>, <button> restore disabled state. r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215950 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 03:17:03 +00:00
pavlov%pavlov.net
1a796ff990 bug 333253. disabling icon decoder in cairo until proper fix can go in.
git-svn-id: svn://10.0.0.236/trunk@215949 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 03:08:43 +00:00
mattwillis%gmail.com
a6d6a3d05e Disable SVG on Sunbird tinderboxen (fallout from bug 354866)
git-svn-id: svn://10.0.0.236/trunk@215948 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 02:59:11 +00:00
ginn.chen%sun.com
4b6e98cc5a Bug 359784 preferences pane accessible tree uncomplete
patch by Nian.Liu at sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@215947 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 02:19:50 +00:00
mike.morgan%oregonstate.edu
bb8b45b34d Checking in updates to PFS that JST committed to v1. Also added in the HTML edits, which were much simpler. See bug 360629.
git-svn-id: svn://10.0.0.236/trunk@215942 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 02:04:40 +00:00
stuart.morgan%alumni.case.edu
f41e761a17 Camino only - yet more hacking around bug 362014 to support all Camino's tinderbox configurations
git-svn-id: svn://10.0.0.236/trunk@215939 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 01:33:34 +00:00
pavlov%pavlov.net
f038285d92 move ns_ensure_true in to the right block. bug 333253. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215937 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 01:14:29 +00:00
scott%scott-macgregor.org
56237bdb3f Bug #361434 --> Options UI re-design.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@215929 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 01:06:17 +00:00
joshmoz%gmail.com
8e01aa53b8 crashes clicking on menubar while popup displayed (OS X 10.3 only) [@ FadeMenuWindows]. b=351230 r=mento sr=pav
git-svn-id: svn://10.0.0.236/trunk@215927 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:58:40 +00:00
jwalden%mit.edu
35d6793138 Bug 361792 - Signed-unsigned comparison in nsVoidArray.cpp. r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@215922 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:32:30 +00:00
bienvenu%nventure.com
f575b707e1 change existence test to allow mail folders > 2GB, sr=mscott 361730
git-svn-id: svn://10.0.0.236/trunk@215920 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:19:20 +00:00
pavlov%pavlov.net
73e4b263e0 bug 362015. r=vlad. makes us use a region for drawing to avoid painting too much.
git-svn-id: svn://10.0.0.236/trunk@215919 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:11:42 +00:00
stuart.morgan%alumni.case.edu
daed2901a3 Camino only - more hacking around build failures caused by bug 362014
git-svn-id: svn://10.0.0.236/trunk@215917 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:03:43 +00:00
sayrer%gmail.com
09c032232d bug 358797 test by Adam Guthrie <ispiked@gmail.com>. r=dveditz
git-svn-id: svn://10.0.0.236/trunk@215916 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-28 00:03:41 +00:00
stuart.morgan%alumni.case.edu
6ca4146e29 Camino only - hack around build failures (see bug 362014). r=mento
git-svn-id: svn://10.0.0.236/trunk@215915 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 23:47:52 +00:00
cltbld
39b7768b35 Automated update from host egg.build.mozilla.org
git-svn-id: svn://10.0.0.236/trunk@215913 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 22:51:00 +00:00
vladimir%pobox.com
e1a39de646 b=359054, crash in moz_cairo_pixman_composite_src (image data was freed shortly before being used in compositing op), r=pavlov
git-svn-id: svn://10.0.0.236/trunk@215911 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 22:32:11 +00:00
vladimir%pobox.com
afd6abf2a8 b=360293, add helper macros for argument checking, r=dveditz
git-svn-id: svn://10.0.0.236/trunk@215907 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 22:22:47 +00:00
stuart.morgan%alumni.case.edu
c585cb74a1 Camino only - fix more bustage from bug 354866 (remove references to gksvgrenderer.xpt)
git-svn-id: svn://10.0.0.236/trunk@215904 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 21:49:51 +00:00
bienvenu%nventure.com
a9eb0960e9 ignore spotlight subdirectories when doing local folder discovery, sr=mscott, part of 290057
git-svn-id: svn://10.0.0.236/trunk@215902 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 21:08:10 +00:00
mark%moxienet.com
2bbd5f363d Configure regeneration for smorgan's bug 358390. cltbld@egg auto-regeneration still seems to be asleep.
git-svn-id: svn://10.0.0.236/trunk@215901 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 21:01:30 +00:00
bienvenu%nventure.com
4cb6530c0f fix 358657 drag drop of attachments from mail messages to desktop fails, sr=mscott, initial work done by kovalchuk77@list.ru
git-svn-id: svn://10.0.0.236/trunk@215899 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 20:50:34 +00:00
stuart.morgan%alumni.case.edu
c3c28b83e4 Bug 358390: Enable cairo for Camino (and re-enable SVG). r/sr=josh
git-svn-id: svn://10.0.0.236/trunk@215898 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 20:24:11 +00:00
gavin%gavinsharp.com
b925db08e0 Bug 361146: DOM Inspector doesn't observe its preferences correctly, patch by Shawn Wilsher :sdwilsh <comrade693+bmo@gmail.com>, r=db48x, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215897 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 20:07:47 +00:00
gavin%gavinsharp.com
72a259e9fb Bug 361105: Failed to load overlay from chrome://communicator/content..., patch by Shawn Wilsher :sdwilsh <comrade693+bmo@gmail.com>, r=db48x, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215896 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 20:06:45 +00:00
gavin%gavinsharp.com
5ad4a47295 Bug 360572: deleting history entries from the search bar autocomplete dropdown doesn't work when suggestions are shown, r=mconnor
git-svn-id: svn://10.0.0.236/trunk@215895 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:51:35 +00:00
jwatt%jwatt.org
84a83d271d Fixing bug 360595. xul:description inside svg:foreignObject disappears when changed. r+sr=bzbarsky@mit.edu
git-svn-id: svn://10.0.0.236/trunk@215893 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:49:00 +00:00
mnyromyr%tprac.de
2ff646ae4d Bug 193883: WMP9 Plugin installed, but 6.4 used; p=Frank Wein <bugzilla@mcsmurf.de>, r/sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@215892 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:47:39 +00:00
rob_strong%exchangecode.com
1ccee43519 Bug 357922 - Bookmarks missing, tabs broken, etc. (Firefox 2 install over Firefox 1.5.0.7 failed to replace some files.). r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@215885 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:17:14 +00:00
wtchang%redhat.com
f1cdc03bd4 Bugzilla Bug 361332: use a better way to determine if $(NSPR_CO_TAG) can be
pulled by date. r=benjamin.smedberg


git-svn-id: svn://10.0.0.236/trunk@215882 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:12:41 +00:00
tor%cs.brown.edu
3d58fae26f Simplify build bustage fix, as SVG now depends on cairo gfx.
git-svn-id: svn://10.0.0.236/trunk@215881 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:10:44 +00:00
tor%cs.brown.edu
f34eaa337e Bustage fix for SVG-disabled, <html:canvas>-enabled, non-cairo gfx builds.
git-svn-id: svn://10.0.0.236/trunk@215880 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 19:05:57 +00:00
scott%scott-macgregor.org
91ec7f9404 Bug #361591 --> id needed for quick sarch focus key. patch by Mark Charlebois mcharleb@qualcomm.com. r=bienvenu, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215879 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:55:01 +00:00
joshmoz%gmail.com
248ed6e7e6 remove XP_MAC from xpinstall. b=281889 r=dveditz sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@215878 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:47:27 +00:00
lpsolit%gmail.com
0d8842e4d7 Bug 361809: GMT, UT, UTC and WET cannot be used as timezone - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit a=justdave
git-svn-id: svn://10.0.0.236/trunk@215877 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:31:36 +00:00
lpsolit%gmail.com
701e9498bd Bug 361877: Argument "" isn't numeric in numeric gt (>) at data/template/template/en/default/global/user-error.html.tmpl line 1526 - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@215876 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:25:41 +00:00
lpsolit%gmail.com
13befd592c Bug 361875: Use of uninitialized value in numeric eq (==) at Bugzilla/User.pm line 1465 - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@215875 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:21:46 +00:00
lpsolit%gmail.com
d67ce8c297 Bug 361867: The description for the 'allowbugdeletion' parameter should not say deleting versions can delete bugs - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit a=justdave
git-svn-id: svn://10.0.0.236/trunk@215874 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:11:02 +00:00
ghendricks%novell.com
72a64c823e == where = should be
git-svn-id: svn://10.0.0.236/trunk@215873 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:08:32 +00:00
joshmoz%gmail.com
e63506892a NS_NATIVE_GRAPHIC return value for mac top-level windows is nonsense. b=361439 r=hwaara sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@215872 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:08:30 +00:00
ghendricks%novell.com
6fb3603c30 Need to exit the loop when checking for ownership of multiple plans
git-svn-id: svn://10.0.0.236/trunk@215871 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 18:00:04 +00:00
lpsolit%gmail.com
4320afa0dc Bug 361870: SQL query in Bugzilla::Bug::EmitDependList() too complicated - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@215869 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 17:48:56 +00:00
tor%cs.brown.edu
5200d36361 Camino build bustage fix - disable SVG until they switch to cairo gfx.
git-svn-id: svn://10.0.0.236/trunk@215868 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 17:45:30 +00:00
tor%cs.brown.edu
c8c243d5af Bug 354866 - remove svg renderer layer, begin switch to thebes. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215867 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 17:30:57 +00:00
peterv%propagandism.org
07c4a62456 Fix for bug 356851 (nsXPConnect::ReparentAllWrappersInScope uses wrong parents.). r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@215866 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 16:20:31 +00:00
michael.buettner%sun.com
91d8311333 bug #360674 implement zoom-feature for free/busy grid r=tbe
git-svn-id: svn://10.0.0.236/trunk@215865 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 15:52:16 +00:00
michael.buettner%sun.com
f9f2185a46 bug #360259 timezone-support does not work as advertised r=tbe
git-svn-id: svn://10.0.0.236/trunk@215864 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 12:26:25 +00:00
neil%parkwaycc.co.uk
92cea4c84f Remove near-useless "Expand" item on bookmark menuitem context menus p=paradigmk@technodrome.com r=me
git-svn-id: svn://10.0.0.236/trunk@215862 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 12:01:45 +00:00
michael.buettner%sun.com
9a0df68256 bug #360117 autoexpand freebusy-grid to 24hrs r=tbe
git-svn-id: svn://10.0.0.236/trunk@215860 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 11:35:00 +00:00
michael.buettner%sun.com
ee70986245 Bug #329035 calendar view refresh() operation has re-entrancy problems r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@215859 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 10:33:07 +00:00
martijn.martijn%gmail.com
062c169805 Bug 361808 - Print selection doesn't print selected text, backout from patch from bug 355395
git-svn-id: svn://10.0.0.236/trunk@215858 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 08:58:24 +00:00
timeless%mozdev.org
6e0b3ebac0 Bug 336183 [arm build] undefined reference _PrepareAndDispatch in xpcom_core
This is a GCC3.4 fix over a previous GCC fix it obsoletes the poorlly designed
patch which was written for bug 307418

moa=timeless


git-svn-id: svn://10.0.0.236/trunk@215857 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 07:48:46 +00:00
mattwillis%gmail.com
cf6ae9fe6d bug 361900 - Add nb-NO (Norwegian bokmål) to all-locales
git-svn-id: svn://10.0.0.236/trunk@215856 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 05:25:24 +00:00
mattwillis%gmail.com
9d7bc79551 bug 341971 - Fix Unicode typo
git-svn-id: svn://10.0.0.236/trunk@215855 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 05:20:30 +00:00
mattwillis%gmail.com
a1b0c15454 bug 341971 - Adds AUS update checking to Sunbird. r=ctalbert, jminta, ui-r=mvl
git-svn-id: svn://10.0.0.236/trunk@215854 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 04:53:55 +00:00
mattwillis%gmail.com
501423746b bug 341971 - Adds AUS update checking to Sunbird. r=ctalbert, jminta, ui-r=mvl
git-svn-id: svn://10.0.0.236/trunk@215852 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-27 04:51:19 +00:00
mozilla.mano%sent.com
c9b9559767 Bug 288254 - Findbar XBL widget. r=gavin,masayuki,bienvenu.
git-svn-id: svn://10.0.0.236/trunk@215850 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 22:47:46 +00:00
roc+%cs.cmu.edu
5290353d07 Bug 361707. nsTArray::SetCapacity should return boolean success/failure. r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@215849 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 22:01:24 +00:00
bugzilla%standard8.demon.co.uk
0fb182bdce Backout xpfe/ changes from bug 361193 to fix regression bug 361883
git-svn-id: svn://10.0.0.236/trunk@215848 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 21:30:14 +00:00
cbiesinger%web.de
6adee2fe6d bug 309438 Shorten the Accept: header to:
Accept: text/html,application/xhtml+xml;q=0.9,application/xml;q=0.8,*/*;q=0.7
r=darin sr=dbaron


git-svn-id: svn://10.0.0.236/trunk@215847 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 20:38:09 +00:00
bienvenu%nventure.com
e5bb9259ec work for 290057 integrating with Spotlight - this allows us to open spotlight search results in TB, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215846 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 19:56:14 +00:00
bugzilla%standard8.demon.co.uk
6f162638fd Bug 256447 In mailWindowOverlay.js, "Warning: redeclaration of var i" and "Warning: assignment to undeclared variable pop3Server". p=Serge Gautherie <sgautherie.bz@free.fr>,r=bienvenu,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215845 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 19:27:13 +00:00
neil%parkwaycc.co.uk
6236d3bd6a Followup to bug 355064 to update the spelling items last to hack around the editor context menu hacks r=IanN
git-svn-id: svn://10.0.0.236/trunk@215844 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 19:12:19 +00:00
bugzilla%arlen.demon.co.uk
4314b5ca79 Bug 357321 don't blindly trust address book recipients when loading remote content - Remove unneeded code from privacy.js
p=me r/sr=mscott


git-svn-id: svn://10.0.0.236/trunk@215842 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 17:40:32 +00:00
neil%parkwaycc.co.uk
fe51062186 Code and comment cleanup b=342560 r=Mnyromyr
git-svn-id: svn://10.0.0.236/trunk@215841 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 17:31:41 +00:00
mnyromyr%tprac.de
f483bb45a8 Bug 361694: additional trunk fix; r/sr=neil
git-svn-id: svn://10.0.0.236/trunk@215840 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 17:01:54 +00:00
masayuki%d-toybox.com
5976c1b7ff Bug 360050 Implement SVGMatrix::RotateFromVector, FlipX, FlipY. patch by KUROSAWA, Takeshi(taken) <taken.spc@gmail.com> r=tor, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215839 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 14:41:55 +00:00
masayuki%d-toybox.com
dc0cfe748e Bug 360050 backed-out for bustage on Win32
git-svn-id: svn://10.0.0.236/trunk@215838 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 14:25:00 +00:00
masayuki%d-toybox.com
e039a0065b Bug 360050 Implement SVGMatrix::RotateFromVector, FlipX, FlipY. patch by KUROSAWA, Takeshi(taken) <taken.spc@gmail.com> r=tor, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215837 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 13:49:26 +00:00
gerv%gerv.net
47312e784f Further updates to cope with new code
git-svn-id: svn://10.0.0.236/trunk@215836 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 08:24:32 +00:00
stuart.morgan%alumni.case.edu
0e6913057b Camino only - Added checking embed-replacements to the release checklist. No code changes
git-svn-id: svn://10.0.0.236/trunk@215835 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 06:19:00 +00:00
philringnalda%gmail.com
cdf1c9053f Bug 352032: A few prefs buttons lost their disable_button in the prefs reorg, r=gavin
git-svn-id: svn://10.0.0.236/trunk@215834 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 02:19:12 +00:00
stuart.morgan%alumni.case.edu
c6264e173c Camino only - Bug 343837: Show 'Camino' instead of 'null' in security dialogs. sr=mento
git-svn-id: svn://10.0.0.236/trunk@215830 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-26 00:47:06 +00:00
mozilla%weilbacher.org
b135e35663 [OS/2] Bug 358863: fix jumping of elements when pmstripe theme is active and toolbars are wider than the Firefox window, r/sr=mkaply
git-svn-id: svn://10.0.0.236/trunk@215829 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 23:22:18 +00:00
mozilla.mano%sent.com
d451656a5e Bug 361701 - First pane of preferences window is blank when animating is on. patch from Dave Townsend (Mossop) <mossop.bugzilla@blueprintit.co.uk>, r=me.
git-svn-id: svn://10.0.0.236/trunk@215827 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 21:15:43 +00:00
mozilla.mano%sent.com
c0464c750b Bug 361826 - Re-enable background-tabs notification in Pinstripe. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215826 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 20:37:32 +00:00
silver%warwickcompsoc.co.uk
2edcf0c34b Fix unused code to use new tree-utils functions.
NPOB.


git-svn-id: svn://10.0.0.236/trunk@215825 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 19:58:04 +00:00
bugzilla%arlen.demon.co.uk
783de386b0 Bug 357321 don't blindly trust address book recipients when loading remote content - Fix msgHdrForCurrentMessage patch
r=mscott


git-svn-id: svn://10.0.0.236/trunk@215823 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 17:38:57 +00:00
robert%accettura.com
f2b960bc4d Small html cleanup. Spaces to tabs, etc.
git-svn-id: svn://10.0.0.236/trunk@215822 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 16:18:06 +00:00
neil%parkwaycc.co.uk
7f9d2fd6a6 Tools/Search the Web fails with no windows open on Mac b=25287 p=stefanh r+sr=me
git-svn-id: svn://10.0.0.236/trunk@215820 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 15:21:12 +00:00
gavin%gavinsharp.com
2165c76269 Bug 361687: French translation update for DOMi, patch by Cédric Corazza <cedric.corazza@wanadoo.fr>, r=bugzilla.fr@gmail.com
git-svn-id: svn://10.0.0.236/trunk@215819 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 15:18:37 +00:00
gavin%gavinsharp.com
52ddd7f7c5 Bug 361432: style lines from manifest files no longer applied when xul cache disabled, patch by Nickolay Ponomarev <asqueella@gmail.com>, r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@215818 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 14:51:29 +00:00
gavin%gavinsharp.com
ee9387102f Bug 361769: the V before Show Suggestions is too big (make min-width/height rules apply only to the engine dropdown), patch by Dave Townsend (Mossop) <mossop.bugzilla@blueprintit.co.uk>, r=me
git-svn-id: svn://10.0.0.236/trunk@215817 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 14:33:04 +00:00
gavin%gavinsharp.com
f359745a49 Bug 357609: package DOM storage xpt (DOM storage broken in trunk builds), patch by Sylvain Pasche <sylvain.pasche@gmail.com>, r=me
git-svn-id: svn://10.0.0.236/trunk@215816 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 14:29:36 +00:00
mnyromyr%tprac.de
696e27438b Bug 361694: Altering a tag's importance resets its name and colour; r/sr=neil
git-svn-id: svn://10.0.0.236/trunk@215815 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 13:06:02 +00:00
bugzilla%standard8.demon.co.uk
4f06162d58 Bug 361193 In suiterunner preferences, advanced -> Mousewheel pane doesn't display. r=KaiRo,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@215814 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 13:00:07 +00:00
mnyromyr%tprac.de
ccdb7040df Bug 349991: tag mailview names out of sync with tags; r=neil, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215813 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 12:55:06 +00:00
neil%parkwaycc.co.uk
06698f3e6b Inline spellcheck in web composer (editor) b=355064 r=IanN
git-svn-id: svn://10.0.0.236/trunk@215812 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 12:25:20 +00:00
lpsolit%gmail.com
fd69b6f0b1 Bug 338435: Add link to DBD::Pg in the documentation - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit
git-svn-id: svn://10.0.0.236/trunk@215811 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 11:47:27 +00:00
lpsolit%gmail.com
ab7d381f7f Docs patch for bug 330487: Bugzilla now has an automatic update notification system - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215810 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 11:33:49 +00:00
bugzilla%standard8.demon.co.uk
d92087a539 Bug 361193 In suiterunner preferences, advanced -> Mousewheel pane doesn't display. r=KaiRo,sr=Neil
git-svn-id: svn://10.0.0.236/trunk@215809 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 09:58:57 +00:00
robert%accettura.com
414abeb46c Second half of charset implementation, add to db schema, make viewable in report and query.
git-svn-id: svn://10.0.0.236/trunk@215808 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 02:47:57 +00:00
robert%accettura.com
d71527abf0 Last checkin had a few extra returns and some lines commented out by mistake. Came from the wrong tree. This is better.
git-svn-id: svn://10.0.0.236/trunk@215807 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 02:34:38 +00:00
robert%accettura.com
4090c8e40b Update service to handle versioning via url, and accept character encoding as a param (Bug 352905) and other minor stuff.
git-svn-id: svn://10.0.0.236/trunk@215806 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 02:32:31 +00:00
brendan%mozilla.org
221680ca40 Fix 360612, r=igor.
git-svn-id: svn://10.0.0.236/trunk@215805 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 02:11:28 +00:00
lpsolit%gmail.com
f9769fec10 Docs for bug 344875: Custom fields can be created and edited directly from your web browser - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215804 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 01:10:21 +00:00
ajschult%verizon.net
0a8aca4bae Bug 336966: Useless null check of shell in nsXIEngine::DeleteXPIs. Patch by Ryan Jones <sciguyryan+bugzilla@gmail.com>, r=me.
git-svn-id: svn://10.0.0.236/trunk@215803 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 00:59:20 +00:00
bclary%bclary.com
84b5571f99 JavaScript Test - regression test for bug 361558, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215802 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 00:16:46 +00:00
ajschult%verizon.net
90ff48eb14 Bug 272041: Can't copy whitespace via context menu, r+sr=Neil
git-svn-id: svn://10.0.0.236/trunk@215801 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-25 00:00:04 +00:00
philringnalda%gmail.com
bbb31093ab Bug 361627: Customize toolbar dialog is empty with wrong_document_err, r=mano
git-svn-id: svn://10.0.0.236/trunk@215800 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 23:22:47 +00:00
stuart.morgan%alumni.case.edu
a5384b57c4 Camino only - Fix typo in bug 172842 project change
git-svn-id: svn://10.0.0.236/trunk@215799 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 22:31:18 +00:00
philringnalda%gmail.com
896d90091f Bug 361711: Toolbar customization broken on trunk by wrong_document_err, r=mscott
git-svn-id: svn://10.0.0.236/trunk@215794 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 19:53:53 +00:00
stuart.morgan%alumni.case.edu
a29cbd642f Camino only - Bug 172842: Implement Keychain Services API. r=joshmoz sr=pink
git-svn-id: svn://10.0.0.236/trunk@215791 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 19:20:18 +00:00
mrbkap%gmail.com
cac0189952 Remove JOF_NAME so as to not confuse the code generator. bug 360969, r=brendan
git-svn-id: svn://10.0.0.236/trunk@215788 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 19:00:48 +00:00
mrbkap%gmail.com
3222b6c4b2 Mark our saved setter in case we have the last reference to it. bug 361346, r=brendan
git-svn-id: svn://10.0.0.236/trunk@215787 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 18:57:34 +00:00
hwaara%gmail.com
6827a657d1 expose the "mixed" value of checkbox, and add license headers to these files. r=surkov, b=361736
git-svn-id: svn://10.0.0.236/trunk@215784 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 14:37:00 +00:00
sharparrow1%yahoo.com
40150360c3 Bug 345707: print selection cuts off top of selection. r+sr=src.
git-svn-id: svn://10.0.0.236/trunk@215783 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 08:14:37 +00:00
sharparrow1%yahoo.com
31c9af6683 Bug 360227: prevent framesets from taking up an extra blank page when print/print previewing. r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@215782 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 08:12:17 +00:00
sharparrow1%yahoo.com
9f34a2a380 Bug 356858: remove unused declarations. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215781 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 08:09:28 +00:00
brendan%mozilla.org
dc22a40ddd Back out last change.
git-svn-id: svn://10.0.0.236/trunk@215780 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 05:12:29 +00:00
gavin%gavinsharp.com
fe4108f054 Bug 357398: js_ExpandErrorArguments can crash in OOM conditions, patch by Gavin Reaney <gavin@picsel.com>, r=mrbkap
git-svn-id: svn://10.0.0.236/trunk@215779 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 03:07:59 +00:00
brendan%mozilla.org
96b715af56 Move GSN cache for best sharing and correct clearing (360612, r=igor).
git-svn-id: svn://10.0.0.236/trunk@215778 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 03:03:18 +00:00
mats.palmgren%bredband.net
63082518ab Use the unshifted charCode when the Shift key and other modifiers are down (for accesskey handling). p=zeniko b=351310 r=me
git-svn-id: svn://10.0.0.236/trunk@215777 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 02:10:50 +00:00
jshin%mailaps.org
46531d3b27 bug 359808 : drop support Win 9x/ME in xpcom/io (r/sr=darin)
git-svn-id: svn://10.0.0.236/trunk@215776 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-24 01:02:56 +00:00
jwalden%mit.edu
69999627e3 Bug 361647 - Fix signed-unsigned comparisons in gfxPlatform.cpp. r+sr=pavlov
git-svn-id: svn://10.0.0.236/trunk@215775 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 22:00:10 +00:00
lpsolit%gmail.com
c638418f9d Also mention the XML format for bug lists
git-svn-id: svn://10.0.0.236/trunk@215774 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 21:51:07 +00:00
lpsolit%gmail.com
d4d4716a85 Docs patch for bug 313020: Implement the ability to add and remove individual bugs to/from saved searches - Patch by me, r=Colin
git-svn-id: svn://10.0.0.236/trunk@215772 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 21:39:44 +00:00
lpsolit%gmail.com
47bd278f5d Fixing bustage: &quote; -> <quote>
git-svn-id: svn://10.0.0.236/trunk@215771 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 21:01:05 +00:00
lpsolit%gmail.com
aa614b75ed Bug 361564: Attachments should have their own section in the docs, and info about PatchReader should be a sub-section of it - Patch by Frédéric Buclin <LpSolit@gmail.com> r=Colin
git-svn-id: svn://10.0.0.236/trunk@215770 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 20:48:14 +00:00
silver%warwickcompsoc.co.uk
166dd6b272 ChatZilla 0.9.77.
git-svn-id: svn://10.0.0.236/trunk@215769 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 20:46:23 +00:00
mozilla%colinogilvie.co.uk
0bb94bf176 Bug 361251: update Bugzilla FAQ
Patch by victory(_RSZ_) <bmo2007@rsz.jp>; r=LpSolit; r=Colin


git-svn-id: svn://10.0.0.236/trunk@215768 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 20:25:37 +00:00
philringnalda%gmail.com
6cdeced5e1 Bug 361458: Opening bookmark in sidebar results in XML parsing error, r=gavin
git-svn-id: svn://10.0.0.236/trunk@215767 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 20:13:58 +00:00
silver%warwickcompsoc.co.uk
53bfe68313 Bug 361657 - Adopt nodes when placing them into the output window.
ChatZilla only.
r=samuel


git-svn-id: svn://10.0.0.236/trunk@215763 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 19:31:07 +00:00
brendan%mozilla.org
48501e0eb9 Fix 316552, r=mrbkap.
git-svn-id: svn://10.0.0.236/trunk@215762 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 19:08:08 +00:00
mozilla.mano%sent.com
14284a6947 Bug 361671 - Feed Preview is broken (typro from bug 361186).
git-svn-id: svn://10.0.0.236/trunk@215761 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 18:44:41 +00:00
brendan%mozilla.org
ee1e7b3d6a Fix bogus assertion (361558, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215758 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 17:16:17 +00:00
kjh-5727%comcast.net
2b94312603 Bug 351231: type-pun warnings from nsCOMPtr, part II. r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@215757 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 16:10:43 +00:00
smontagu%smontagu.org
351b095a83 More additions and corrections to language names. Bug 178491, r=jshin, blanket sr=roc
git-svn-id: svn://10.0.0.236/trunk@215756 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 15:59:12 +00:00
Olli.Pettay%helsinki.fi
88461fe249 Bug 354611, Crash [@ nsXULElement::HideWindowChrome] setting hidechrome to true, r=enndeakin, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215755 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 15:55:58 +00:00
kjh-5727%comcast.net
6f72849eb5 Bug 351231: type-pun warnings from nsCOMPtr. r+sr=dbaron.
git-svn-id: svn://10.0.0.236/trunk@215753 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 13:21:27 +00:00
jwalden%mit.edu
b34290b4d0 Bug 359824 - necko unit test failure: test_authentication.js. Previous commit to revert bug 223846 forgot to remove an extra header that the original commit added; this commit removes that unnecessary include. r=vlad on the original backout patch
git-svn-id: svn://10.0.0.236/trunk@215752 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 13:19:53 +00:00
mozilla.mano%sent.com
ce0ad1ae4c Bug 357914 - Choose Application menuitem in feed subscription UI sometimes doesn't work. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215750 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 12:13:47 +00:00
mozilla.mano%sent.com
3632bc2eed Bug 361186 - FeedWriter should cache its string bundle. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215749 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 11:59:53 +00:00
ginn.chen%sun.com
7bacf2ac7f missed two lines in last checkin, sorry for my spam
Bug 361470


git-svn-id: svn://10.0.0.236/trunk@215748 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 10:45:42 +00:00
longsonr%gmail.com
796c22bd86 Bug 361522 - SVGLocatable.getTransformToElement(element) returns wrong values. r=tor,sr=roc
git-svn-id: svn://10.0.0.236/trunk@215747 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 09:41:56 +00:00
mozilla.mano%sent.com
f0dae6c97a Bug 359718 - Page info: Security tab never shown. r=gavin, mpa=darin.
git-svn-id: svn://10.0.0.236/trunk@215746 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 09:41:03 +00:00
allan%beaufour.dk
dfb15a99ce Do not run updateservice tests, when tests are disabled. Bug 359701, r=benjamin
git-svn-id: svn://10.0.0.236/trunk@215745 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 08:46:55 +00:00
allan%beaufour.dk
34472477d0 Add NSPR debug info to nsObserverService. Bug 361490, r=darin
git-svn-id: svn://10.0.0.236/trunk@215744 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 08:43:28 +00:00
ginn.chen%sun.com
016c31f504 Bug 361470 Fix Solairs build after refactoring xptcall
r=benjamin moa=timeless


git-svn-id: svn://10.0.0.236/trunk@215743 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 07:50:02 +00:00
sayrer%gmail.com
579ec0fede Bug 361531. Ampersands in URL aren't escaped when inserted in generated base attribute. r=mano
git-svn-id: svn://10.0.0.236/trunk@215742 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 07:18:59 +00:00
sspitzer%mozilla.org
9a60265878 fix for bug #361624: user style sheets may not be imported from Safari, due to an uninitialized variable. also, fix a warning I introduced with a recent checkin for MOZ_PLACES_BOOKMARKS ifdef support.
r=gavin


git-svn-id: svn://10.0.0.236/trunk@215741 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 07:05:07 +00:00
Olli.Pettay%helsinki.fi
fdf8005415 Bug 361376, Right click on an item in the Add-Ons dialog produces a context menu on the left hand side of the dialog, r=ere, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215740 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 04:52:53 +00:00
enndeakin%sympatico.ca
e19ca111bf Bug 359012, wrong host added to whitelist when xpi is in a frame, r=mano
git-svn-id: svn://10.0.0.236/trunk@215739 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 03:21:26 +00:00
philringnalda%gmail.com
ca251af942 Bug 252247: GetThreadTree is undefined error from hidden window on Mac startup, r+a=mscott
git-svn-id: svn://10.0.0.236/trunk@215738 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 02:40:52 +00:00
philringnalda%gmail.com
3d9cbe9567 Bug 350423: fix pinstripe image regions for phishing and remote content on the trunk, now that the Fx visual refresh has landed the smaller images on the trunk, r=mscott
git-svn-id: svn://10.0.0.236/trunk@215737 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 02:30:27 +00:00
edburns%acm.org
2c1be00595 forgot_to_put_into_cvs
git-svn-id: svn://10.0.0.236/trunk@215736 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 02:23:52 +00:00
masayuki%d-toybox.com
76f4b7f7d0 Bug 361494 NS_ASSERTION of gfxPlatformGtk::IsExistingFont has wrong condition r=vlad
git-svn-id: svn://10.0.0.236/trunk@215734 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 02:01:36 +00:00
sayrer%gmail.com
e7f59d3992 bug 361230. Add a way to tell the parser the feed has been sniffed. r=mano
git-svn-id: svn://10.0.0.236/trunk@215733 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:22:43 +00:00
tor%cs.brown.edu
2f70c89f14 Bug 361587 - avoid paint work on gradient with no stops. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215731 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:17:47 +00:00
tor%cs.brown.edu
8aeeb7cc28 Bug 361569 - allow SVG to use cairo fallbacks with nquartz backend. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215730 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:15:04 +00:00
roc+%cs.cmu.edu
fb4c6fb984 Bug 130078. Reverting fix because of regressions. We'll have to come back to this again :-(.
git-svn-id: svn://10.0.0.236/trunk@215729 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:12:52 +00:00
tony%ponderer.org
6c03b73c81 bug 356355: numeric domain normalization only happens on enchash table values
patch v4: check both old and new canonical form
r=mmchew


git-svn-id: svn://10.0.0.236/trunk@215728 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:12:35 +00:00
sspitzer%mozilla.org
097e8f542b backing out the fix for bug #223846 (AuthName with escaped quote in it sets wrong realm) because it causes two regressions:
bug #361544: unable to log into https://intranet.mozilla.org
bug #359824: necko unit test failure: test_authentication.js

thanks to jeff walden for the patch.

r=vlad, g# agrees with the backout, too.


git-svn-id: svn://10.0.0.236/trunk@215726 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:09:20 +00:00
roc+%cs.cmu.edu
1893938850 Bug 359773. Fix return codes from Get/SetPropertyAsSupports. r+sr=jag
git-svn-id: svn://10.0.0.236/trunk@215725 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 01:09:19 +00:00
preed%mozilla.com
4c668a3d5f Bug 360585: bump Nagios nightly build checker configs for 2.0.0.1pre. patch=cf, r=preed
git-svn-id: svn://10.0.0.236/trunk@215724 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 00:44:11 +00:00
tony%ponderer.org
2925ce62ca back out change because tree is closed
git-svn-id: svn://10.0.0.236/trunk@215723 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 00:39:39 +00:00
tony%ponderer.org
c089f28298 bug 356355: numeric domain normalization only happens on enchash table values
patch v4: check both old and new canonical form
r=mmchew


git-svn-id: svn://10.0.0.236/trunk@215722 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-23 00:37:20 +00:00
vladimir%pobox.com
ece4ca3cad backing out bug 333078, xpcom cycle collector due to perf issues
git-svn-id: svn://10.0.0.236/trunk@215718 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 23:18:16 +00:00
wtchang%redhat.com
27228a603a Updated for the current platform list. Pass the -p option to mkdir to
handle a directory in WIN_OBJDIRS of the form msvc6.0/WIN954.0_DBG.OBJ.


git-svn-id: svn://10.0.0.236/trunk@215714 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:42:57 +00:00
brendan%mozilla.org
ba59cfb0cd Fix from Gavin Reaney <gavin@picsel.com> for 357392, r=me.
git-svn-id: svn://10.0.0.236/trunk@215711 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:32:47 +00:00
sspitzer%mozilla.org
346651146e tree is closed, backing out my last backout
git-svn-id: svn://10.0.0.236/trunk@215708 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:13:14 +00:00
sspitzer%mozilla.org
3321771dea backing out the fix for bug #223846 (AuthName with escaped quote in it sets wrong realm) because it causes two regressions:
bug #361544: unable to log into https://intranet.mozilla.org
bug #359824: necko unit test failure: test_authentication.js

thanks to jeff walden for the patch.

r=vlad, g# agrees with the backout, too.


git-svn-id: svn://10.0.0.236/trunk@215707 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 22:03:58 +00:00
mattwillis%gmail.com
6a6350602b bug 361204 - Fixes line endings and lack of license text. Original patch by Stefan Sitter <ssitter@googlemail.com>, minor edits and r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@215706 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:59:22 +00:00
vladimir%pobox.com
b964499284 b=333078, xpcom cycle collector; followup patch -- patch from graydon@mozilla.com, r=many
git-svn-id: svn://10.0.0.236/trunk@215705 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:31:33 +00:00
mozilla.mano%sent.com
558ec296b5 Backing out bug 359718, tree is closed
git-svn-id: svn://10.0.0.236/trunk@215704 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:24:56 +00:00
mozilla.mano%sent.com
39ba3e7fc7 Bug 359718 - Page info: Security tab never shown. r=gavin, mpa=darin.
git-svn-id: svn://10.0.0.236/trunk@215703 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:23:35 +00:00
wsharp%adobe.com
141562d35f bug 361427. Lost some MathUtils changes for 64-bit.
git-svn-id: svn://10.0.0.236/trunk@215702 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:22:34 +00:00
wsharp%adobe.com
41fd8cb0a5 bug 361427. Merge Linux code into AVM+ source tree. Not quite building yet - some sort of zlib problem with the new zlib routines. Maybe a C/C++ mismatch somehow? r:mtilburg
git-svn-id: svn://10.0.0.236/trunk@215701 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 21:10:17 +00:00
vladimir%pobox.com
81dc6dcbb9 b=333078, xpcom cycle collector; followup patch -- patch from graydon@mozilla.com, r=many
git-svn-id: svn://10.0.0.236/trunk@215700 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 20:48:47 +00:00
lpsolit%gmail.com
ebfd5a4c98 Docs patch for bug 87795: You now get an email with a URL containing a random token to confirm your registration - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215699 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 20:37:55 +00:00
mnyromyr%tprac.de
5942bdcd11 Bug 66466: No cross-folder navigation using Next Unread Thread; based upon an old 2002 patch by Travis Crump <pretzalz@techhouse.org>, r=Neil, sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215698 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 20:33:07 +00:00
lpsolit%gmail.com
f4db343eb7 Bug 361562: The "Using Bugzilla" chapter should be before the "Customising Bugzilla" chapter - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave
git-svn-id: svn://10.0.0.236/trunk@215697 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 20:31:11 +00:00
vladimir%pobox.com
260a2b3959 b=333078, xpcom cycle collector -- patch from graydon@mozilla.com, r=many
git-svn-id: svn://10.0.0.236/trunk@215695 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 19:23:02 +00:00
lpsolit%gmail.com
8fe8165513 Docs patch for bug 36257: Add the QA contact field to the list of valid fields in the "Anatomy of a bug" section - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215694 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 19:08:30 +00:00
scott%scott-macgregor.org
462c59f6ef Bug #358339 --> wrap attempts to get the shell service in try/catch calls. On some flavors of linux, the initializing the shell service throws an error because we don't have access to the gconf services we are expecting. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215693 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:52:33 +00:00
bzbarsky%mit.edu
8de5291c41 This wasn't supposed to land
git-svn-id: svn://10.0.0.236/trunk@215692 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:52:32 +00:00
wsharp%adobe.com
9a008c88b6 bug 361366. Continuation of Mac 64-bit port. r: stejohns. Also fixed two bugs with Steven's change from yesterday. NATIVE functions in DictionaryGlue and DomainClass need 'constructor' changed to new name.
git-svn-id: svn://10.0.0.236/trunk@215691 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:41:17 +00:00
martijn.martijn%gmail.com
cb46a225ca Fix small issue with patch for bug 361334 (Onbeforeunload dialog has too many line breaks), r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215690 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:41:11 +00:00
despotdaemon
102d30ad22 Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@215689 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:40:09 +00:00
martijn.martijn%gmail.com
04a8434163 Bug 361383 - Patch for bug 348183 can be backed out now that the patch for bug 348357 went in, r=gavin.sharp, r=sspitzer
git-svn-id: svn://10.0.0.236/trunk@215688 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:37:34 +00:00
peterv%propagandism.org
104eb64087 Fix for bug 47903 (WRONG_DOCUMENT_ERR not being thrown). r=sicking, sr=bz.
git-svn-id: svn://10.0.0.236/trunk@215687 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:35:05 +00:00
martijn.martijn%gmail.com
8b34f4bfed Bug 319654 - Processing instructions in XUL are not added to the content model, modifying test10, to make it more correct
git-svn-id: svn://10.0.0.236/trunk@215686 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:34:07 +00:00
bzbarsky%mit.edu
43d470b66b Make the redirect check get principals the same way we get them elsewhere.
Clean up some code to use the new security manager method.  Bug 354693,
r=dveditz, sr=sicking


git-svn-id: svn://10.0.0.236/trunk@215685 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:27:54 +00:00
dbaron%dbaron.org
70646c07d3 Fix use of the wrong variable that causes the same argument to be passed twice to NSGetModule. b=316416 r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215684 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 18:01:37 +00:00
gavin%gavinsharp.com
eddda5c09e Last revision was: Bug 342670: Leaking process information handle in nsDebugImpl.cpp, patch by David Gardiner <David.R.Gardiner@gmail.com>, r=bsmedberg, sr=darin
git-svn-id: svn://10.0.0.236/trunk@215682 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:51:59 +00:00
masayuki%d-toybox.com
970854042a Bug 361529 Font resolver doesn't work fine on some cases r=pavlov
git-svn-id: svn://10.0.0.236/trunk@215681 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:50:38 +00:00
gavin%gavinsharp.com
9e78eda24c Bug 342670
git-svn-id: svn://10.0.0.236/trunk@215680 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:50:35 +00:00
gavin%gavinsharp.com
a4155d11e7 Bug 360792: mail.delete_matches_sort_order does not work when using imap mark as deleted model, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215679 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:47:52 +00:00
gavin%gavinsharp.com
3cbc871e9b Bug 360428: Instances of 'AskJeeves' should be replaced with 'Ask.com', fix queryCharset and interpret section, patch by Charles Caygill <bzmozilla@ccaygill.com>, r=neil+me
git-svn-id: svn://10.0.0.236/trunk@215678 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:46:49 +00:00
gavin%gavinsharp.com
473f4f8a9f Bug 359967: File pref-downloads.dtd is no longer used, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r=mscott
git-svn-id: svn://10.0.0.236/trunk@215677 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:44:40 +00:00
gavin%gavinsharp.com
74ed0dc575 Bug 359895: 'about:blank' shows in location bar when switching to a blank tab, r=mano
git-svn-id: svn://10.0.0.236/trunk@215676 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:42:35 +00:00
gavin%gavinsharp.com
dda76b7261 Bug 357171: nsIAutoCompleteSearch (et al) not defined, patch by Paul Tomlin <ptomli.bugzilla@gmail.com>, r=mscott, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215675 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:36:59 +00:00
joshmoz%gmail.com
b249c4e0aa allow directory creation when saving files/attachments. patch by Hiro. b=360948 r=josh sr=pinkerton (re-landing)
git-svn-id: svn://10.0.0.236/trunk@215674 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:35:52 +00:00
gavin%gavinsharp.com
ceebb4e33f Bug 355717: #if is always true or function does not return a value, patch by Ryan Jones <sciguyryan+bugzilla@gmail.com>, r=brendan
git-svn-id: svn://10.0.0.236/trunk@215673 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:34:49 +00:00
uriber%gmail.com
9d04f04293 Null-check GetContentOffsetsFromPoint's output, to avoid crashes later. bug=361229 r=roc sr=sicking
git-svn-id: svn://10.0.0.236/trunk@215672 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:34:15 +00:00
gavin%gavinsharp.com
d83c0d833f Bug 342315: Reply All (to self sent msg) should preserve visible BCC recipients from original message, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215671 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:33:20 +00:00
gavin%gavinsharp.com
037116cb9a Bug 306330: search engines without an icon have less margin than the others, r=mano
git-svn-id: svn://10.0.0.236/trunk@215670 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:26:56 +00:00
gavin%gavinsharp.com
a5ef8e0b77 Bug 243207: net_RFindCharInSet is unused, patch by Ryan Jones <sciguyryan+bugzilla@gmail.com>, r+sr=biesi
git-svn-id: svn://10.0.0.236/trunk@215669 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:24:32 +00:00
gavin%gavinsharp.com
e09148e054 Bug 202198: fix possible leak in nsScriptSecurityManager::InitPrefs(), patch by Ryan Jones <sciguyryan+bugzilla@gmail.com>, r+sr=dveditz
git-svn-id: svn://10.0.0.236/trunk@215668 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:22:40 +00:00
gavin%gavinsharp.com
6044e41533 Bug 185662: In SMTP prefs, make it clear what 'use secure connection (SSL)' really means, patch by Magnus Melin <mkmelin+mozilla@iki.fi>, r+sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215667 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:20:32 +00:00
gavin%gavinsharp.com
66760fc0cc Bug 131190: MsgSendLater need to address the X-DraftInfo receipt info recorded in the send later message, patch by Jeff Tsai <jt95070@netscape.net>, r+sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215666 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:17:40 +00:00
stuart.morgan%alumni.case.edu
6be1ab92a7 Camino only - Bug 361163: Remove window state on quit when save pref is off. r=cl sr=pink
git-svn-id: svn://10.0.0.236/trunk@215665 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 17:00:21 +00:00
despotdaemon
b8ea2bb9bc Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@215663 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 16:46:59 +00:00
lpsolit%gmail.com
a99e72cd79 Documentation for bug 174039: we can now attach documents and set flags on bug creation - Patch by me, r=timeless
git-svn-id: svn://10.0.0.236/trunk@215659 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 15:59:20 +00:00
mattwillis%gmail.com
19d233da19 bug 232202 - Backing out patch that caused regressions per jminta.
git-svn-id: svn://10.0.0.236/trunk@215658 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 13:36:36 +00:00
mattwillis%gmail.com
05fe2bc401 Move Sunbird and Lightning nightly build hour from 6am to 3am Pacific. okayed by preed in IRC
git-svn-id: svn://10.0.0.236/trunk@215655 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 13:14:34 +00:00
mattwillis%gmail.com
231b552d02 switch from win to unix line endings
git-svn-id: svn://10.0.0.236/trunk@215654 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 13:11:12 +00:00
mattwillis%gmail.com
b7902c2667 bug 349228 - Use appropriate observers in comparison in CalDAV. Patch by Bruno Browning <browning@uwalumni.com>, r=lilmatt, jminta
git-svn-id: svn://10.0.0.236/trunk@215653 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 12:52:35 +00:00
neil%parkwaycc.co.uk
013f99ea67 Bug 296770 Mark messages as read by date dialog does not respect leading zeros in the system date format p=mkmelin+mozilla@iki.fi r=me sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215652 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 12:20:48 +00:00
mike.morgan%oregonstate.edu
5cadb1b885 Checking in patch to add 2.0.0.* versions from bug 360585.
git-svn-id: svn://10.0.0.236/trunk@215649 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 10:02:09 +00:00
daniel.boelzle%sun.com
e6711a58c2 Bug 340949: error handling, refresh, startup opt, search for calendars, alarm defaults, minor cleanup
git-svn-id: svn://10.0.0.236/trunk@215648 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 09:43:14 +00:00
bclary%bclary.com
27894392c4 JavaScript Test - regression test for bug 361360, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215647 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 09:41:33 +00:00
bclary%bclary.com
09cc42bc3e JavaScript Test - regression test for bug 361451, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215646 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 09:29:05 +00:00
bclary%bclary.com
7d860b0b10 JavaScript Test - regression test for bug 361467, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215645 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 09:16:24 +00:00
daniel.boelzle%sun.com
24210a8348 Bug 340949: added calIWcapSearchListener
git-svn-id: svn://10.0.0.236/trunk@215644 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 09:11:10 +00:00
joshmoz%gmail.com
550ef5d8e2 back out 360948, tree closed
git-svn-id: svn://10.0.0.236/trunk@215637 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 07:31:54 +00:00
joshmoz%gmail.com
b21faa2041 allow directory creation when saving files/attachments. patch by Hiro. b=360948 r=josh sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@215635 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 07:29:12 +00:00
mrbkap%gmail.com
2680191e6d Our function isn't guaranteed to be scripted. bug 361467, r=brendan
git-svn-id: svn://10.0.0.236/trunk@215634 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 06:45:51 +00:00
timeless%mozdev.org
bf36ae980e Bug 327833, In <inspector.xul>, Failed to load overlay from chrome://browser/content/baseMenuOverlay.xul
p= Shawn Wilsher693+bmo@gmail.com"><comrade693+bmo@gmail.com>, r=timeless, sr=neil

Backing out. jar.mn magic is wrong resulting in unhappiness


git-svn-id: svn://10.0.0.236/trunk@215629 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 03:15:46 +00:00
brendan%mozilla.org
8099c06df9 Sweep property tree after finalizing objects, which may have watchpoints pointing to tree nodes (361451, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215628 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 03:09:27 +00:00
jwalden%mit.edu
64fd802cad JavaScript Test - bug 357352 - e4x/Namespace/regress-350442.js is too strict and requires a particular implementation-dependent generated prefix. r=inonit@inonit.com as agreement that this fix is implementation-independent, assuming the tested implementation doesn't violate the spec in extremely weird ways.
git-svn-id: svn://10.0.0.236/trunk@215627 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 02:46:15 +00:00
mconnor%steelgryphon.com
c8ecc7cfd0 adding Gran Paradiso branding directory, NPOTB and non-working for now
git-svn-id: svn://10.0.0.236/trunk@215625 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 02:21:20 +00:00
stejohns%adobe.com
7f4145951d added .cvsignore files to the mozilla/js/tamarin/test directory tree, so that people who expand the .abc test files into it do not get hundreds of unknown files listed by CVS. Only *.abc files are ignored at present.
git-svn-id: svn://10.0.0.236/trunk@215612 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 01:27:12 +00:00
pavlov%pavlov.net
3d74bc79da turning on cocoa-cairo by default. bug 323934. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215610 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:58:15 +00:00
vladimir%pobox.com
0540a894b3 b=360244, Implement gfxPlatformMac::GetFontList, r=stuart
git-svn-id: svn://10.0.0.236/trunk@215609 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:52:09 +00:00
vladimir%pobox.com
e4714e0e8a b=299149, localstore.rdf and other profile files get overwritten on first run from debug build, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215608 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:51:30 +00:00
pavlov%pavlov.net
556960c330 fixing cocoa-cairo plugins. bug 35732. 6r=vlad.
git-svn-id: svn://10.0.0.236/trunk@215607 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:48:57 +00:00
Olli.Pettay%helsinki.fi
e1b568df42 Bug 205872, l10n fix, p=Shawn Wilsher<comrade693+bmo@gmail.com>, r=pike
git-svn-id: svn://10.0.0.236/trunk@215606 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:48:45 +00:00
Olli.Pettay%helsinki.fi
da2412d3e6 Bug 327833, In <inspector.xul>, Failed to load overlay from chrome://browser/content/baseMenuOverlay.xul, p= Shawn Wilsher<comrade693+bmo@gmail.com>, r=timeless, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215605 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:43:53 +00:00
ghendricks%novell.com
49a7de61dd Give users a product limited dropdown of environments when creating or updating a run.
git-svn-id: svn://10.0.0.236/trunk@215604 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:40:14 +00:00
stejohns%adobe.com
c61da35e9f Bug 360829: Removal of compiler warnings in Tamarin. Enabled (and fixed) many hidden-virtual-function warnings.
git-svn-id: svn://10.0.0.236/trunk@215602 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:15:24 +00:00
lpsolit%gmail.com
63accd62c9 Fixing bustage (I forgot a <title>)
git-svn-id: svn://10.0.0.236/trunk@215601 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-22 00:12:19 +00:00
tor%cs.brown.edu
3c37477ebe Bug 360122 - correct cairo_create error checking.
Patch by amenzie@us.ibm.com, r=tor, sr=roc


git-svn-id: svn://10.0.0.236/trunk@215599 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:57:56 +00:00
lpsolit%gmail.com
a0851bd5c1 Docs patch for bug 119485: update documentation about user account administration - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215598 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:57:23 +00:00
martijn.martijn%gmail.com
da67508251 Bug 361334 - Onbeforeunload dialog has too many line breaks, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215597 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:57:21 +00:00
lpsolit%gmail.com
352b070d46 Docs for bug 281876: There is now a UI to edit legal values - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215595 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:43:02 +00:00
bugzilla%arlen.demon.co.uk
4135bffe35 Bug 185270 Shortcut key to open link in new tab, Insert (background) or Shift+insert (foreground) p=aqualon@aquachan.de r=cst sr=neil
git-svn-id: svn://10.0.0.236/trunk@215594 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:37:30 +00:00
ghendricks%novell.com
0c10578c3b Allow user to choose components from other products when creating a test case.
git-svn-id: svn://10.0.0.236/trunk@215593 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:29:59 +00:00
sspitzer%mozilla.org
d13f814777 fix for bug #358784: implement Firefox 2.0 style "View | By Date" and "View | By Date and Site" for places based history sidebar (GROUP_BY_DAY)
r=g#,brettw


git-svn-id: svn://10.0.0.236/trunk@215591 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 23:02:16 +00:00
cvshook%sicking.cc
63363e3091 Bug 361399: txXPathOptimizer::optimizePath is horked. r/sr=peterv
git-svn-id: svn://10.0.0.236/trunk@215589 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 22:48:21 +00:00
bienvenu%nventure.com
4c5921dfa5 maintain keywords when copying local messages to imap servers, sr=mscott, part of 360463
git-svn-id: svn://10.0.0.236/trunk@215586 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 22:12:23 +00:00
bienvenu%nventure.com
c5a1515644 fix bug 294296 misleading error message when domain not found, patch by ch.ey@gmx.net, r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215585 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 21:38:27 +00:00
cvshook%sicking.cc
2b2f4b6167 Don't return nsDerivedSafe when .get() is explicitly used on nsCOMPtr and nsRefPtr. r/sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@215584 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 21:28:14 +00:00
brendan%mozilla.org
9080dc9b41 Fix watchpoint pseudo-frame to have non-null pc field (361360, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215583 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 21:23:18 +00:00
lpsolit%gmail.com
5e3484562b Docs for bug 284629: maildeliverymethod -> mail_delivery_method
git-svn-id: svn://10.0.0.236/trunk@215582 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 21:19:26 +00:00
bent.mozilla%gmail.com
baa408b3f0 Bug 361425 - "<xul:titlebar> element needs to support 'allowevents' attribute". r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@215577 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 21:04:49 +00:00
lpsolit%gmail.com
6f013390e6 Documentation for bug 180879: flags changes can be restricted to a grant and request groups - Patch by me, r=myk
git-svn-id: svn://10.0.0.236/trunk@215567 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 20:45:50 +00:00
bugzilla%standard8.demon.co.uk
c886c0d4fa Bug 361161 Reporter doesn't work for suiterunner (MOZ_XUL_APP=1) builds. r=raccettura.
git-svn-id: svn://10.0.0.236/trunk@215560 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 19:02:16 +00:00
ghendricks%novell.com
e7f91fda70 Allow plan owner to delete a test case that only appears in plans she owns.
git-svn-id: svn://10.0.0.236/trunk@215559 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 18:56:27 +00:00
mvl%exedo.nl
07ad39152a back out entire patch to fix bustage
git-svn-id: svn://10.0.0.236/trunk@215558 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 18:18:11 +00:00
joshmoz%gmail.com
d0dc9d0735 handle horizontal scrollbar height metric in mac look and feel. b=360860 r=hwaara sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@215557 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 17:41:10 +00:00
bienvenu%nventure.com
07647dfd2e fix 122006 expanding news server with keyboard should update group counts, patch by sgautherie.bz@free.fr, r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215555 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 17:14:51 +00:00
mvl%exedo.nl
d5b1b5782c bustage fix. don't try to build a missing file
git-svn-id: svn://10.0.0.236/trunk@215554 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 17:07:04 +00:00
bzbarsky%mit.edu
5ae2d8453d Fix MingW build bustage. Bug 361386, review pending.
git-svn-id: svn://10.0.0.236/trunk@215553 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 16:50:56 +00:00
brendan%mozilla.org
2b5a854e96 Fix from Martin Husemann <martin@NetBSD.ORG> for int-instead-of-ptrdiff_t abusage (361362, r=me).
git-svn-id: svn://10.0.0.236/trunk@215550 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 16:32:49 +00:00
bienvenu%nventure.com
324d2af046 fix handling of SMTP 50x status failures, and send QUIT on errors in general, 360118 and 62836, patch by ch.ey@gmx.net, r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215548 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 16:25:23 +00:00
aaronleventhal%moonset.net
8019a586c3 Bug 349885. GetAccessibleFor() doesn't look if ally nodes are allowed inside anon content. Second patch for hang fix. Patch by surkov. r=evan.yan, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215545 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 14:57:53 +00:00
daniel.boelzle%sun.com
8271f2c004 Bug 340949: error handling, refresh, startup opt, search for calendars, alarm defaults, minor cleanup
git-svn-id: svn://10.0.0.236/trunk@215544 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 12:53:58 +00:00
bclary%bclary.com
ed3ddaff41 JavaScript Test - regression test for bug 355339, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215543 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 11:08:36 +00:00
neil%parkwaycc.co.uk
a473301c22 Whitespace/comment cleanup b=361248 p=gautheri@noos.fr r=IanN sr=me
git-svn-id: svn://10.0.0.236/trunk@215542 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 11:05:17 +00:00
bclary%bclary.com
858e6ae5b4 JavaScript Test - regression tests for bug 355832, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215541 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 10:42:57 +00:00
longsonr%gmail.com
e161e8d4ff Bug 361015 - Crash [@ nsSVGGFrame::GetCanvasTM] with gradient and removing transform attribute
git-svn-id: svn://10.0.0.236/trunk@215540 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 10:22:49 +00:00
bclary%bclary.com
85e175f6b7 JavaScript Test - regression test for bug 361274, by Jason Sachs
git-svn-id: svn://10.0.0.236/trunk@215539 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 10:18:06 +00:00
brendan%mozilla.org
20f64c317c Fix which property tree node is saved as wp->sprop (355339, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215537 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 06:52:48 +00:00
masayuki%d-toybox.com
2915a5c9e9 Bug 352174 need font-family resolver (cannot resolve alias of font family / is not checking whether the specified font family is installed the system) r=pavlov+vlad
git-svn-id: svn://10.0.0.236/trunk@215536 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 06:31:04 +00:00
ginn.chen%sun.com
e0344c2733 Bug 360184 Accessible row/column and row/column header of tables are incorrect
patch by Evan.Yan@sun.com r=aaronleventhal


git-svn-id: svn://10.0.0.236/trunk@215535 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 05:34:28 +00:00
bzbarsky%mit.edu
d02dcab10e Improve comments. Bug 361222, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215532 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 04:40:37 +00:00
bzbarsky%mit.edu
177e6f21d3 Fix bug 352728, r+sr=peterv
git-svn-id: svn://10.0.0.236/trunk@215531 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 04:38:00 +00:00
bzbarsky%mit.edu
fd869ecd16 Create URIs correctly. Bug 353731, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215529 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 04:21:59 +00:00
bzbarsky%mit.edu
448f9e4773 Add reftest for processing instructions (CSS and overlay) in XUL documents.
Bug 319654, sr=dbaron, r= pending.


git-svn-id: svn://10.0.0.236/trunk@215528 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 04:19:14 +00:00
jshin%mailaps.org
8c31574b06 bug 352365 fix some unicode/character encoding/string issues in nsIEProfileMigrator : r=biesi, sr=darin
git-svn-id: svn://10.0.0.236/trunk@215523 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 02:03:39 +00:00
jst%mozilla.org
f385a08fc8 Fixing bug 355482. Allow focusing of other windows from code where popups are enabled. r+sr=bugmail@sicking.cc
git-svn-id: svn://10.0.0.236/trunk@215520 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 01:40:33 +00:00
nboyd%atg.com
55d78aeb29 Update newsgroup information.
git-svn-id: svn://10.0.0.236/trunk@215519 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 01:40:15 +00:00
scott%scott-macgregor.org
061528b8cc Bug #359191 --> mingw build error because mapi isn't built for mingw. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215517 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 01:17:01 +00:00
ghendricks%novell.com
7d83c10bc2 Fixed clone with these test cases and added server push to clone
git-svn-id: svn://10.0.0.236/trunk@215515 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-21 00:25:45 +00:00
cst%yecc.com
051dfdfb37 Bug 356703 Browsers associated with closed tabs aren't loading a blank document
r=neil sr=jag


git-svn-id: svn://10.0.0.236/trunk@215511 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 23:39:08 +00:00
lpsolit%gmail.com
55a266f4e3 Bug 233523: Remove the obsolete section about MySQL and enum() fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r=justdave
git-svn-id: svn://10.0.0.236/trunk@215510 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 23:22:37 +00:00
ghendricks%novell.com
cf6a541904 Deleting large test plans caused timeouts. Use sever push to keep alive.
git-svn-id: svn://10.0.0.236/trunk@215508 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 22:51:09 +00:00
scott%scott-macgregor.org
5e8c0569eb Bug #361285 --> nocachedbodybody property is missing a space. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215506 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 22:40:31 +00:00
brendan%mozilla.org
3787915938 Rid CHECK_FOR_STRING_INDEX of ancient NUL terminator dependency (361274, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215505 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 22:37:08 +00:00
wtchang%redhat.com
7a49cef1a2 Bug 357333: upgrade the NSS on the Mozilla trunk to version 3.11.4. The
equivalent patch for the MOZILLA_1_8_BRANCH was reviewed by dveditz.


git-svn-id: svn://10.0.0.236/trunk@215504 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 22:34:45 +00:00
mozilla%weilbacher.org
b95ae1eacf [OS/2] Bug 342239: Fix startup problem when MOZ_NO_REMOTE is set, r/sr=mkaply
git-svn-id: svn://10.0.0.236/trunk@215502 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 22:20:51 +00:00
mnyromyr%tprac.de
c4115d5d99 Bug 130891: Debug and Qa menus not working when navigator closed; p=<stefanh@bluebottle.com>, r/sr=neil
git-svn-id: svn://10.0.0.236/trunk@215501 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 21:59:35 +00:00
silver%warwickcompsoc.co.uk
800bfb2366 Bug 361284 - Dive into nested tables when updating timestamps.
ChatZilla only.
r=silver
p=rdmsoft@bugs.rdmsoft.com (Robert Marshall)


git-svn-id: svn://10.0.0.236/trunk@215500 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 21:59:13 +00:00
mozilla%weilbacher.org
0f189a9c90 [OS/2] Bug 356287: replace possible forward slashes in q:\tmp with backward slashes, r/sr=mkaply
git-svn-id: svn://10.0.0.236/trunk@215497 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 21:06:11 +00:00
lpsolit%gmail.com
0181b1cdf2 Fix glossary.xml as part of bug 360520 (we don't use Mail::Mailer anymore) - Patch by me, r=wurblzap
git-svn-id: svn://10.0.0.236/trunk@215496 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 20:58:57 +00:00
philringnalda%gmail.com
192a17e851 Bug 358264: Use Current Page(s) button is blank when no browser window is open, r=mano
git-svn-id: svn://10.0.0.236/trunk@215495 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 20:55:25 +00:00
philringnalda%gmail.com
6719e98aad Bug 288079: Cancel customizing toolbars hides buttons placed before menuitems, take two, don't break things version, r+a=mscott
git-svn-id: svn://10.0.0.236/trunk@215494 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 20:32:35 +00:00
bienvenu%nventure.com
4f70dd7e60 fix 360409 mail with messed up references seem to disappear, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215492 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:54:02 +00:00
brendan%mozilla.org
3efdc52e54 Fix from Gavin Reaney <gavin@picsel.com> for OOM/should-be-OOM bugs (361273, r=me).
git-svn-id: svn://10.0.0.236/trunk@215491 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:53:38 +00:00
lpsolit%gmail.com
c164582ccc Docs for bug 245877: use testagent.cgi and testserver.pl to test your installation - Patch by me, r=justdave
git-svn-id: svn://10.0.0.236/trunk@215490 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:52:32 +00:00
brendan%mozilla.org
c977ca6f70 Warning fix.
git-svn-id: svn://10.0.0.236/trunk@215489 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:49:28 +00:00
brendan%mozilla.org
c7a38e1687 Fix JSOP_SETSP (and an assertion in JSOP_LEAVEBLOCK*) to cope with empty destructuring (355832, r=mrbkap).
git-svn-id: svn://10.0.0.236/trunk@215487 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:30:41 +00:00
vladimir%pobox.com
f1959a5f87 b=349837, cairo crash in _cairo_clip_init_deep_copy; upstream patch, r=vlad
git-svn-id: svn://10.0.0.236/trunk@215486 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:30:27 +00:00
bugzilla%standard8.demon.co.uk
0812c0224d Bug 358333 Hook up nsIAbDirectory::supportsMailingLists to Address Book UI. p=Paul Tomlin,r=me,mscott,sr=neil
git-svn-id: svn://10.0.0.236/trunk@215484 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:07:55 +00:00
lpsolit%gmail.com
faede0b2e9 Fix nits about bug 316797
git-svn-id: svn://10.0.0.236/trunk@215483 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:05:49 +00:00
lpsolit%gmail.com
02c1f1227b Bug 316797: Token.pm needs POD - Patch by Frédéric Buclin <LpSolit@gmail.com> r/a=myk
git-svn-id: svn://10.0.0.236/trunk@215482 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 19:03:40 +00:00
bugzilla%standard8.demon.co.uk
da47b40775 Bug 361223 Read-only fields on ldap cards are no longer readonly (Thunderbird patch) r/sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215481 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:58:53 +00:00
bugzilla%standard8.demon.co.uk
58fa150219 Bug 361223 Read-only fields on ldap cards are no longer readonly (SeaMonkey patch) r/sr=neil
git-svn-id: svn://10.0.0.236/trunk@215480 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:58:00 +00:00
stuart.morgan%alumni.case.edu
32c7b10bbd Camino only - Bug 359907: Bookmarks aren't deleted from bookmarks menu after deletion from bookmark manager. r=hwaara sr=pink
git-svn-id: svn://10.0.0.236/trunk@215479 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:51:22 +00:00
stuart.morgan%alumni.case.edu
df98bb7e2e Camino only - Bug 360644: Rename show/hide bookmarks in toolbar and menu. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@215478 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:40:48 +00:00
scott%scott-macgregor.org
004e8024d2 Bug #357321 --> the default value for blocking remote content should be true.
git-svn-id: svn://10.0.0.236/trunk@215477 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:35:32 +00:00
stuart.morgan%alumni.case.edu
89e3c545c6 Camino only - Bug 358686: pop-up blocker message text is confusing. sr=pink
git-svn-id: svn://10.0.0.236/trunk@215476 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:26:46 +00:00
lpsolit%gmail.com
3adb0f811c Bug 353656: User Interface gets corrupted by multiple localized users resolving bugs as duplicates - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@215475 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:24:56 +00:00
tony%ponderer.org
d1efebb26a bug 343033: 5-10 second delay or hang or crash when quitting Cocoa Firefox
patch: cancel background download as soon as user quits
r=darin


git-svn-id: svn://10.0.0.236/trunk@215474 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 18:24:01 +00:00
lpsolit%gmail.com
41829c181d Bug 360520: Docs need to be changed to include info about the Email:: modules instead of the Mail:: modules - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=Colin
git-svn-id: svn://10.0.0.236/trunk@215473 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:57:16 +00:00
enndeakin%sympatico.ca
d472bba520 Bug 346787, add binding for spellchecking in XUL textboxes
git-svn-id: svn://10.0.0.236/trunk@215472 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:45:10 +00:00
bienvenu%nventure.com
445a79c32c fix crash during import of outlook (and other e-mail sources) messages with lines longer than 990 chars, and sending of messages with lines longer than that, sr=mscott 182231
git-svn-id: svn://10.0.0.236/trunk@215470 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:28:11 +00:00
ghendricks%novell.com
5bcb0906e9 Subelements weren't checking for properties as children
git-svn-id: svn://10.0.0.236/trunk@215469 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:09:26 +00:00
benjamin%smedbergs.us
e6f5a47e35 Bug 349002, try #2 - Refactor xptcall into a frozen API, r=timeless - with OS/2 fixup by Peter Weilbacher
git-svn-id: svn://10.0.0.236/trunk@215468 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:03:38 +00:00
dschaffe%adobe.com
923f30becc Bug 361282, add tamarin/test/runtests.pl test harness and update tests to pass 100% on windows
git-svn-id: svn://10.0.0.236/trunk@215467 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 17:02:52 +00:00
gijskruitbosch%gmail.com
56ab262c2b Bug 359758 - in /pass <password>, <password> should behave like <rest>
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@215466 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 16:42:26 +00:00
lpsolit%gmail.com
49073731f2 Bug 359956: No requestee field available for attachments on bug creation - Patch by Frédéric Buclin <LpSolit@gmail.com> r=bkor a=justdave
git-svn-id: svn://10.0.0.236/trunk@215465 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 12:28:49 +00:00
michael.buettner%sun.com
c55b8bf8c1 bug #359961 attendee list has some usability issues, r=tbe
git-svn-id: svn://10.0.0.236/trunk@215464 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 12:11:43 +00:00
joshmoz%gmail.com
46e3368dce fix warnings, simple code cleanup. no bug. r=smorgan
git-svn-id: svn://10.0.0.236/trunk@215463 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 05:37:49 +00:00
mkanat%bugzilla.org
e7a12dddc3 Bug 361176: [PostgreSQL] Warning when creating tables for the first time
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215461 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 04:36:25 +00:00
mkanat%bugzilla.org
526d26456d Bug 361175: [PostgreSQL] Too many "NOTICE" messages from checksetup.pl
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215459 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 04:29:55 +00:00
mkanat%bugzilla.org
80e5fb0f5e Bug 361140: Upgrades from versions with enums fail UTF-8 conversion
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215458 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 04:25:09 +00:00
mkanat%bugzilla.org
e18a0f0428 Bug 361158: UTF-8 conversion fails on MySQL 5 (attach_data.id; CHARACTER SET binary NOT NULL)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215457 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 04:24:25 +00:00
ajschult%verizon.net
0b8a964217 Bug 25287: Inappropriate menu items show as enabled when no windows are open. Patch by Stefan Hermes <stefanh@bluebottle.com>, r=mnyromyr, sr=neil.
git-svn-id: svn://10.0.0.236/trunk@215454 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-20 00:03:47 +00:00
sayrer%gmail.com
d797ee2c3d Bug 347897. view source on feeds preview shows contents of wrong page. r=mano
git-svn-id: svn://10.0.0.236/trunk@215453 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 22:54:29 +00:00
bugzilla%babylonsounds.com
693f24069e Fix for Bug 360991 - Migrator: Welcome screen displays message text twice and does not wrap this, p=ctalbert r1=lilmatt r2=mvl
git-svn-id: svn://10.0.0.236/trunk@215452 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 22:41:54 +00:00
gavin%gavinsharp.com
fed10efd79 This file is no longer binary.
git-svn-id: svn://10.0.0.236/trunk@215451 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 22:00:36 +00:00
gavin%gavinsharp.com
8a4292ded2 Fix DOS line endings, too
git-svn-id: svn://10.0.0.236/trunk@215450 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 21:44:15 +00:00
gavin%gavinsharp.com
26b122a5a4 This file is no longer binary.
git-svn-id: svn://10.0.0.236/trunk@215449 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 21:41:40 +00:00
emaijala%kolumbus.fi
484f5175e0 Additional fix for bug 324131: Include mouse button states in NS_MOUSE_EXIT
message.
r/sr=roc


git-svn-id: svn://10.0.0.236/trunk@215448 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 21:13:25 +00:00
sayrer%gmail.com
d6df742640 bug 361224. remove an accidentally checked in log line
git-svn-id: svn://10.0.0.236/trunk@215447 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 21:10:28 +00:00
bzbarsky%mit.edu
ee561228eb Back out bug 354600 to fix regressions.
git-svn-id: svn://10.0.0.236/trunk@215446 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 20:23:56 +00:00
ajschult%verizon.net
e7594c6301 Bug 339426: Help on Error console should mention CSS parsing errors. Patch by Bruno 'Aqualon' Escherl <aqualon@aquachan.de>, r=stefanh@bluebottle.com
git-svn-id: svn://10.0.0.236/trunk@215445 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 16:26:14 +00:00
silver%warwickcompsoc.co.uk
d799417fdc Bug 109993 - Use row top difference to keep scroll position.
ChatZilla only.
r=samuel


git-svn-id: svn://10.0.0.236/trunk@215444 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 16:03:14 +00:00
hwaara%gmail.com
72ffd84204 array of pending redraws may leak. r=smorgan, josh, b=360649
git-svn-id: svn://10.0.0.236/trunk@215443 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 13:59:46 +00:00
mozilla.mano%sent.com
7201a6e198 Bug 345955 - Remove obsolete strings from pref locale files. patch from Hasse <hasse@jasajudeju.se>, r=me.
git-svn-id: svn://10.0.0.236/trunk@215442 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 11:12:07 +00:00
mozilla.mano%sent.com
995beb2621 Attempt to fix build bustage from bug 360812
git-svn-id: svn://10.0.0.236/trunk@215441 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 10:54:08 +00:00
sayrer%gmail.com
490a93c63e Bug 360812. RDF uses nsCRT::strdup in getters. r=bsmedberg, sr=bz
git-svn-id: svn://10.0.0.236/trunk@215440 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 08:28:02 +00:00
ted.mielczarek%gmail.com
1b61bc46a4 bug 360938 - Update airbag to svn tip. r=mento
git-svn-id: svn://10.0.0.236/trunk@215439 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 02:47:25 +00:00
mkanat%bugzilla.org
49b6aaec2c Bug 332128: [BUGZILLA] BugzillaMailHandler incorrectly determines where comments start
Patch By Teemu Mannermaa <wicked+bz@etlicon.fi> r=mkanat


git-svn-id: svn://10.0.0.236/trunk@215438 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-19 01:50:03 +00:00
nboyd%atg.com
4937940d9e Updates for version 1.6R5.
git-svn-id: svn://10.0.0.236/trunk@215436 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 21:40:11 +00:00
nboyd%atg.com
44b55e86b8 Update from mozilla-org
git-svn-id: svn://10.0.0.236/trunk@215435 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 21:39:12 +00:00
neil%parkwaycc.co.uk
093d4272a3 Bug 361048 Switching from Account Central to a folder doesn't scroll to the newest message r=Mnyromyr
git-svn-id: svn://10.0.0.236/trunk@215434 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 21:07:13 +00:00
mnyromyr%tprac.de
24bb3a14e0 Bug 360359: Fix SeaMonkey manifest file; p=Frank Wein <bugzilla@mcsmurf.de>, r/sr=jag
git-svn-id: svn://10.0.0.236/trunk@215433 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 21:05:51 +00:00
mattwillis%gmail.com
054cf3c803 bug 357579 - Clean out unused entities. Patch by Cédric Corazza <cedric.corazza@wanadoo.fr>, r=ctalbert,lilmatt
git-svn-id: svn://10.0.0.236/trunk@215429 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 17:05:27 +00:00
mkanat%bugzilla.org
539d239966 Checkin fix for Bug 280633, which didn't work when the utf8 parameter was turned on.
git-svn-id: svn://10.0.0.236/trunk@215428 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 15:54:59 +00:00
mattwillis%gmail.com
f869fa9af9 bug 361108 - Make compareItems() actually compare different things. Patch by Bruno Browning <browning@uwalumni.com>, r1=lilmatt, r2=jminta
git-svn-id: svn://10.0.0.236/trunk@215427 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 15:17:48 +00:00
mkanat%bugzilla.org
557e1e7b38 Bug 304550: Bugzilla should always store data in MySQL as UTF-8
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215426 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 15:10:12 +00:00
mkanat%bugzilla.org
aa45e8ccd9 Bug 280633: Tools to migrate existing legacy encoded database to UTF-8 (Unicode)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215425 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 15:00:28 +00:00
justdave%bugzilla.org
a9c4a64388 Bug 360427: Add RBL support for blocking open proxies
r=gerv


git-svn-id: svn://10.0.0.236/trunk@215422 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 07:50:31 +00:00
Olli.Pettay%helsinki.fi
f8115d25d5 Bug 360928, Un-inline nsWeakFrame a bit, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215421 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 06:38:15 +00:00
martijn.martijn%gmail.com
6d449cb149 Bug 348357 - should nsGlobalWindow::Focus() return NS_ERROR_FAILURE or NS_OK if we try to set focus on a disabled element?, r=jst, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215420 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 06:36:58 +00:00
Olli.Pettay%helsinki.fi
6a8d5eaf45 bug 361058, gcc2.95.3 fails to compile nsListBoxBodyFrame.cpp, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215419 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 04:42:20 +00:00
emaijala%kolumbus.fi
2ace633d9c Fix for bug 324131: Persisting tooltip on desktop after minimizing
r/sr=roc


git-svn-id: svn://10.0.0.236/trunk@215418 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 03:09:53 +00:00
stridey%gmail.com
c8f740fedb Camino only - Bug 361001: Bookmarks import only imports iCab 2 bookmarks, not iCab 3 bookmarks. Redonkulous patch by cl <bugzilla@chrislawson.net>. r=ardissone sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@215417 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 01:28:40 +00:00
mats.palmgren%bredband.net
77dba5b664 Make NS_LIKELY/NS_UNLIKELY accept pointers etc and always return 0 or 1. b=340244 r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@215416 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-18 00:48:56 +00:00
bzbarsky%mit.edu
f0caa7c822 Report the right URI in the warning. Bug 360863, patch by Nickolay Ponomarev
<asqueella@gmail.com>, r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@215415 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 22:45:52 +00:00
bzbarsky%mit.edu
7366a8ee51 Fix bug 356005. Patch by Benoit <benoit@gawab.com>, r=ctho, sr=neil
git-svn-id: svn://10.0.0.236/trunk@215414 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 22:42:59 +00:00
hwaara%gmail.com
f985e25662 Make the "Choose application..." dialogs work on Cocoa. r=josh, b=356521
git-svn-id: svn://10.0.0.236/trunk@215413 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 22:25:06 +00:00
wtchang%redhat.com
e821436a2f Bugzilla Bug 361076: removed code that handled multiple NSPR threading
implementations.  We only use the pthreads-based implementation now.
r=christophe.ravel.


git-svn-id: svn://10.0.0.236/trunk@215412 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 21:57:14 +00:00
dougt%meer.net
c819a11d29 Vista - Sets the current process as dpi aware. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215411 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 19:42:04 +00:00
ghendricks%novell.com
c562a79f58 Added count of cases to a run
git-svn-id: svn://10.0.0.236/trunk@215410 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 18:07:12 +00:00
ghendricks%novell.com
c56854b71d Cleared some confusion about the append button on short-form
git-svn-id: svn://10.0.0.236/trunk@215409 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 18:01:05 +00:00
stuart.morgan%alumni.case.edu
a01594daab Camino only - Bug 361017: Remove compile-time 10.2 cruft. r/sr=josh
git-svn-id: svn://10.0.0.236/trunk@215408 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 18:00:49 +00:00
ghendricks%novell.com
ce57a916ae Should use view_count instead of list_count when checking for large queries
git-svn-id: svn://10.0.0.236/trunk@215407 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 17:07:10 +00:00
ghendricks%novell.com
9333d59e6c TestCaseRun obliterate doesn't delete the history.
git-svn-id: svn://10.0.0.236/trunk@215406 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 16:41:05 +00:00
neil%parkwaycc.co.uk
5d5b3565a9 More stuff for bug 17796 that got mislaid somehow
git-svn-id: svn://10.0.0.236/trunk@215405 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 15:43:27 +00:00
bugzilla%standard8.demon.co.uk
ed16c54e16 Bug 122006 Expanding (Imap / news server) account with keyboard doesn't check for new messages. r=bienvenu,sr=Neil.
git-svn-id: svn://10.0.0.236/trunk@215404 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 14:00:18 +00:00
gerv%gerv.net
196e4f2984 Bug 358399 - improve address munging, to see if it helps.
git-svn-id: svn://10.0.0.236/trunk@215403 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 13:08:39 +00:00
longsonr%gmail.com
1a90b8f0fb Bug 354295 - revert stroke change and honour opacity
git-svn-id: svn://10.0.0.236/trunk@215400 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 10:12:12 +00:00
hwaara%gmail.com
c9b6ac5494 "XUL menu only hilights items on mouseover the first time opened". r=josh, sr=pavlov, b=356528
git-svn-id: svn://10.0.0.236/trunk@215399 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 09:27:22 +00:00
stuart.morgan%alumni.case.edu
7a85826915 Camino only - Moved KeychainService from src/browser/ to src/formfill; part of bug 172842. sr=pink
git-svn-id: svn://10.0.0.236/trunk@215396 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 05:38:06 +00:00
sayrer%gmail.com
1173d9db39 bug 361005. remove nsCRT::strdup from layout. r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@215393 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 01:49:06 +00:00
christophe.ravel.bugs%sun.com
ec214972a0 335454: Unable to find library 'libsoftokn3.sl' on HP-UX 64 bit
r=nelson, sr=wan-teh


git-svn-id: svn://10.0.0.236/trunk@215392 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 01:33:15 +00:00
ccooper%deadsquid.com
1fba627a8d - fix editing of testgroups
git-svn-id: svn://10.0.0.236/trunk@215391 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 01:25:15 +00:00
neil.williams%sun.com
7792b97dfd bug 360818, set RPATH for signtool, signver
r=wan-teh, nelson


git-svn-id: svn://10.0.0.236/trunk@215390 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 01:16:53 +00:00
jst%mozilla.org
da2a39488b Attempt at fixing bug 358755. Revert the code in nsWindowSH::NewResolve() to create new innner windows in the same cases that it did before bug 355161 was fixed. r+sr=bzbarsky@mit.edu
git-svn-id: svn://10.0.0.236/trunk@215389 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 01:06:41 +00:00
mike.morgan%oregonstate.edu
400a545021 Added check for v2 URIs so we don't offer updates to borked installs. See discussion in bug 360127.
git-svn-id: svn://10.0.0.236/trunk@215388 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 00:54:13 +00:00
ghendricks%novell.com
66191e4426 cloning a run with selected cases only clones the first 25
git-svn-id: svn://10.0.0.236/trunk@215387 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 00:21:44 +00:00
olav%bkor.dhs.org
791537cd36 Bug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed: Field 'status_whiteboard' "....
Patch by Olav Vitters <olav@bkor.dhs.org> r=gavins a=justdave


git-svn-id: svn://10.0.0.236/trunk@215386 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 00:18:46 +00:00
Olli.Pettay%helsinki.fi
f8daaf1315 Still trying to fix mac builds, bug Bug 354694
git-svn-id: svn://10.0.0.236/trunk@215385 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-17 00:02:49 +00:00
ghendricks%novell.com
989d9bb0a6 Fixed a broken link on plan page
git-svn-id: svn://10.0.0.236/trunk@215384 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 23:45:15 +00:00
Olli.Pettay%helsinki.fi
c92d99c8da Trying to fix mac builds, bug Bug 354694
git-svn-id: svn://10.0.0.236/trunk@215383 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 23:34:09 +00:00
ghendricks%novell.com
5f8093597b Add byid option to TestPlan getter methods
git-svn-id: svn://10.0.0.236/trunk@215382 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 23:31:52 +00:00
Olli.Pettay%helsinki.fi
1b4d4c038e Trying to fix mac builds, bug Bug 354694
git-svn-id: svn://10.0.0.236/trunk@215381 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 23:30:54 +00:00
mnyromyr%tprac.de
b981f3d64a Bug 17796: fix typo in MsgReplyToAllRecipients
git-svn-id: svn://10.0.0.236/trunk@215380 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 23:11:24 +00:00
ghendricks%novell.com
44890eab4b Synch with r2389
git-svn-id: svn://10.0.0.236/trunk@215379 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 22:46:46 +00:00
peterv%propagandism.org
07e7060f29 Try to fix bustage, it's all sicking's fault\!
git-svn-id: svn://10.0.0.236/trunk@215378 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 22:40:34 +00:00
ghendricks%novell.com
9478c2c1c6 Submit button doesn't work when changing the name of a category
git-svn-id: svn://10.0.0.236/trunk@215377 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 22:39:21 +00:00
Olli.Pettay%helsinki.fi
c6025f4ac2 Fixing mac builds, bug Bug 354694
git-svn-id: svn://10.0.0.236/trunk@215376 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 22:37:23 +00:00
Olli.Pettay%helsinki.fi
2410bee72f Last checkin was for Bug 354694
git-svn-id: svn://10.0.0.236/trunk@215374 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 21:57:08 +00:00
ccooper%deadsquid.com
488652005e b=360954
- fix compound indexes for users table


git-svn-id: svn://10.0.0.236/trunk@215373 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 21:48:50 +00:00
jwalden%mit.edu
f74f470b92 Bug 360930 - test_file_protocol.js can fail based on execution environment (where TmpD contains a particularly large number of files). r+sr=biesi
git-svn-id: svn://10.0.0.236/trunk@215372 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 21:44:46 +00:00
peterv%propagandism.org
2cec917790 Fix for bug 193678 (support exslt:common - exslt:common functions implementation). r/sr=sicking.
git-svn-id: svn://10.0.0.236/trunk@215371 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 21:42:25 +00:00
Olli.Pettay%helsinki.fi
08df7735f7 Consolidate NS_MOUSE_***_UP/DOWN/CLICK/DBLCLICK events, r=jst,roc,josh,sergei_d,emaijala,mkaply
git-svn-id: svn://10.0.0.236/trunk@215370 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 21:35:39 +00:00
benjamin%smedbergs.us
ea38317460 Backout xptcall because linux tboxes are stupid, I think.
git-svn-id: svn://10.0.0.236/trunk@215369 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 20:17:24 +00:00
stuart.morgan%alumni.case.edu
92fb5422c3 Camino only - switch default C dialect to C99; no bug. sr=pink
git-svn-id: svn://10.0.0.236/trunk@215368 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 19:42:56 +00:00
roc+%cs.cmu.edu
95e8ec26e9 Bug 306149. Make sure only the root view manager participates in mouse event synthesis. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@215365 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:36:14 +00:00
benjamin%smedbergs.us
d7078cf86a Bug 349002 - Refactor xptcall into a frozen API, r=timeless. Includes OS/2 fixup by Peter Weilbacher
git-svn-id: svn://10.0.0.236/trunk@215364 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:29:33 +00:00
sayrer%gmail.com
87a1867328 Bug 360840. allocator mismatch in nsIScriptSecurityManager. r=timeless, sr=bz
git-svn-id: svn://10.0.0.236/trunk@215363 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:25:52 +00:00
emaijala%kolumbus.fi
8ab35fa67b Patch for bug 359518: Gmail , |empty trash now| selects a lot of text before deleting the messages
r/sr=roc


git-svn-id: svn://10.0.0.236/trunk@215362 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:22:19 +00:00
zach%zachlipton.com
9530f75225 Remove Memoize (not mod-perl safe) from BugzillaDBI.pm
git-svn-id: svn://10.0.0.236/trunk@215361 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:21:51 +00:00
tor%cs.brown.edu
39d37a6d0b Bug 360836 - fix svg static accessors. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215359 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 18:07:12 +00:00
bzbarsky%mit.edu
846ce8c90a Improve docs. Bug 350252, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@215358 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:57:18 +00:00
joshmoz%gmail.com
c5f28e3e87 remove files only used by classic mac os. b=281889 r=bsmedberg moa=timeless
git-svn-id: svn://10.0.0.236/trunk@215357 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:56:25 +00:00
bzbarsky%mit.edu
77b17ef48c Make block frames that are not kids of blocks automatically have space managers
(and margin roots, except in the columns case) so we don't have to play
whack-a-framestate-flag.  Bug 354600, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@215356 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:51:53 +00:00
neil%parkwaycc.co.uk
4df51ad5f6 Fixing whitespace on new lines checked in for bug 17796
git-svn-id: svn://10.0.0.236/trunk@215355 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:25:35 +00:00
benjamin%smedbergs.us
b90e0d9bd5 Bug 360584 - Add client.mk checkout for Tamarin, r=stejohns/kairo
git-svn-id: svn://10.0.0.236/trunk@215354 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:21:46 +00:00
stuart.morgan%alumni.case.edu
f7f83bede8 Camino only - Bug 342097: Replace _LSCopyApplicationURLsForItemURL with LSCopyApplicationURLsForURL. r/sr=josh
git-svn-id: svn://10.0.0.236/trunk@215353 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 17:02:17 +00:00
Olli.Pettay%helsinki.fi
41ee208c0a Bug 360642, r+enndeakin, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215352 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 15:45:55 +00:00
neil%parkwaycc.co.uk
6f71c273f4 Mnyromyr's comment fixes overlooked in the previous checkin for bug 17796
git-svn-id: svn://10.0.0.236/trunk@215351 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 15:22:02 +00:00
neil%parkwaycc.co.uk
49966da705 Bug 17796 Reply, Reply All, Forward and Next should be dual menubuttons r=Mnyromyr et. al.
git-svn-id: svn://10.0.0.236/trunk@215350 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 15:17:47 +00:00
igor.bukanov%gmail.com
ac743bb14b Bug 360681: properly initialize tvr.count in array_sort. r=brendan
git-svn-id: svn://10.0.0.236/trunk@215349 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 14:35:28 +00:00
longsonr%gmail.com
bfcc9e10ca Bug 354295 - change fill='url(#invalidurl)' behaviour to match Opera/Safari
git-svn-id: svn://10.0.0.236/trunk@215348 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 10:22:51 +00:00
joshmoz%gmail.com
602b0bbb34 remove XP_MAC from xpcom. b=281889 r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215347 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 09:10:09 +00:00
bzbarsky%mit.edu
6d790ddd39 Make the XML templates use CDATA sections for scripts. r=sayrer
git-svn-id: svn://10.0.0.236/trunk@215346 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 07:53:08 +00:00
bzbarsky%mit.edu
3a1d1b8d06 Add test for bug 358660.
git-svn-id: svn://10.0.0.236/trunk@215345 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 07:39:18 +00:00
mats.palmgren%bredband.net
0dd16a9117 Fix a crash related to the hidden window menu bar. Remove obsolete #ifdef XP_MAC. b=358607 r=josh
git-svn-id: svn://10.0.0.236/trunk@215344 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 03:25:55 +00:00
benjamin%smedbergs.us
0ffcb60cbc Bug 360836 - queryinterface isn't nulling the outparam in failure cases, r=dbaron
git-svn-id: svn://10.0.0.236/trunk@215343 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 02:29:45 +00:00
cbiesinger%web.de
8cfbab30c4 trying to fix non-windows bustage (from bug 359808)
git-svn-id: svn://10.0.0.236/trunk@215342 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 01:39:09 +00:00
axel%pike.org
c090d78bc1 bug 360743, add kurdish and georgian to the Firefox build, r=preed
git-svn-id: svn://10.0.0.236/trunk@215341 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 01:16:04 +00:00
jshin%mailaps.org
d01aef3d04 bug 359808 : drop support for Win 9x/ME : r/sr=darin
git-svn-id: svn://10.0.0.236/trunk@215340 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 01:00:49 +00:00
jshin%mailaps.org
12f38f5ea7 bug 359808 : drop support for Win 9x/ME (r/sr=darin)
git-svn-id: svn://10.0.0.236/trunk@215339 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 00:59:55 +00:00
joshmoz%gmail.com
800c97e721 remove XP_MAC from mailnews. b=281889 r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215338 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-16 00:22:53 +00:00
stridey%gmail.com
2e1219f34b Camino only - Bug 331576: Determine locale of UA string dynamically. Also fixes 335026 and 336061. Patch by mento <mark@moxienet.com>. r=hwaara sr=pink
git-svn-id: svn://10.0.0.236/trunk@215336 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 23:39:30 +00:00
stuart.morgan%alumni.case.edu
7b5321baef Camino only - Bug 152147: Ability to save session state. r=josh sr=pink
git-svn-id: svn://10.0.0.236/trunk@215333 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:57:39 +00:00
stuart.morgan%alumni.case.edu
a774880390 Camino only - Bug 152147: Ability to save session state. r=josh sr=pink
git-svn-id: svn://10.0.0.236/trunk@215331 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:57:12 +00:00
joshmoz%gmail.com
936ed54e62 remove XP_MAC from mail. b=281889 r=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215330 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:44:20 +00:00
mnyromyr%tprac.de
587473c841 Bug 360144: bad filename in link in privacy_help.xhtml; p=Giacomo Magnini <giacomo.magnini@portalis.it>, r=stefanh
git-svn-id: svn://10.0.0.236/trunk@215329 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:20:35 +00:00
ghendricks%novell.com
c03d2472f7 Bugzilla Bug 360834
Software Error when searching for an Environment


git-svn-id: svn://10.0.0.236/trunk@215327 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:11:13 +00:00
benjamin%smedbergs.us
c408305383 Bug 313309 - Table-driven QI, part 4 (the final piece!) - this could be a test-landing depending on how perf numbers turn out, r=shaver
git-svn-id: svn://10.0.0.236/trunk@215326 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:10:57 +00:00
stejohns%adobe.com
5c885420b3 Bug 360829: enabling new warnings and correcting code as necessary.
git-svn-id: svn://10.0.0.236/trunk@215325 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 22:04:54 +00:00
stuart.morgan%alumni.case.edu
caa307638b Camino only - Bug 355808: Popup suppressed silently. r/sr=pink
git-svn-id: svn://10.0.0.236/trunk@215324 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 21:40:10 +00:00
joshmoz%gmail.com
c9f4afe915 remove XP_MAC from network. b=281889 r=darin
git-svn-id: svn://10.0.0.236/trunk@215323 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 21:38:48 +00:00
stuart.morgan%alumni.case.edu
f15614f193 Camino only - Missed file from bug 360345: bookmark code style cleanup. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@215322 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 21:34:29 +00:00
ghendricks%novell.com
6f67119dc2 Synching with revision 2385
git-svn-id: svn://10.0.0.236/trunk@215321 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 21:30:13 +00:00
ghendricks%novell.com
c0d3974394 Added check for 2.22.1 in tr_install to use the right patch.
git-svn-id: svn://10.0.0.236/trunk@215320 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 20:31:10 +00:00
dougt%meer.net
f64bec4f82 minimo.mk is not used nor should be. See http://www.mozilla.org/projects/minimo/develop.html for how to build minimo. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215319 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 19:37:23 +00:00
sspitzer%mozilla.org
d7edfc999e fix for bug #358080: Update window says to click 'Finish' when button is labeled 'Done'
r=darin

thanks to Hiro-san (sugar.waffle@gmail.com) for the fix.


git-svn-id: svn://10.0.0.236/trunk@215317 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 17:10:21 +00:00
daniel.boelzle%sun.com
a2836b3103 Bug 340949: no more event queue locking, minor fixes and cosmetics
git-svn-id: svn://10.0.0.236/trunk@215316 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 17:01:43 +00:00
aaronleventhal%moonset.net
bf5bdadd37 Bug 360106. Errors in logic for nsHTMLTableAccessible::IsProbablyForLayout(). r=evan.yan
git-svn-id: svn://10.0.0.236/trunk@215315 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 16:14:45 +00:00
neil%parkwaycc.co.uk
2ef5ea60d1 Fix for invalid active window assertion b=265383 r=ere sr=roc
git-svn-id: svn://10.0.0.236/trunk@215313 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 12:05:56 +00:00
hwaara%gmail.com
cab56a57ee Create new mozAccessible class that takes care of text-specific notifications and attributes. r=surkov, b=354447
Create simplified subclass action elements such as checkboxes, buttons and radiobuttons. This makes them speak in voiceover, and also makes Google.com work (to some extent). r=surkov, b=357805

Make mac accessible wraps able to know that some roles are "flat". It means we can restrict certain roles to be childless. For example, a button that has a text child makes no sense on mac (and also breaks things). Also make fetching the children array speedier using nsTArray. r=ginn, b=357804

Add lots of new attributes to mozAccessible, improve performance of it and much more. r=surkov, r=josh for widget changes, b=358381


git-svn-id: svn://10.0.0.236/trunk@215312 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 11:08:14 +00:00
lpsolit%gmail.com
3aeba14c4b Bug 274951: Improve the contrast for enhancement bugs in buglists - Patch by Wayne Mery "WSM" <vseerror@lehigh.edu> r=LpSolit a=justdave
git-svn-id: svn://10.0.0.236/trunk@215311 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 10:44:15 +00:00
martijn.martijn%gmail.com
c28db3bd2c Bug 355395 - Misspelled words in text areas cause all following text to disappear during print, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215310 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 06:39:25 +00:00
Olli.Pettay%helsinki.fi
106f55f363 Bug 359494, Make nsXBLWindowHandler to use nsISupportsWeakReference, not nsIBoxObject, r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@215309 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 06:11:42 +00:00
mkaply%us.ibm.com
d045b963c6 #329299
r/sr=roc
Add system exception handling around the call to StretchDIBits - it fails on some printer drivers


git-svn-id: svn://10.0.0.236/trunk@215308 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 05:39:32 +00:00
leon.sha%sun.com
f04e1f5eca Bugzilla Bug 356045
xul tree-table, cells in the first row are exposed in a mess.
Patch by Evan.Yan@Sun.COM.
ginn.chen: review+
aaronleventhal: review+


git-svn-id: svn://10.0.0.236/trunk@215307 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 05:29:09 +00:00
philringnalda%gmail.com
91d475c106 Bug 347615: Feed related strings in content.dtd should be removed, patch by <cedric.corazza@wanadoo.fr>, r=gavin
git-svn-id: svn://10.0.0.236/trunk@215306 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 03:45:32 +00:00
peterv%propagandism.org
a2c2023c89 Try to fix ports bustage.
git-svn-id: svn://10.0.0.236/trunk@215305 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 01:38:31 +00:00
edburns%acm.org
1879d39cea Add new first argument to PlugletFactory.initialize(): the string that
is the path to the jar from which the pluglet is loaded.

SECTION: Changes

M classes/org/mozilla/pluglet/PlugletFactory.java
M classes/org/mozilla/pluglet/PlugletFactoryAdaptor.java

- Add new first argument to PlugletFactory.initialize(): the string that
  is the path to the jar from which the pluglet is loaded.

M examples/MediaPlayer/JMPlayer.java
M test/test.java

- Account for new first argument

M src/PlugletFactory.cpp

- new JNI signature for initialize.


git-svn-id: svn://10.0.0.236/trunk@215304 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 01:11:42 +00:00
ghendricks%novell.com
7b06962b2a Added patch for 2.22.1
git-svn-id: svn://10.0.0.236/trunk@215302 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 00:44:28 +00:00
peterv%propagandism.org
f57752e9b2 Try to uninline constructor and destructor again to reduce codesize increase.
git-svn-id: svn://10.0.0.236/trunk@215301 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 00:31:52 +00:00
nelson%bolyard.com
13a3479910 Export two new functions that were added in NSS 3.11:
SSL_ForceHandshakeWithTimeout and SSL_ReHandshakeWithTimeout
Bug 127960. r=alexei.volkov,wtchang


git-svn-id: svn://10.0.0.236/trunk@215300 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-15 00:18:02 +00:00
stridey%gmail.com
9eb351894d Camino only - Bug 155956: Make 'zoom' button zoom window to fit contents. Patch by Torben <torben@Spamfence.net>. r=hwaara sr=pink
git-svn-id: svn://10.0.0.236/trunk@215299 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 23:52:43 +00:00
cpeyer%adobe.com
e1e84329d2 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@215298 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 23:42:06 +00:00
stridey%gmail.com
7094caaa22 Camino only - Bug 325845: Esc should cancel incomplete edit, not commit it, when closing Bookmark Info panel. r=Wevah sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@215297 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 23:34:59 +00:00
peterv%propagandism.org
0c7d5f0dc4 Part of the fix for bug 193678 (support exslt:common - allow txXPathNode to hold a strong ref to its root). r/sr=sicking.
git-svn-id: svn://10.0.0.236/trunk@215296 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 23:23:20 +00:00
benjamin%smedbergs.us
52582314d0 From bug 313309 - fix static-iid declarations, which merged badly in the meantim
git-svn-id: svn://10.0.0.236/trunk@215293 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 23:12:10 +00:00
ccooper%deadsquid.com
86c4631e44 - include subgroup_testgroups table
git-svn-id: svn://10.0.0.236/trunk@215291 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:50:05 +00:00
bzbarsky%mit.edu
d9cf9faf6c Remove securityCompareURIs() from nsIScriptSecurityManager. Bug 327243, r+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215290 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:46:45 +00:00
bzbarsky%mit.edu
769c6eb18d Part of fix for bug 359341 that somehow didn't make it in the first time. r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215289 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:32:40 +00:00
bzbarsky%mit.edu
a308018d0e Once we find a window, stop looking, dammit. Bug 360579, s+sr=jst
git-svn-id: svn://10.0.0.236/trunk@215288 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:30:33 +00:00
wsharp%adobe.com
51f1acd6d8 intptr to uintptr
git-svn-id: svn://10.0.0.236/trunk@215287 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:21:11 +00:00
benjamin%smedbergs.us
5d1671cd01 Fix extraneous semicolon
git-svn-id: svn://10.0.0.236/trunk@215286 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:18:51 +00:00
wsharp%adobe.com
7f993b98cd bug 360720. various 64-bit type fixes.
git-svn-id: svn://10.0.0.236/trunk@215285 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:15:14 +00:00
tony%ponderer.org
851ef602be Bug 356355: numeric domain normalization only happens on enchash table values
patch v2 (additional fixes)
r=mmchew


git-svn-id: svn://10.0.0.236/trunk@215284 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:12:08 +00:00
joshmoz%gmail.com
a124bbcf35 Since some platforms do string operations within local file ::Load, we shouldn't declare that objects being created/destroyed from static ctor/dtor is not legal throughout the entire ::Load function. That only needs to be true around the actual PR_LoadLibrary calls. Fixing this stops the ridiculous amount of warning output that we get from every debug mac build. Also removing unused old mac local file impls. b=326837 r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215283 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 22:06:00 +00:00
mozilla.mano%sent.com
f8200ed000 Bug 349128 - Focus lost pressing enter in empty location bar. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215282 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:57:10 +00:00
dschaffe%adobe.com
51309b205f bug 360596 cleanup the tamarin tests source, all tests pass, the test harness to run the tests will be added soon, also the abc code for each test will hopefully get hosted on the ftp site since we do not have a compiler to create the test abc files yet
git-svn-id: svn://10.0.0.236/trunk@215281 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:34:32 +00:00
ccooper%deadsquid.com
4becc1a826 - fix check for testcase ID
git-svn-id: svn://10.0.0.236/trunk@215280 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:32:07 +00:00
benjamin%smedbergs.us
77a3de15dd Bug 345517 additional fixup - don't use some additional unfrozen methods, r=gavin
git-svn-id: svn://10.0.0.236/trunk@215279 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:25:56 +00:00
benjamin%smedbergs.us
08d43e2b12 Bug 313309 - Table-driven QI part 3 - use weak statics for interface IDs, r=shaver. This will break VC6 and gcc2.9x, which is ok
git-svn-id: svn://10.0.0.236/trunk@215278 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:21:37 +00:00
mattwillis%gmail.com
b37e9d5142 bug 360696 - Follow up fix.
git-svn-id: svn://10.0.0.236/trunk@215277 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:16:18 +00:00
mattwillis%gmail.com
0f29640b19 bug 360696 - Follow up fix. Patch by Clint Talbert <cmtalbert@myfastmail.com>, r1/2=lilmatt
git-svn-id: svn://10.0.0.236/trunk@215275 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 21:06:56 +00:00
olav%bkor.dhs.org
d2fc939359 Do commit-time fix: Add comment explaining the sql modes that are removed
git-svn-id: svn://10.0.0.236/trunk@215273 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 20:51:44 +00:00
lpsolit%gmail.com
728fe40c1c Bug 346091: editparams.cgi should validate the 'timezone' parameter - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit a=justdave
git-svn-id: svn://10.0.0.236/trunk@215272 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 20:45:48 +00:00
ccooper%deadsquid.com
59436c2837 b=355548
- display regression bug ID in simple view of testcase

b=355459
- display enabled/community enabled status in simple testcase view for admin users

b=359744
- display testcases in testcase/subgroup sort order when printing

b=360621
- validate view testcase forms prior to submission

Misc.
- use JSON filters to limit view testcase results
- add enabled toggle for entity form widgets where appropriate


git-svn-id: svn://10.0.0.236/trunk@215269 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 20:23:31 +00:00
mattwillis%gmail.com
fd59c77942 bug 360696 - Strict warning fixes and typo fixes. Patch by Stefan Sitter <ssitter@googlemail.com> r1/2=lilmatt
git-svn-id: svn://10.0.0.236/trunk@215268 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 19:11:42 +00:00
mkanat%bugzilla.org
7e269798bc Bug 349256: Make the webservice get_bug into a stable API
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=mbd, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215267 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 19:10:52 +00:00
lpsolit%gmail.com
379c191ecd Bug 323031: process_bug.cgi crashes when encountering a deleted user account and when strict_isolation is on - Patch by Frédéric Buclin <LpSolit@gmail.com> r=wicked a=justdave
git-svn-id: svn://10.0.0.236/trunk@215266 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 19:02:01 +00:00
lpsolit%gmail.com
b55615039d Bug 115650: No TITLE attribute on buglinks on process_bug.cgi - Patch by victory(_RSZ_) <bmo2007@rsz.jp> r=LpSolit a=justdave
git-svn-id: svn://10.0.0.236/trunk@215265 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 18:30:53 +00:00
despotdaemon
712fa72e5e Pseudo-automatic update of changes made by dansmith@adobe.com.
git-svn-id: svn://10.0.0.236/trunk@215263 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 17:56:20 +00:00
stejohns%adobe.com
f6cd864a4a Bug 360675: fix compiler warnings in VS2003 & VS2005 for some variations of the Microsoft Platform SDK (which includes headers that warn at Warning Level 4)
git-svn-id: svn://10.0.0.236/trunk@215261 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 17:37:37 +00:00
olav%bkor.dhs.org
94221a7da4 Bug 321645: [MySQL 5] MySql Error on insert... "DBD::mysql::st execute failed: Field 'status_whiteboard' "....
Patch by Olav Vitters <olav@bkor.dhs.org> r=mkanat a=justdave


git-svn-id: svn://10.0.0.236/trunk@215260 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 17:17:47 +00:00
wsharp%adobe.com
aaad285dfd reverting changes to shell's project file. These were incorrectly merged in from shel64 project. This should be back to 1.2 now.
git-svn-id: svn://10.0.0.236/trunk@215259 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 15:11:41 +00:00
wsharp%adobe.com
12b863bf53 bug 360602. fix windows build
git-svn-id: svn://10.0.0.236/trunk@215258 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 15:05:57 +00:00
wsharp%adobe.com
79efe73483 update shell64 second time. CVS files were incorrectly copied from shell project causing problems
git-svn-id: svn://10.0.0.236/trunk@215257 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 15:05:14 +00:00
wsharp%adobe.com
19aa3c0839 bug 360602. Mac 64-bit porting work. Switched "IA64" designation to "AMD64". Added AVMPLUS_64BIT target for code that is 64-bit specific instead of x86_64 specific. Other changes listed in bug record - lots of intptr changes, op_abs_jump fixes. 64-bit shell is launching and running until emitNativeThunk which needs 64-bit specific ASM generation.
git-svn-id: svn://10.0.0.236/trunk@215256 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 14:44:27 +00:00
mattwillis%gmail.com
2f15a3e3ee bug 343793 - Edit title immediately after creating event via drag-n-drop. Patch by jminta, r=lilmatt, ctalbert
git-svn-id: svn://10.0.0.236/trunk@215255 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 03:18:30 +00:00
mattwillis%gmail.com
e743a983ac bug 349586 - checkin booboo
git-svn-id: svn://10.0.0.236/trunk@215254 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 02:34:17 +00:00
mattwillis%gmail.com
331253fb00 bug 349586 - Add migrator. Patch by jminta with contributions by lilmatt and ctalbert. r=ctalbert,lilmatt,jminta ui-r=mvl
git-svn-id: svn://10.0.0.236/trunk@215253 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:57:35 +00:00
mattwillis%gmail.com
c5a2b02c04 bug 349586 - Add migrator. Patch by jminta with contributions by lilmatt and ctalbert. r=ctalbert,lilmatt,jminta ui-r=mvl
git-svn-id: svn://10.0.0.236/trunk@215251 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:56:57 +00:00
stejohns%adobe.com
a82e0e4aba added .cvsignore files for Tamarin for common Mac XCode build directories and files.
git-svn-id: svn://10.0.0.236/trunk@215250 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:44:17 +00:00
lpsolit%gmail.com
241c32b21d Bug 360489: Can't locate object method "type_name" via package "Bugzilla::Field" when listing custom fields - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=justdave
git-svn-id: svn://10.0.0.236/trunk@215248 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:18:37 +00:00
stejohns%adobe.com
8290e120b4 added .cvsignore for Tamarin files including VC7/VC8 projects files
git-svn-id: svn://10.0.0.236/trunk@215247 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:18:26 +00:00
wtchang%redhat.com
8f2df656bf Bugzilla Bug 359484: made the fix for bug 341707 work for the SSL2 client
hello case. r=nelsonb,alexei.volkov


git-svn-id: svn://10.0.0.236/trunk@215245 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:09:54 +00:00
stejohns%adobe.com
10f1ddb6c0 Revert incorrect checkin of MMgc.vcproj to correct build breakage
git-svn-id: svn://10.0.0.236/trunk@215244 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:01:08 +00:00
mozilla.mano%sent.com
96b7ed2d03 Bug 348369 - Tabbrowser steals focus any time the current browser changes. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215243 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 01:00:06 +00:00
bzbarsky%mit.edu
4b70414d02 Add a correct license header. Bug 353806, patch by Ryan Jones
<sciguyryan+bugzilla@gmail.com>, r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@215242 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:55:54 +00:00
wtchang%redhat.com
945a67dc99 Bugzilla Bug 360169: changed the value of the _PR_SI_ARCHITECTURE macro
back to "hppa1.1" for backward compatibility. r=nelsonb


git-svn-id: svn://10.0.0.236/trunk@215240 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:50:17 +00:00
tor%cs.brown.edu
784deb978e Bug 355267 - remove svg fragment tree code. r=longsonr, sr=roc
git-svn-id: svn://10.0.0.236/trunk@215239 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:48:33 +00:00
bienvenu%nventure.com
129eea46e5 fix 360409, mail which claims to be a reply to itself, via reference and message-id headers, disappears, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215237 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:28:23 +00:00
stejohns%adobe.com
a71fb0dd06 Bug 360615: fixes for Tamarin to build under VS2005
git-svn-id: svn://10.0.0.236/trunk@215236 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:17:20 +00:00
scott%scott-macgregor.org
7e8e58a410 Bug #357321 --> CardHasEmailAddress is missing a return value.
git-svn-id: svn://10.0.0.236/trunk@215235 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-14 00:16:12 +00:00
ghendricks%novell.com
305e456910 Restrict who can delete what under what circumstances.
git-svn-id: svn://10.0.0.236/trunk@215234 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 23:55:31 +00:00
olav%bkor.dhs.org
a283139c51 Bug 277370: Ability to specify an email address to which notification about all bugs should go
Patch by Guillaume Rousse <guillomovitch@zarb.org> r=bkor a=myk


git-svn-id: svn://10.0.0.236/trunk@215233 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 23:32:29 +00:00
roc+%cs.cmu.edu
eb99fed591 Bug 130078. Integrate view hierarchies, watching for perf results. r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@215232 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 22:59:14 +00:00
bzbarsky%mit.edu
9fa229d896 Additional tweak to the patch for bug 355931 -- fix QI too.
git-svn-id: svn://10.0.0.236/trunk@215230 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 22:20:39 +00:00
bzbarsky%mit.edu
a141643e32 Don't use frames to implement interfaces, dammit. Just don't! Bug 355931, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215229 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 22:05:25 +00:00
bzbarsky%mit.edu
97ddfc98d3 Make sure that first-lines with descendant views will be flagged appropriately.
Bug 291078, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@215228 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:46:12 +00:00
bzbarsky%mit.edu
d62bf91067 Make PRMJ_basetime faster by making it close to O(1) in the year instead of
O(N).  Bug 360484, r=shaver


git-svn-id: svn://10.0.0.236/trunk@215225 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:33:06 +00:00
bzbarsky%mit.edu
6d5fc623cf Fix leaks in thebes and canvas code due to nsIWidget and nsIRenderingContext
being badly documented and not using already_AddRefed when they should.  Bug
359341, r=pavlov, sr=roc


git-svn-id: svn://10.0.0.236/trunk@215224 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:31:53 +00:00
bzbarsky%mit.edu
0f9db8680c When doing ContentRemoved, IndexOf() will always return -1. So don't use it.
Bug 360524, r+sr=roc


git-svn-id: svn://10.0.0.236/trunk@215223 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:27:44 +00:00
mattwillis%gmail.com
e39dcbb163 bug 356740 - Makes NSIS installer remove more obsolete files during install. Patch by Stefan Sitter <ssitter@googlemail.com>, r=lilmatt, mvl
git-svn-id: svn://10.0.0.236/trunk@215222 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:27:00 +00:00
mattwillis%gmail.com
97f0ab1154 bug 360548 - Fixes regression in use of getSelectedItems. Patch by Stefan Sitter <ssitter@googlemail.com>, r=lilmatt,mvl
git-svn-id: svn://10.0.0.236/trunk@215221 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:21:16 +00:00
nboyd%atg.com
dc25e8ae99 Better link for MPL.
git-svn-id: svn://10.0.0.236/trunk@215220 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:12:28 +00:00
rhelmer%mozilla.com
de6a636516 landing corrections for TR Fullhart b=346013 r=rhelmer
git-svn-id: svn://10.0.0.236/trunk@215219 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:12:11 +00:00
nboyd%atg.com
348077ce22 Propagate formatting changes from the mozilla-org CVS repository
git-svn-id: svn://10.0.0.236/trunk@215218 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 21:03:34 +00:00
tor%cs.brown.edu
b72d76a360 Bug 359428 - use cairo to implement feMerge instead of doing it by hand.
Patch by amenzie@us.ibm.com, r=tor, sr=roc


git-svn-id: svn://10.0.0.236/trunk@215217 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:59:18 +00:00
benjamin%smedbergs.us
26f6bedf73 Use 0 instead of NULL in non-pointer context, fixes XCode 2.2 build, r=stejohns
git-svn-id: svn://10.0.0.236/trunk@215216 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:44:52 +00:00
despotdaemon
e5b3fd710a Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@215215 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:44:39 +00:00
tor%cs.brown.edu
dd96b5402c Bug 359449 - gradient on SVG text sometimes using incorrect bounding box.
r=scootermorris, sr=roc


git-svn-id: svn://10.0.0.236/trunk@215214 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:42:42 +00:00
nboyd%atg.com
0d1088b92b Change reference to NPL to MPL.
git-svn-id: svn://10.0.0.236/trunk@215213 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:32:30 +00:00
nboyd%atg.com
2c27be98e2 Add reference to latest BSF version. Remove obsolete link.
git-svn-id: svn://10.0.0.236/trunk@215212 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 20:28:09 +00:00
bugzilla%standard8.demon.co.uk
9cdbd70ea1 Fix build bustage from bug 357321
git-svn-id: svn://10.0.0.236/trunk@215211 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 19:58:46 +00:00
scott%scott-macgregor.org
e682db4e9a bug #357321 --> don't blindly trust address book recipients when loading remote content. Make the user explicitly mark each sender as allowing remote content.
Remove the UI for enabling JS. Remove the now obsolete UI for white listing address book entries. sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@215210 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 18:59:35 +00:00
benjamin%smedbergs.us
aa6587d9ec Removing old decreipt files.
git-svn-id: svn://10.0.0.236/trunk@215209 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 18:54:35 +00:00
benjamin%smedbergs.us
a9ef1f1391 Remove old decrepit files
git-svn-id: svn://10.0.0.236/trunk@215208 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 18:53:15 +00:00
benjamin%smedbergs.us
57edb95b0b Removing old, dead files. r=shaver
git-svn-id: svn://10.0.0.236/trunk@215207 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 18:51:04 +00:00
wtchang%redhat.com
1dc58240b7 Bugzilla Bug 357197: fixed the fallthrough case in ocsp_CertIDsMatch. The
patch is contributed by Steve Parkinson <sparkins@redhat.com>. r=nelson,wtc


git-svn-id: svn://10.0.0.236/trunk@215205 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 18:16:58 +00:00
benjamin%smedbergs.us
2528600cb2 Re-land bug 345517 now that the logging issues are hopefully fixed, r=darin/mento/mano
git-svn-id: svn://10.0.0.236/trunk@215204 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 17:53:01 +00:00
stejohns%adobe.com
6de7c62912 Bug 360310: check in fixes to allow Tamarin to build and link properly with VS2003 on Windows.
git-svn-id: svn://10.0.0.236/trunk@215203 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 17:42:56 +00:00
bugzilla%standard8.demon.co.uk
9b10bdaa4e Bug 360492 nsIAbMDBCard::CopyCard is unused. r/sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215202 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 17:26:33 +00:00
bzbarsky%mit.edu
f2db33f207 Fix col border drawing for cols that are explicitly in the source. Bug 350444,
r=bernd, sr=roc


git-svn-id: svn://10.0.0.236/trunk@215200 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 15:46:52 +00:00
stridey%gmail.com
a7924439e2 Camino only - Bug 323718: Fix crash in [FindDlgController getSearchText:]. r=smorgan sr=pink
git-svn-id: svn://10.0.0.236/trunk@215199 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 15:40:06 +00:00
kjh-5727%comcast.net
3685e4e192 Bug 351229 - Avoid a type-punned pointer warning. r+sr=roc.
git-svn-id: svn://10.0.0.236/trunk@215198 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 14:42:33 +00:00
anton.bobrov%sun.com
968e6d4f82 Bug 357668: merging Sun and Mozilla libldap: bring new srcs unique to Sun branch
git-svn-id: svn://10.0.0.236/trunk@215197 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 13:52:52 +00:00
emaijala%kolumbus.fi
e771555238 Patch for bug 311709: Main browser window stuck in resize
r=neil
sr=roc


git-svn-id: svn://10.0.0.236/trunk@215196 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 12:20:20 +00:00
michael.buettner%sun.com
7689683095 Bug #357147 cloned proxies forget about attendee list r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@215195 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 12:01:47 +00:00
gerv%gerv.net
a1b7ad971e Bug 308950 - add build ID parameter to guided page for non-browser products. Patch by gerv; r=justdave.
git-svn-id: svn://10.0.0.236/trunk@215194 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 11:39:54 +00:00
igor.bukanov%gmail.com
71cbd284df 360282: Debug-only warning about broken FPU state. r=brendan
git-svn-id: svn://10.0.0.236/trunk@215193 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 10:50:40 +00:00
sayrer%gmail.com
ad5496d973 bug 357539. Feed parser does not recognize lastBuildDate field. r=mano
git-svn-id: svn://10.0.0.236/trunk@215192 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 05:35:46 +00:00
mkanat%bugzilla.org
3f166ba059 Checkin fix for bug 360028.
git-svn-id: svn://10.0.0.236/trunk@215191 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 03:08:44 +00:00
mkanat%bugzilla.org
7069b5a5fe Bug 360028: Bugzilla::Search::Saved should have create() and update(), and buglist.cgi should use it
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215190 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 03:07:57 +00:00
mkanat%bugzilla.org
68835c258a Bug 355839: The WebService should provide lists of legal field values
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=mbd, a=myk


git-svn-id: svn://10.0.0.236/trunk@215189 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 03:04:25 +00:00
mkanat%bugzilla.org
2bf008bedf Bug 350307: Split out the create and update functionality of Bugzilla::Field::create_or_update
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=justdave


git-svn-id: svn://10.0.0.236/trunk@215188 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 02:50:17 +00:00
gijskruitbosch%gmail.com
c33e216fec Bug 345315 - /network command is useless
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@215187 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 01:27:33 +00:00
silver%warwickcompsoc.co.uk
171f04c064 ChatZilla 0.9.76, go go go!
git-svn-id: svn://10.0.0.236/trunk@215186 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-13 00:31:47 +00:00
sayrer%gmail.com
de8b61170b test for bug 333983
git-svn-id: svn://10.0.0.236/trunk@215185 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 22:03:01 +00:00
sayrer%gmail.com
835a9041f9 test for bug 343596
git-svn-id: svn://10.0.0.236/trunk@215184 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 21:47:24 +00:00
Olli.Pettay%helsinki.fi
3625d39860 Bug 360058, trying to make sure that document's propertytable doesn't have pointers to deleted nsINodes, r+sr=bz
git-svn-id: svn://10.0.0.236/trunk@215183 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 21:31:11 +00:00
sayrer%gmail.com
326816054a Bug 360062. rid dom/src/base of nsCRT::strdup. r=timeless, sr=jst
git-svn-id: svn://10.0.0.236/trunk@215179 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 15:15:37 +00:00
silver%warwickcompsoc.co.uk
6aa86a6c1d Bug 344641 - Remove code no longer needed to shut up stupid warning.
ChatZilla only.


git-svn-id: svn://10.0.0.236/trunk@215178 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 14:13:05 +00:00
erik%vanderpoel.org
3cb46271fa make clickable http Location: header value use relative url
git-svn-id: svn://10.0.0.236/trunk@215177 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 06:16:36 +00:00
mozilla%justcameron.com
1ab1d6efc6 Bug 360263 - RSS links on extension pages are to 404s
Bug introduced in rusticoisation.
r=Shaver


git-svn-id: svn://10.0.0.236/trunk@215176 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 00:57:08 +00:00
gijskruitbosch%gmail.com
2a84b9a261 Bug 347420 - networks.txt ignored if last line doesn't end in \n
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@215175 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-12 00:26:36 +00:00
gijskruitbosch%gmail.com
241a14730e Bug 360192 - Support Proxy error codes better than "status 215398###"
r=silver@warwickcompsoc.co.uk (James Ross)
ChatZilla Only.


git-svn-id: svn://10.0.0.236/trunk@215174 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 23:17:46 +00:00
stuart.morgan%alumni.case.edu
6da1bb0a77 Camino only - remove unnecessary SDK workaround for bug 300304 on trunk
git-svn-id: svn://10.0.0.236/trunk@215173 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:51:33 +00:00
mrbkap%gmail.com
3841aa574c Fix BeOS build bustage. bug 360376, r=jst
git-svn-id: svn://10.0.0.236/trunk@215171 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:32:01 +00:00
bzbarsky%mit.edu
fa36ed56f9 Rev nsICSSLoader IID too. Bug 319654.
git-svn-id: svn://10.0.0.236/trunk@215170 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:28:09 +00:00
bzbarsky%mit.edu
3d914aab06 Create DOM nodes for processing instructions in XUL, take 2. Still bug 319654, patch by
Nickolay Ponomarev <asqueella@gmail.com>, r+sr=bzbarsky.


git-svn-id: svn://10.0.0.236/trunk@215169 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:27:00 +00:00
bzbarsky%mit.edu
15a150d6b3 Make sure all xml-stylesheet and xul-overlay PIs in fact come in the prologs of
overlays.  Bug 360119, patch by Nickolay Ponomarev <asqueella@gmail.com> and
Phil Ringnalda <philringnalda@gmail.com>, r=mano


git-svn-id: svn://10.0.0.236/trunk@215168 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:22:36 +00:00
stuart.morgan%alumni.case.edu
eefc1627e3 Camino only - branch bustage fix for bug 300304
git-svn-id: svn://10.0.0.236/trunk@215167 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 22:02:26 +00:00
stuart.morgan%alumni.case.edu
2f559759a5 Camino only - Bug 360345: Bookmarks code style cleanup. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@215166 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 20:58:49 +00:00
stuart.morgan%alumni.case.edu
d5aa685a8e Camino only - Bug 300304: Darken bookmark bar buttons on mousedown. r=smfr sr=pink
git-svn-id: svn://10.0.0.236/trunk@215165 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 20:49:20 +00:00
robert%accettura.com
a429a287f6 Fix SQL error when we query for a hostname.
git-svn-id: svn://10.0.0.236/trunk@215164 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 19:33:08 +00:00
philringnalda%gmail.com
1cbede6509 Bug 350785 followup: Get out of form autocomplete storage even earlier for non-text inputs, r=mano
git-svn-id: svn://10.0.0.236/trunk@215163 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 18:26:21 +00:00
mozilla%weilbacher.org
714c2c5b4d [OS/2] Bug 356676: update README.txt to better represent current versioning scheme, r=mkaply
git-svn-id: svn://10.0.0.236/trunk@215161 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 17:36:37 +00:00
bmlk%gmx.de
18e7f2bcc4 adding testcase for bug 337124 to mochitest not part of the build
git-svn-id: svn://10.0.0.236/trunk@215160 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 16:19:53 +00:00
bienvenu%nventure.com
5bb863e644 fix 360147 implement tagging of newsgroup posts, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215159 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 15:54:39 +00:00
bmlk%gmx.de
f507fa8183 don't rely on framconstructor to deliver a valid sibling for insert of colgroups and rowgroups as they are siblings contentwise but live on different childlists, bug 337124 r/sr=roc
git-svn-id: svn://10.0.0.236/trunk@215158 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 13:38:09 +00:00
olav%bkor.dhs.org
88557f5603 Bug 357873: loginnetmask param should default to 0
Patch by Olav Vitters <olav@bkor.dhs.org> r=justdave a=justdave


git-svn-id: svn://10.0.0.236/trunk@215157 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 09:18:55 +00:00
bugzilla%standard8.demon.co.uk
c082aee9c6 Bug 355363 Make a base class for LDAP Message Listener code. r=bienvenu,sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215156 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 08:59:46 +00:00
bugzilla%standard8.demon.co.uk
58b6c7860d Bug 360280 Firefox shouldn't need to pull mozilla/themes. r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@215155 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 08:29:16 +00:00
bzbarsky%mit.edu
87a5a4e659 Adding test for bug 142233.
git-svn-id: svn://10.0.0.236/trunk@215154 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 06:55:36 +00:00
bzbarsky%mit.edu
906e04c198 Make the assertions saner. Bug 342923, r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@215153 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 06:30:40 +00:00
gavin%gavinsharp.com
de3bd06b7c Bug 358570: OpenSearch plugins should default to encoding search queries in UTF-8 (fix garbled text for certain Japanese plugins that omit the InputEncoding element), patch by KUROSAWA, Takeshi(taken) <taken.spc@gmail.com>, r=me
git-svn-id: svn://10.0.0.236/trunk@215152 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 05:26:26 +00:00
bclary%bclary.com
d25df0dbc7 JavaScript Test - correct regression test for bug 292863
git-svn-id: svn://10.0.0.236/trunk@215151 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 05:22:46 +00:00
bzbarsky%mit.edu
8e6e31af2f Minor tweaks, mostly to use isnot()
git-svn-id: svn://10.0.0.236/trunk@215150 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 05:20:57 +00:00
sayrer%gmail.com
058686437f bz wants isnot()
git-svn-id: svn://10.0.0.236/trunk@215149 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 05:10:46 +00:00
bzbarsky%mit.edu
e30ce6a464 Set face index correctly. Bug 350455, patch by ToshihiroYamagishi
<toshihiro@turbolinux.co.jp>, r=mozilla@behdad.org, sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@215148 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 04:56:22 +00:00
bzbarsky%mit.edu
ee46937eb5 Adding some more testcases.
git-svn-id: svn://10.0.0.236/trunk@215146 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 04:33:52 +00:00
bzbarsky%mit.edu
c1ead0d708 Add a test name
git-svn-id: svn://10.0.0.236/trunk@215145 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 04:29:57 +00:00
bzbarsky%mit.edu
f5ff7ebe07 Add regression test for bug 359657.
git-svn-id: svn://10.0.0.236/trunk@215143 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 03:21:12 +00:00
cvshook%sicking.cc
89cb09b2c4 Fix orange by properly refcounting
git-svn-id: svn://10.0.0.236/trunk@215142 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 01:43:11 +00:00
peterv%propagandism.org
35583114f4 Additional fix for bug 352601 (XSLT forwards compatible processing enabled when it shouldn't). rs=sicking.
git-svn-id: svn://10.0.0.236/trunk@215140 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:49:10 +00:00
cvshook%sicking.cc
45fea30a93 Make nodes supports weak references. b=360291 r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@215138 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:36:03 +00:00
bclary%bclary.com
ecafc72fd8 JavaScript Test - modify expected exit code for shell out of memory conditions, bug 358975
git-svn-id: svn://10.0.0.236/trunk@215136 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:33:37 +00:00
cvshook%sicking.cc
bc3166e146 Kill nsAttributeChildList and use nsChildContentList instead. b=360319 r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@215135 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:28:20 +00:00
scott%scott-macgregor.org
4d4c431c0a Bug #357321 --> address book changes for supporting a per card attribute
for allowing remote content in HTML mail.
r=mark banner


git-svn-id: svn://10.0.0.236/trunk@215134 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:23:07 +00:00
bzbarsky%mit.edu
bafd71cd20 Fix order of mutation event firing for attribute removals. Bug 339494, r+sr=sicking
git-svn-id: svn://10.0.0.236/trunk@215132 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-11 00:04:46 +00:00
bzbarsky%mit.edu
3f520eaa49 Make it possible for protocol handlers to configure how CheckLoadURI should
treat them via their protocol flags.  Remove the protocol list we used before.
Bug 120373, r=dveditz, sr=darin


git-svn-id: svn://10.0.0.236/trunk@215130 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 23:49:08 +00:00
vladimir%pobox.com
46a3255d84 b=359054, crash in pixman MMX code (disable MMX on win32 for now), r=stuart
git-svn-id: svn://10.0.0.236/trunk@215129 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 23:36:12 +00:00
vladimir%pobox.com
818a6bd4fb b=359147, big images don't redraw, r=stuart
git-svn-id: svn://10.0.0.236/trunk@215128 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 23:34:05 +00:00
cvshook%sicking.cc
e67ffd2e25 Fix inconsistencies in colon at end of macro. rs=peterv. No bug
git-svn-id: svn://10.0.0.236/trunk@215127 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 23:29:55 +00:00
cvshook%sicking.cc
82abeafc72 fix bustage
git-svn-id: svn://10.0.0.236/trunk@215123 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 22:33:56 +00:00
cvshook%sicking.cc
d19b6c4635 fix bustage
git-svn-id: svn://10.0.0.236/trunk@215121 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 21:47:13 +00:00
joshmoz%gmail.com
61a878de96 fix select widget rendering when using thebes/cairo. b=360214 r=mento sr=pav
git-svn-id: svn://10.0.0.236/trunk@215120 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 21:03:27 +00:00
cvshook%sicking.cc
0b1c3b4909 fix bustage
git-svn-id: svn://10.0.0.236/trunk@215119 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 20:52:59 +00:00
cvshook%sicking.cc
1f787980fa Bug 357345: Add more optimizations to the XPath optimizer. r/sr=peterv
git-svn-id: svn://10.0.0.236/trunk@215118 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 20:44:08 +00:00
cvshook%sicking.cc
676346874b Bug 357345: Add more optimizations to the XPath optimizer. r/sr=peterv
git-svn-id: svn://10.0.0.236/trunk@215117 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 20:31:59 +00:00
benjamin%smedbergs.us
cae89c5987 From bug 345517 - fix adoptcount logging for the frozen string API, r=darin
git-svn-id: svn://10.0.0.236/trunk@215113 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 20:05:04 +00:00
bclary%bclary.com
c50a589122 JavaScript Test - regression test for bug 352271, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215109 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:53:09 +00:00
bclary%bclary.com
3d89b76829 JavaScript Test - regression test for bug 354924, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215108 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:49:05 +00:00
bclary%bclary.com
e6d07f26c4 JavaScript Test - regression test for bug 353264, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215107 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:42:43 +00:00
bclary%bclary.com
c29b2ef39a JavaScript Test - regression test for bug 354151, by Igor Bukanov
git-svn-id: svn://10.0.0.236/trunk@215106 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:36:58 +00:00
bclary%bclary.com
bbcd062868 JavaScript Test - regression test for bug 354145, by Igor Bukanov
git-svn-id: svn://10.0.0.236/trunk@215105 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:32:15 +00:00
bclary%bclary.com
37fbfd40e7 JavaScript Test - regression test for bug 350238, by Jesse Ruderman
git-svn-id: svn://10.0.0.236/trunk@215104 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:27:03 +00:00
bzbarsky%mit.edu
7099e68a3e Improve string for NS_ERROR_DOM_NOT_SUPPORTED_ERR. Bug 360208, patch by Ryan
Jones <sciguyryan+bugzilla@gmail.com>, r+sr=bzbarsky


git-svn-id: svn://10.0.0.236/trunk@215103 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 19:23:56 +00:00
wsharp%adobe.com
a3a14b8612 Bug 360275 - remove usage of va_list for 64-bit support. Fix shell to run on 10.5.
git-svn-id: svn://10.0.0.236/trunk@215100 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 18:57:27 +00:00
stuart.morgan%alumni.case.edu
4cb39badfc Camino only - Bug 355033: simplify keychain prefs. r=stridey sr=pink
git-svn-id: svn://10.0.0.236/trunk@215098 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 18:20:55 +00:00
lpsolit%gmail.com
21b303adf4 Bug 189627: Implement per-product privileges - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
git-svn-id: svn://10.0.0.236/trunk@215097 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 16:51:30 +00:00
scott%scott-macgregor.org
f085aecbca Bug #360030 --> Add the ability to customize the fields we show in the new mail alert notification dialog. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215096 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 16:39:27 +00:00
wsharp%adobe.com
fd8e201e60 bug 360174 - fix MMGC for 64-bit issues, add 64-bit XCode 3.0 project files for 10.5 64-bit compiles
git-svn-id: svn://10.0.0.236/trunk@215095 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 16:04:27 +00:00
axel%pike.org
bd9c0fd33a bug 358740, add initial landing of coverage extension for l10n testing, r=rcampbell
git-svn-id: svn://10.0.0.236/trunk@215093 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 15:53:44 +00:00
gerv%gerv.net
f31a42d169 Bug 236108 - changing licence from NPL/GPL to MPL/GPL to help the Apache people. The bug in question also suggests an eventual switch to MIT; that may come later.
git-svn-id: svn://10.0.0.236/trunk@215092 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 15:27:40 +00:00
neil%parkwaycc.co.uk
2dae22df05 Bug 326840 Make progress dialogs display download speed where available p=son.le0@gmail.com r=biesi sr=me
git-svn-id: svn://10.0.0.236/trunk@215090 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 10:29:54 +00:00
rhelmer%mozilla.com
d7ba3c028e remove Release step as per README
git-svn-id: svn://10.0.0.236/trunk@215088 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 04:44:40 +00:00
pavlov%pavlov.net
14fa38266d backing out 345517 due to leak test bustage
git-svn-id: svn://10.0.0.236/trunk@215087 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 04:42:03 +00:00
mgalli%geckonnection.com
355a7b5844 cleanup to panels.
git-svn-id: svn://10.0.0.236/trunk@215075 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 03:04:14 +00:00
mgalli%geckonnection.com
7a91806faf cleanup to pref.
git-svn-id: svn://10.0.0.236/trunk@215074 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 03:02:36 +00:00
mgalli%geckonnection.com
eb92040bb6 Pref cleanup visual.
git-svn-id: svn://10.0.0.236/trunk@215073 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 02:59:50 +00:00
mike.morgan%oregonstate.edu
0d20db168d Added new URLs based on testing for silent installs w/ EULAs integrated into Fx interface. See bug 358937.
git-svn-id: svn://10.0.0.236/trunk@215070 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 01:03:33 +00:00
Olli.Pettay%helsinki.fi
2d30ed18cd Bug 340564, Print/Print Preview does not print text in <input text> or <textarea>, p=sharparrow, r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215069 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 00:55:11 +00:00
cpeyer%adobe.com
ab2d1520f5 *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@215068 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 00:48:31 +00:00
dbaron%dbaron.org
fa0ef6642e Only call gtk_window_present on top-level windows. b=330006 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215067 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-10 00:48:02 +00:00
rhelmer%mozilla.com
8097038888 framework changes for bootstrap b=352230 r=preed
git-svn-id: svn://10.0.0.236/trunk@215066 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 23:28:20 +00:00
rhelmer%mozilla.com
7f9943721c step changes for bootstrap b=356185 r=preed
git-svn-id: svn://10.0.0.236/trunk@215065 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 23:25:07 +00:00
preed%mozilla.com
37381b5dd7 Bug 360034: update nagios nightly build checks because of version bumps. Patch=cf, r=preed
git-svn-id: svn://10.0.0.236/trunk@215064 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 23:07:19 +00:00
pavlov%pavlov.net
ba00a8035a bug 360013. draw using the region rather than the union rect. r=josh sr=vlad
git-svn-id: svn://10.0.0.236/trunk@215063 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:58:11 +00:00
mats.palmgren%bredband.net
9a25d17ebb Backing out the NS_LIKELY/NS_UNLIKELY change to see if it fixes Tinderbox orange. b=340244
git-svn-id: svn://10.0.0.236/trunk@215062 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:52:19 +00:00
scott%scott-macgregor.org
4e6089f587 Bug #359852 --> during composition, local file image urls aren't loaded in the compose window. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215061 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:48:44 +00:00
dougt%meer.net
9e6e105dfd exposing the network status of a image request to wpl consumers. bug 355555. r=stuart.
git-svn-id: svn://10.0.0.236/trunk@215060 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:47:43 +00:00
scott%scott-macgregor.org
d29838fcfa Bug #360030 --> Add the ability to customize the fields we show in the new mail alert notification dialog. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@215059 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:27:37 +00:00
bienvenu%nventure.com
eb27dd9b7e fix 360142 single folder saved searches not working when imap server changes case of keywords, sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215058 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:09:57 +00:00
mkanat%bugzilla.org
1331c5c0f2 Bug 357482: Webservice should have a get_products method
Patch By Mads Bondo Dydensborg <mbd@dbc.dk> r=mkanat, a=myk


git-svn-id: svn://10.0.0.236/trunk@215057 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 22:01:08 +00:00
wclouser%mozilla.com
01b00ed21f changed the default application version to 2.0
git-svn-id: svn://10.0.0.236/trunk@215055 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 21:48:49 +00:00
wclouser%mozilla.com
c2909a9608 changed the query slightly for the product dropdowns, to make the latest at the top
git-svn-id: svn://10.0.0.236/trunk@215054 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 21:41:44 +00:00
roc+%cs.cmu.edu
170630f895 Bug 312963. Fix column layout when content in the column is out-of-flow but still needs to break vertically. rubberstamp r+sr=dbaron
git-svn-id: svn://10.0.0.236/trunk@215053 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 21:38:34 +00:00
scott%scott-macgregor.org
d32d8f7ab7 Bug #359469 --> extensions/offline/Makefile is no longer part of the thunderbird build. Patch by sugar.waffle@gmail.com. sr=mscott
git-svn-id: svn://10.0.0.236/trunk@215052 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 21:07:27 +00:00
edburns%acm.org
52244de3f3 M mozilla/npAPInsIInputStreamShim.cpp
- re-enable stream loading in pluglet.


git-svn-id: svn://10.0.0.236/trunk@215044 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 20:17:43 +00:00
edburns%acm.org
3e78a4fbf3 Memory audit of code in src directory. Found and fixed some leaks.
Declaring this directory memory clean.

M src/Pluglet.cpp
M src/Pluglet.h

- use do_GetService instead of servman->GetServiceByContractID

- do not keep a reference to plugletEngine as an ivar

M src/PlugletFactory.cpp
M src/PlugletFactory.h

- use nsnull instead of NULL

- do not keep a reference to plugletEngine as an ivar

- use PL_strdup and PL_strfree to duplicate and free strings

M src/PlugletsDir.cpp

- use PL_strdup and PL_strfree to duplicate and free strings


git-svn-id: svn://10.0.0.236/trunk@215043 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 20:10:17 +00:00
gavin%gavinsharp.com
db0b5fc1ed Bug 358569: When running with reduced FPU precision, the rounding error introduced by |d -=L*ds;| will cause |if (!(d *= 10.)) break;| to never be true, causing an infinite loop and consequent crash. Given |k| is already known, we know how often the loop should run, so use that as stop condition, also avoiding overwriting memory with 0. Patch by Keith Victor of MediaMachines, r=igor, r=crowder
git-svn-id: svn://10.0.0.236/trunk@215041 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 18:53:24 +00:00
mozilla.mano%sent.com
622888839f Bug 349380 - better UI for registerContentHandler. r=gavin.
git-svn-id: svn://10.0.0.236/trunk@215040 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 18:45:18 +00:00
mozilla.BenB%bucksch.org
e3fd27b04f Show quota as tiny progressmeter in main window status bar, if set and usage higher than a configurable threshold, to hint users at quota.
Backend part already checked in by bienvenu on 2006-09-25.
Bug 278096, r=bienvenu, sr=mscott


git-svn-id: svn://10.0.0.236/trunk@215039 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 18:40:26 +00:00
cls%seawood.org
3edced3b0f Generate quickparse.txt along with the rest of the static pages.
Bug #359908 r=justdave


git-svn-id: svn://10.0.0.236/trunk@215038 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 17:46:10 +00:00
mats.palmgren%bredband.net
54cfbc0751 Make NS_LIKELY/NS_UNLIKELY accept pointers etc. b=340244 r+sr=darin
git-svn-id: svn://10.0.0.236/trunk@215037 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 17:41:03 +00:00
mats.palmgren%bredband.net
e5aaecc35e Right arrow key (to collapse selection to right) does not scroll textbox to show caret. b=352759 r+sr=roc
git-svn-id: svn://10.0.0.236/trunk@215034 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 16:37:10 +00:00
benjamin%smedbergs.us
d3d0bc60ef Preprocessors are not that smart, try again.
git-svn-id: svn://10.0.0.236/trunk@215033 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 16:05:43 +00:00
benjamin%smedbergs.us
8d0a106758 Attempt to fix Windows-optimized-only build bustage from bug 345517. Anticipated r=vlad ;-)
git-svn-id: svn://10.0.0.236/trunk@215032 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 16:03:24 +00:00
benjamin%smedbergs.us
6ed0bbfee0 Bug 345517, try #2, make the browser component use frozen linkage, so that ff+xr builds. This does *not* --enable-libxul by default for Firefox (yet). That will wait until after 1.9a1. Older patch r=darin+mento, revisions r=mano
git-svn-id: svn://10.0.0.236/trunk@215031 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 15:12:24 +00:00
benjamin%smedbergs.us
b75752771b Bug 345517, try #2, make the browser component use frozen linkage, so that ff+xr builds. This does *not* --enable-libxul by default for Firefox (yet). That will wait until after 1.9a1. Older patch r=darin+mento, revisions r=mano
git-svn-id: svn://10.0.0.236/trunk@215030 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 15:02:29 +00:00
aaronleventhal%moonset.net
a0ef0d41c5 Bug 357625. getTextAtOffset doesn't seem to work well with text with <br> in it. r=ginn.chen
git-svn-id: svn://10.0.0.236/trunk@215029 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 14:49:21 +00:00
joshmoz%gmail.com
49441a4f0c Selection is not erased when Find Next from the Find window causes the page to scroll. b=311304 p=smorgan r=sfraser sr=pinkerton
git-svn-id: svn://10.0.0.236/trunk@215028 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 14:00:08 +00:00
cvshook%sicking.cc
ff69f339f4 Don't use ranges when getting the value of a textfield since we get the value in the middle of tearing down a document. b=359674 r/sr=jst
git-svn-id: svn://10.0.0.236/trunk@215023 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 08:43:26 +00:00
philringnalda%gmail.com
82733c5e23 Bug 354081: Remove unused entities for Help throbber, r=gavin
git-svn-id: svn://10.0.0.236/trunk@215022 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 05:17:41 +00:00
philringnalda%gmail.com
e85a6ad1ad Bug 274010: Restore default set in customize toolbars should restore icon size and mode, patch by Hiro <sugar.waffle@gmail.com>, r=me, sr+a=mscott
git-svn-id: svn://10.0.0.236/trunk@215021 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 05:09:40 +00:00
mhammond%skippinet.com.au
3dc130dacf When passing arrays of interfaces to an XPCOM method, we didn't know the
declared IID to obtain.  This prevented us detecting arrays of variants
and giving them the same special treatment normal Variants get.  Fix that.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@215020 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 04:31:13 +00:00
mhammond%skippinet.com.au
5f49ed82bf If someone passes a bad IID string, raise a normal Python ValueError
rather than synthesizing an XPCOM error.
Not part of the build


git-svn-id: svn://10.0.0.236/trunk@215019 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 04:20:47 +00:00
mats.palmgren%bredband.net
63efc8703b Make bookmarks "Sorted By" menu localizable and add accesskeys (Bookmarks Manager part). b=91774 r=mano
git-svn-id: svn://10.0.0.236/trunk@215018 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 03:03:05 +00:00
mats.palmgren%bredband.net
e896065884 Make bookmarks "Sorted By" menu localizable and add accesskeys (Places part). b=91774 r=mano
git-svn-id: svn://10.0.0.236/trunk@215017 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 03:02:02 +00:00
ginn.chen%sun.com
a0c4d50494 Bug 359210 Firefox hangs when loading the attached page
temporary fix by aaronleventhal r=ginn.chen


git-svn-id: svn://10.0.0.236/trunk@215015 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 02:26:34 +00:00
mats.palmgren%bredband.net
86fd929d58 XBL needs simple defense against infinite recursion. b=55070 r+sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@215013 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 01:58:12 +00:00
mhammond%skippinet.com.au
e7b8f7f7de Generate better .py code and handle some 'new' xpcom data types.
Not part of the build.


git-svn-id: svn://10.0.0.236/trunk@215012 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 01:05:31 +00:00
pavlov%pavlov.net
837bbc7c8e bug 359314. bandaiding over crash when #chars > #glyphs when justifying. r=vlad
git-svn-id: svn://10.0.0.236/trunk@215010 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 00:37:50 +00:00
pavlov%pavlov.net
ebcfa70d5d removing unused variables. r=me
git-svn-id: svn://10.0.0.236/trunk@215005 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 00:06:49 +00:00
cvshook%sicking.cc
c43f628b5a Fix svg:script and only flag inline scripts as executed once they contain non-empty script content. b=359598 r/sr=bz
git-svn-id: svn://10.0.0.236/trunk@215004 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-09 00:02:21 +00:00
scott%scott-macgregor.org
7c8591e633 Bug #359134 --> integrate Thunderbird with necko's automatic online/offline management. When we detect the network connection has gone down, automatically move the client into offline mode, and back to online mode when the connection comes back up.
tools/cross-commit  mail/app/profile/all-thunderbird.js  mail/base/content/mail-offline.js mailnews/extensions/offline-startup/js/offlineStartup.js mailnews/mailnews.js -m Bug


git-svn-id: svn://10.0.0.236/trunk@215003 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 23:59:21 +00:00
Olli.Pettay%helsinki.fi
33d1b0ff23 Bug 359495, layout/xtf reminder in allmakefiles.sh, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@214993 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 22:45:49 +00:00
kairo%kairo.at
fe2c55fb99 bug 359687 - XULRunner pkg packages should correctly follow filename specs, r=bsmedberg
git-svn-id: svn://10.0.0.236/trunk@214983 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 21:27:46 +00:00
despotdaemon
da06fb675d Pseudo-automatic update of changes made by dansmith@adobe.com.
git-svn-id: svn://10.0.0.236/trunk@214982 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 21:15:45 +00:00
stejohns%adobe.com
efa5c0514c *** empty log message ***
git-svn-id: svn://10.0.0.236/trunk@214981 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 21:03:34 +00:00
cls%seawood.org
0cf289d362 Remove lockfile if $::data_dir can't be read
git-svn-id: svn://10.0.0.236/trunk@214980 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 20:55:30 +00:00
despotdaemon
af20629719 Pseudo-automatic update of changes made by cpeyer@adobe.com.
git-svn-id: svn://10.0.0.236/trunk@214977 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 20:01:01 +00:00
sayrer%gmail.com
764b1c1d9a make gen_template.pl work from anywhere with FindBin
git-svn-id: svn://10.0.0.236/trunk@214975 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 19:19:19 +00:00
sayrer%gmail.com
0f8c8c6c17 turn off default browser check
git-svn-id: svn://10.0.0.236/trunk@214973 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 18:46:54 +00:00
kaie%kuix.de
34d8a1381a Bug 356309, CertVerifyLog in CERT_VerifyCertificate terminates early on expired certs
r=rrelyea


git-svn-id: svn://10.0.0.236/trunk@214972 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 18:41:53 +00:00
sayrer%gmail.com
963334ca67 Bug 348447. feed sanitizer whitelist accessibility and i18n. missed review comments on previous checkin: r=bsmedberg, sr=sicking.
git-svn-id: svn://10.0.0.236/trunk@214971 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 18:25:18 +00:00
sayrer%gmail.com
eeec08e8d4 Bug 348447. feed sanitizer whitelist accessibility and i18n.
git-svn-id: svn://10.0.0.236/trunk@214970 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 18:20:55 +00:00
kaie%kuix.de
4e7811927f Bug 356109, Improve KU_NON_REPUDIATION indication in client auth prompt
r=rrelyea


git-svn-id: svn://10.0.0.236/trunk@214969 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 18:14:21 +00:00
mark%moxienet.com
2ea02f27a2 Xcode compatibility junk from 359218
git-svn-id: svn://10.0.0.236/trunk@214967 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 17:56:03 +00:00
gavin%gavinsharp.com
68056965f1 Try backing out the patch for bug 319654 to see if it fixes the Mac orange
git-svn-id: svn://10.0.0.236/trunk@214966 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 17:52:58 +00:00
bugzilla%standard8.demon.co.uk
414a0c7535 Bug 350688 Dictionaries should form part of the locale pack in the installer (os2 part). r=ajschult,sr=neil.
git-svn-id: svn://10.0.0.236/trunk@214965 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 17:05:49 +00:00
joshmoz%gmail.com
86b284ddcc back out part of 346954 to fix Flash when migrating a profile from PPC to x86. b=356694 r=sayrer sr=jst
git-svn-id: svn://10.0.0.236/trunk@214964 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 16:43:17 +00:00
scott%scott-macgregor.org
121aea9904 Bug #359653 --> Don't show the sending unsent messages progress text unless we know we have unsent messages to send.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@214962 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 16:00:14 +00:00
stridey%gmail.com
67f7707d11 Camino only - Bug 359826. Textual and behavioral polish for the Webfeatures prefpane. r=ardissone sr=smorgan
git-svn-id: svn://10.0.0.236/trunk@214961 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 15:31:01 +00:00
daniel.boelzle%sun.com
0b67e90d61 Bug 340949: different error handling, minor logging
git-svn-id: svn://10.0.0.236/trunk@214959 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 14:56:55 +00:00
mattwillis%gmail.com
5a177884a0 bug 351031 - Fixes wrong aligned date in month printout. Patch by Martin Schröder <mschroeder@mozilla.x-home.org>, r=lilmatt
git-svn-id: svn://10.0.0.236/trunk@214958 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 14:14:55 +00:00
silver%warwickcompsoc.co.uk
baaa986760 Bug 359637 - Use font-family and generic font class instead of specific font, so that changing the font size works on the default motif.
ChatZilla only.
r=samuel


git-svn-id: svn://10.0.0.236/trunk@214956 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 12:55:21 +00:00
silver%warwickcompsoc.co.uk
1b8ae1bfc6 Bug 329440 - Work around flaws in ECMA 262 Ed 3 section 13.2.2 step 7 by throwing instead.
ChatZilla only.
r=samuel


git-svn-id: svn://10.0.0.236/trunk@214955 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 12:44:23 +00:00
Olli.Pettay%helsinki.fi
961f8536ec Bug 359242, remove nsXBLWindowDragHandler, r=sicking, sr=neil
git-svn-id: svn://10.0.0.236/trunk@214953 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 11:03:13 +00:00
ginn.chen%sun.com
5ce0982a60 Bug 358884 Add assertion to ensure accessible object with a text child supports the right interfaces
patch by Evan Yan at sun.com r=aaronleventhal,hwaara


git-svn-id: svn://10.0.0.236/trunk@214952 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 08:22:46 +00:00
scott%scott-macgregor.org
4cdbfdbc67 back out my checkin since the tree is closed.
git-svn-id: svn://10.0.0.236/trunk@214950 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 07:25:52 +00:00
sayrer%gmail.com
a6c0d4e4ef Perl doesn't work that well if you write JavaScript in it
git-svn-id: svn://10.0.0.236/trunk@214947 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 07:07:44 +00:00
scott%scott-macgregor.org
d793c7b55d Bug #359653 --> consolidate offline management front end code. sr=bienvenu
git-svn-id: svn://10.0.0.236/trunk@214946 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 06:38:00 +00:00
despotdaemon
a4102c5a51 Pseudo-automatic update of changes made by romaxa@gmail.com.
git-svn-id: svn://10.0.0.236/trunk@214944 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 06:19:13 +00:00
stuart.morgan%alumni.case.edu
20ec56a9b6 Camino only - Bug 358620: Switch to use native NSSearchField widget in Bookmark Manager. r=hwaara r=alqahira sr=pink
git-svn-id: svn://10.0.0.236/trunk@214943 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 06:16:10 +00:00
stuart.morgan%alumni.case.edu
cf1bc10df1 Camino only - Bug 342232: Disable various menu items when window/tab contains binary content. r=cl sr=pink
git-svn-id: svn://10.0.0.236/trunk@214938 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 06:06:15 +00:00
bzbarsky%mit.edu
25dac94482 Create DOM nodes for processing instructions in XUL. Bug 319654, patch by
Nickolay Ponomarev <asqueella@gmail.com>, r+sr=bzbarsky.


git-svn-id: svn://10.0.0.236/trunk@214929 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 02:25:37 +00:00
vladimir%pobox.com
f14c43ee28 b=359002, single-pixel images are being drawn with wrong color; bugfix to previous patch, r=stuart
git-svn-id: svn://10.0.0.236/trunk@214927 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 01:34:10 +00:00
vladimir%pobox.com
f17b9d8ce1 b=328380, bad scrolling performance using large fixed-positioned repeating background images; cairo patch to/from upstrea; r=me
git-svn-id: svn://10.0.0.236/trunk@214926 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 01:31:17 +00:00
despotdaemon
f8da73a0b0 Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@214923 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 01:13:06 +00:00
despotdaemon
5137debecb Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@214916 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 00:55:20 +00:00
vladimir%pobox.com
92bcef3698 b=358951, odd 1px line with tiled background image (images being rendered at non-pixel-aligned locations), r=stuart
git-svn-id: svn://10.0.0.236/trunk@214906 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-08 00:06:06 +00:00
vladimir%pobox.com
1be599e877 b=359266, cairo win32 surface cleanup and fixes; from upstream, r=me
git-svn-id: svn://10.0.0.236/trunk@214900 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 23:40:23 +00:00
bienvenu%nventure.com
1214b8de0c add MsgCreateDBView topic notification when we create a view, which makes it easier for custom column handlers to hook into new views, patch by kent@caspia.com, r/sr=bienvenu 359357
git-svn-id: svn://10.0.0.236/trunk@214899 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 23:34:00 +00:00
shaver%mozilla.org
0abb1cd5fe Fixing shell XCode project (bug 359850), r=stejohns.
git-svn-id: svn://10.0.0.236/trunk@214895 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 22:58:36 +00:00
sspitzer%mozilla.org
be4dc056b3 fix for bug #359093: need to encode version string for the app.update.never.X pref name, which will be needed if (when?) we decided to send over any localized "pretty" text for the version attribute (see bug #359082)
r=dietrich, rstrong


git-svn-id: svn://10.0.0.236/trunk@214893 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 22:54:27 +00:00
despotdaemon
d4042f7ac8 Pseudo-automatic update of changes made by wsharp@adobe.com.
git-svn-id: svn://10.0.0.236/trunk@214888 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 21:20:27 +00:00
despotdaemon
677ee82e35 Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@214882 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 19:29:58 +00:00
mike.morgan%oregonstate.edu
8fd863ae75 Added divx support for PFS. See bug 358937.
git-svn-id: svn://10.0.0.236/trunk@214880 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 19:27:55 +00:00
lpsolit%gmail.com
ad65874bf7 Bug 359768: Confusing error message when a user has too many votes for a product - Patch by Frédéric Buclin <LpSolit@gmail.com> r=timeless a=myk
git-svn-id: svn://10.0.0.236/trunk@214879 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 19:05:41 +00:00
despotdaemon
ee54c30f1c Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@214878 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 18:40:04 +00:00
despotdaemon
ea18b3d85a Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@214877 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 18:35:05 +00:00
despotdaemon
a0ecd1d508 Pseudo-automatic update of changes made by benjamin@smedbergs.us.
git-svn-id: svn://10.0.0.236/trunk@214876 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 18:34:26 +00:00
shaver%mozilla.org
a0925953b9 update expedia plugin
git-svn-id: svn://10.0.0.236/trunk@214867 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 17:07:33 +00:00
thomas.benisch%sun.com
3624cb9c51 bug #359016 JavaScript error current item is not defined r=jminta
git-svn-id: svn://10.0.0.236/trunk@214864 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 10:30:33 +00:00
daniel.boelzle%sun.com
41581b4215 Bug 340949: use default calendar calId, may be different from userId
git-svn-id: svn://10.0.0.236/trunk@214863 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 10:20:31 +00:00
despotdaemon
201d063762 Pseudo-automatic update of changes made by brendan@mozilla.org.
git-svn-id: svn://10.0.0.236/trunk@214862 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 07:56:00 +00:00
scott%scott-macgregor.org
8854b06dc8 Bug #359653 --> Consolidate Offline management in the front end.
sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@214860 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 06:20:42 +00:00
despotdaemon
c746023b23 Pseudo-automatic update of changes made by dbaron@dbaron.org.
git-svn-id: svn://10.0.0.236/trunk@214857 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 05:39:39 +00:00
despotdaemon
6b8a15a3d9 Pseudo-automatic update of changes made by dbaron@dbaron.org.
git-svn-id: svn://10.0.0.236/trunk@214856 18797224-902f-48f8-a5cc-f745e15eee43
2006-11-07 05:38:00 +00:00
3178 changed files with 2519 additions and 558837 deletions

View File

@@ -1,217 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include "MMgc.h"
#define kBlockHeadSize offsetof(MMgc::FixedAlloc::FixedBlock, items)
namespace MMgc
{
FixedAlloc::FixedAlloc(int itemSize)
{
m_heap = GCHeap::GetGCHeap();
m_firstBlock = NULL;
m_lastBlock = NULL;
m_firstFree = NULL;
m_maxAlloc = 0;
#ifdef MEMORY_INFO
itemSize += DebugSize();
#endif
m_itemSize = itemSize;
// The number of items per block is kBlockSize minus
// the # of pointers at the base of each page.
size_t usableSpace = GCHeap::kBlockSize - kBlockHeadSize;
m_itemsPerBlock = usableSpace / m_itemSize;
}
FixedAlloc::~FixedAlloc()
{
// Free all of the blocks
while (m_firstBlock) {
#ifdef MEMORY_INFO
if(m_firstBlock->numAlloc > 0) {
// go through every memory location, if the fourth 4 bytes cast as
// an integer isn't 0xedededed then its allocated space and the integer is
// an index into the stack trace table, the first 4 bytes will contain
// the freelist pointer for free'd items (which is why the trace index is
// stored in the second 4)
// first 4 bytes - free list pointer
// 2nd 4 bytes - alloc stack trace
// 3rd 4 bytes - free stack trace
// 4th 4 bytes - 0xedededed if freed correctly
unsigned int *mem = (unsigned int*) m_firstBlock->items;
unsigned int itemNum = 0;
while(itemNum++ < m_itemsPerBlock) {
unsigned int fourthInt = *(mem+3);
if(fourthInt != 0xedededed) {
GCDebugMsg(false, "Leaked %d byte item. Addr: 0x%x\n", GetItemSize(), mem+2);
PrintStackTraceByIndex(*(mem+1));
}
mem += (m_itemSize / sizeof(int));
}
GCAssert(false);
}
// go through every item on the free list and make sure it wasn't written to
// after being poisoned.
void *item = m_firstBlock->firstFree;
while(item) {
for(int i=3, n=(m_firstBlock->size>>2)-1; i<n; i++)
{
unsigned int data = ((int*)item)[i];
if(data != 0xedededed)
{
GCDebugMsg(false, "Object 0x%x was written to after it was deleted, allocation trace:");
PrintStackTrace((int*)item+2);
GCDebugMsg(false, "Deletion trace:");
PrintStackTrace((int*)item+3);
GCDebugMsg(true, "Deleted item write violation!");
}
}
// next free item
item = *((void**)item);
}
#endif
FreeChunk(m_firstBlock);
}
}
size_t FixedAlloc::Allocated()
{
size_t bytes = 0;
FixedBlock *b = m_firstBlock;
while(b)
{
bytes += b->numAlloc * b->size;
b = b->next;
}
return bytes;
}
FixedAlloc::FixedBlock* FixedAlloc::CreateChunk()
{
// Allocate a new block
m_maxAlloc += m_itemsPerBlock;
FixedBlock* b = (FixedBlock*) m_heap->Alloc(1, true, false);
GCAssert(m_itemSize <= 0xffff);
b->numAlloc = 0;
b->size = (uint16)m_itemSize;
b->firstFree = 0;
b->nextItem = b->items;
b->alloc = this;
#ifdef _DEBUG
// deleted and unused memory is 0xed'd, this is important for leak diagnostics
memset(b->items, 0xed, m_itemSize * m_itemsPerBlock);
#endif
// Link the block at the end of the list
b->prev = m_lastBlock;
b->next = 0;
if (m_lastBlock) {
m_lastBlock->next = b;
}
if (!m_firstBlock) {
m_firstBlock = b;
}
m_lastBlock = b;
// Add our new ChunkBlock to the firstFree list (which should be empty)
if (m_firstFree)
{
GCAssert(m_firstFree->prevFree == 0);
m_firstFree->prevFree = b;
}
b->nextFree = m_firstFree;
b->prevFree = 0;
m_firstFree = b;
return b;
}
void FixedAlloc::FreeChunk(FixedBlock* b)
{
m_maxAlloc -= m_itemsPerBlock;
// Unlink the block from the list
if (b == m_firstBlock) {
m_firstBlock = b->next;
} else {
b->prev->next = b->next;
}
if (b == m_lastBlock) {
m_lastBlock = b->prev;
} else {
b->next->prev = b->prev;
}
// If this is the first free block, pick a new one...
if ( m_firstFree == b )
m_firstFree = b->nextFree;
else if (b->prevFree)
b->prevFree->nextFree = b->nextFree;
if (b->nextFree)
b->nextFree->prevFree = b->prevFree;
// Free the memory
m_heap->Free(b);
}
size_t FixedAlloc::GetItemSize() const
{
return m_itemSize - DebugSize();
}
void *FastAllocator::operator new[](size_t size)
{
return FixedMalloc::GetInstance()->Alloc(size);
}
void FastAllocator::operator delete [](void *item)
{
FixedMalloc::GetInstance()->Free(item);
}
}

View File

@@ -1,299 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __FixedAlloc__
#define __FixedAlloc__
namespace MMgc
{
/**
* This is a fast, fixed-size memory allocator for manually freed
* objects.
*
* Memory is allocated from the system in 4096 byte chunks
* via the GCHeap class. Not that this won't work well for
* large objects (>400 bytes). For that, we have the
* FixedAllocLarge allocator which will allocate multiple
* pages at a time to minimize waste.
*/
class FixedAlloc : public GCAllocObject
{
friend class FixedMalloc;
friend class FastAllocator;
friend class GC;
public:
FixedAlloc(int itemSize);
~FixedAlloc();
inline void* Alloc(size_t size)
{
(void)size;
GCAssertMsg(((size_t)m_itemSize >= size), "allocator itemsize too small");
if(!m_firstFree) {
if(CreateChunk() == NULL) {
GCAssertMsg(false, "Out of memory!");
return NULL;
}
}
FixedBlock* b = m_firstFree;
GCAssert(b && !IsFull(b));
b->numAlloc++;
// Consume the free list if available
void *item = NULL;
if (b->firstFree) {
item = b->firstFree;
b->firstFree = *((void**)item);
// assert that the freelist hasn't been tampered with (by writing to the first 4 bytes)
GCAssert(b->firstFree == NULL ||
(b->firstFree >= b->items &&
(((intptr)b->firstFree - (intptr)b->items) % b->size) == 0 &&
(intptr) b->firstFree < ((intptr)b & ~0xfff) + GCHeap::kBlockSize));
#ifdef MEMORY_INFO
// ensure previously used item wasn't written to
// -1 because write back pointer space isn't poisoned.
for(int i=3, n=(b->size>>2)-1; i<n; i++)
{
int data = ((int*)item)[i];
if(data != (int)0xedededed)
{
GCDebugMsg(false, "Object 0x%x was written to after it was deleted, allocation trace:", (int*)item+2);
PrintStackTrace((int*)item+2);
GCDebugMsg(false, "Deletion trace:");
PrintStackTrace((int*)item+3);
GCDebugMsg(true, "Deleted item write violation!");
}
}
#endif
} else {
// Take next item from end of block
item = b->nextItem;
GCAssert(item != 0);
if(!IsFull(b)) {
// There are more items at the end of the block
b->nextItem = (void *) ((intptr)item+m_itemSize);
#ifdef MEMORY_INFO
// space made in ctor
item = DebugDecorate(item, size + DebugSize(), 6);
memset(item, 0xfa, size);
#endif
return item;
}
b->nextItem = 0;
}
// If we're out of free items, be sure to remove ourselves from the
// list of blocks with free items.
if (IsFull(b)) {
m_firstFree = b->nextFree;
b->nextFree = NULL;
GCAssert(b->prevFree == NULL);
if (m_firstFree)
m_firstFree->prevFree = 0;
else
CreateChunk();
}
#ifdef MEMORY_INFO
// space made in ctor
item = DebugDecorate(item, size + DebugSize(), 6);
memset(item, 0xfa, size);
#endif
GCAssertMsg(item != NULL, "Out of memory");
return item;
}
static inline void Free(void *item)
{
FixedBlock *b = (FixedBlock*) ((uint32)item & ~0xFFF);
#ifdef MEMORY_INFO
item = DebugFree(item, 0xED, 6);
#endif
#ifdef _DEBUG
// ensure that we are freeing a pointer on a item boundary
GCAssert(((intptr)item - (intptr)b->items) % b->alloc->m_itemSize == 0);
#endif
// Add this item to the free list
*((void**)item) = b->firstFree;
b->firstFree = item;
// We were full but now we have a free spot, add us to the free block list.
if (b->numAlloc == b->alloc->m_itemsPerBlock)
{
GCAssert(!b->nextFree && !b->prevFree);
b->nextFree = b->alloc->m_firstFree;
if (b->alloc->m_firstFree)
b->alloc->m_firstFree->prevFree = b;
b->alloc->m_firstFree = b;
}
#ifdef _DEBUG
else // we should already be on the free list
{
GCAssert ((b == b->alloc->m_firstFree) || b->prevFree);
}
#endif
b->numAlloc--;
if(b->numAlloc == 0) {
b->alloc->FreeChunk(b);
}
}
size_t Allocated();
size_t GetItemSize() const;
int GetMaxAlloc() const { return m_maxAlloc; }
static FixedAlloc *GetFixedAlloc(void *item)
{
FixedBlock *b = (FixedBlock*) ((uint32)item & ~0xFFF);
#ifdef _DEBUG
// Attempt to sanity check this ptr: numAllocs * size should be less than kBlockSize
GCAssertMsg(((b->numAlloc * b->size) < GCHeap::kBlockSize), "Size called on ptr not part of FixedBlock");
#endif
return b->alloc;
}
private:
struct FixedBlock
{
void* firstFree; // first item on free list
void* nextItem; // next free item
FixedBlock* next;
FixedBlock* prev;
uint16 numAlloc;
uint16 size;
FixedBlock *prevFree;
FixedBlock *nextFree;
FixedAlloc *alloc;
char items[1];
};
GCHeap *m_heap;
unsigned int m_itemsPerBlock;
size_t m_itemSize;
// The list of chunk blocks
FixedBlock* m_firstBlock;
FixedBlock* m_lastBlock;
// The lowest priority block that has free items
FixedBlock* m_firstFree;
int m_maxAlloc;
bool IsFull(FixedBlock *b) const { return b->numAlloc == m_itemsPerBlock; }
FixedBlock* CreateChunk();
void FreeChunk(FixedBlock* b);
static inline size_t Size(const void *item)
{
FixedBlock *b = (FixedBlock*) ((uint32)item & ~0xFFF);
#ifdef _DEBUG
// Attempt to sanity check this ptr: numAllocs * size should be less than kBlockSize
GCAssertMsg(((b->numAlloc * b->size) < GCHeap::kBlockSize), "Size called on ptr not part of FixedBlock");
#endif
return b->size;
}
};
class FixedAllocSafe : public FixedAlloc
{
public:
FixedAllocSafe(int itemSize) : FixedAlloc(itemSize) {}
void* Alloc(size_t size)
{
#ifdef GCHEAP_LOCK
GCAcquireSpinlock lock(m_spinlock);
#endif
return FixedAlloc::Alloc(size);
}
void Free(void *ptr)
{
#ifdef GCHEAP_LOCK
GCAcquireSpinlock lock(m_spinlock);
#endif
FixedAlloc::Free(ptr);
}
static FixedAllocSafe *GetFixedAllocSafe(void *item)
{
return (FixedAllocSafe*) FixedAlloc::GetFixedAlloc(item);
}
private:
#ifdef GCHEAP_LOCK
GCSpinLock m_spinlock;
#endif
};
/**
* classes that need fast lock free allocation should subclass this and pass
* a FixedAlloc * to the new parameter. One new/delete are lock free, scalar
* allocations use the normal locked general size allocator.
*/
class FastAllocator
{
public:
static void *operator new(size_t size, FixedAlloc *alloc)
{
return alloc->Alloc(size);
}
static void operator delete (void *item)
{
FixedAlloc::Free(item);
}
// allow array allocation as well
static void *operator new[](size_t size);
static void operator delete [](void *item);
};
}
#endif /* __FixedAlloc__ */

View File

@@ -1,141 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
// For memset
#include <string.h>
#include "MMgc.h"
namespace MMgc
{
FixedMalloc *FixedMalloc::instance = NULL;
// Size classes for our Malloc. We start with a 4 byte allocator and then from
// 8 to 128, size classes are spaced evenly 8 bytes apart, then from 128 to 1968 they
int16 FixedMalloc::kSizeClasses[kNumSizeClasses] = {
4, 8, 16, 24, 32, 40, 48, 56, 64, 72, //0-9
80, 88, 96, 104, 112, 120, 128, 144, 160, 176, //10-19
184, 192, 200, 208, 224, 232, 248, 264, 288, 312, //20-29
336, 368, 400, 448, 504, 576, 672, 808, 1016, 1352, //30-39
2032, //40
};
// This is an index which indicates that allocator i should be used
// if kSizeClassIndex[i] items fit into a 4096 byte page.
uint8 FixedMalloc::kSizeClassIndex[32] = {
40, 40, 40, 39, 38, 37, 36, 35, 34, 33, //0-10
32, 31, 30, 29, 28, 27, 26, 25, 24, 23, //10-19
22, 21, 20, 19, 19, 18, 18, 18, 17, 17, //20-29
17, 16 //30-31
};
void FixedMalloc::Init()
{
GCAssert(instance == NULL);
instance = new FixedMalloc();
}
void FixedMalloc::Destroy()
{
GCAssert(instance != NULL);
delete instance;
instance = NULL;
}
FixedMalloc::FixedMalloc()
{
m_heap = GCHeap::GetGCHeap();
// Create all the allocators up front (not lazy)
// so that we don't have to check the pointers for
// NULL on every allocation.
for (int i=0; i<kNumSizeClasses; i++) {
// FIXME: by default FixedAlloc uses 4K chunks, for the
// more common size classes maybe we should use 8/16/32.
// FIXME: we could use FixedAllocLarge for the bigger size
// classes but how to call the right Free would need to be work out
m_allocs[i] = new FixedAllocSafe(kSizeClasses[i]);
}
}
FixedMalloc::~FixedMalloc()
{
for (int i=0; i<kNumSizeClasses; i++) {
FixedAllocSafe *a = m_allocs[i];
delete a;
}
}
size_t FixedMalloc::Allocated()
{
size_t bytes = 0;
for (int i=0; i<kNumSizeClasses; i++) {
FixedAllocSafe *a = m_allocs[i];
bytes += a->Allocated();
}
// FIXME: what about big blocks?
return bytes;
}
FixedAllocSafe *FixedMalloc::FindSizeClass(size_t size) const
{
GCAssertMsg(size > 0, "cannot allocate a 0 sized block\n");
size_t size8 = (size+7)&~7; // round up to multiple of 8
// Buckets up to 128 are spaced evenly at 8 bytes.
if (size <= 128) {
unsigned index = size > 4 ? size8 >> 3 : 0;
FixedAllocSafe *a = m_allocs[index];
// make sure I fit
GCAssert(size <= a->GetItemSize());
// make sure I don't fit
GCAssert(index == 0 || size > m_allocs[index-1]->GetItemSize());
return a;
}
// This is the fast lookup table implementation to
// find the right allocator.
// FIXME: do this w/o division!
unsigned index = kSizeClassIndex[kPageUsableSpace/size8];
// assert that I fit
GCAssert(size <= m_allocs[index]->GetItemSize());
// assert that I don't fit (makes sure we don't waste space
GCAssert(size > m_allocs[index-1]->GetItemSize());
return m_allocs[index];
}
}

View File

@@ -1,154 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __Malloc__
#define __Malloc__
namespace MMgc
{
/**
* A general purpose memory allocator using size classes
*/
class FixedMalloc : public GCAllocObject
{
friend class GC;
public:
static void Init();
static void Destroy();
/**
* return the number of bytes of memory issued
*/
size_t Allocated();
static FixedMalloc *GetInstance() { return instance; }
inline void* Alloc(size_t size)
{
void *item;
GCAssert(size + 3 > size);
// overflow detection
if(size+3 < size)
return NULL;
size = (size+3)&~3;
if (size <= (size_t)kLargestAlloc) {
item = FindSizeClass(size)->Alloc(size);
} else {
item = LargeAlloc(size);
}
return item;
}
inline void Free(void *item)
{
if(item == 0)
return;
// small things are never allocated on the 4K boundary b/c the block
// header structure is stored there, large things always are
if(IsLargeAlloc(item)) {
LargeFree(item);
} else {
FixedAllocSafe::GetFixedAllocSafe(item)->Free(item);
}
}
static size_t Size(const void *item)
{
size_t size;
if(IsLargeAlloc(item)) {
size = LargeSize(item);
} else {
size = FixedAlloc::Size(item);
}
#ifdef MEMORY_INFO
size -= DebugSize();
#endif
return size;
}
// private:
FixedMalloc();
~FixedMalloc();
static FixedMalloc *instance;
const static int kLargestAlloc = 2032;
const static int kNumSizeClasses = 41;
const static int kPageUsableSpace = GCHeap::kBlockSize - offsetof(MMgc::FixedAlloc::FixedBlock, items);
static int16 kSizeClasses[kNumSizeClasses];
static uint8 kSizeClassIndex[32];
GCHeap *m_heap;
FixedAllocSafe *m_allocs[kNumSizeClasses];
FixedAllocSafe *FindSizeClass(size_t size) const;
static bool IsLargeAlloc(const void *item)
{
// space made in ctor
item = GetRealPointer(item);
return ((intptr) item & 0xFFF) == 0;
}
inline void *LargeAlloc(size_t size)
{
size += DebugSize();
size_t blocksNeeded = ((size+0xfff)&~0xfff) >> 12;
void *item = m_heap->Alloc(blocksNeeded, true, false);
if(!item)
{
GCAssertMsg(item != NULL, "Large allocation of %d blocks failed!");
}
else
{
#ifdef MEMORY_INFO
item = DebugDecorate(item, size, 5);
memset(item, 0xfb, size - DebugSize());
#endif
}
return item;
}
inline void LargeFree(void *item)
{
#ifdef MEMORY_INFO
item = DebugFree(item, 0xed, 5);
#endif
m_heap->Free(item);
}
static size_t LargeSize(const void *item)
{
return GCHeap::GetGCHeap()->Size(item) * GCHeap::kBlockSize;
}
};
}
#endif /* __Malloc__ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,608 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include "MMgc.h"
namespace MMgc
{
GCAlloc::GCAlloc(GC* gc, int itemSize, bool containsPointers, bool isRC, int sizeClassIndex) :
GCAllocBase(gc),
containsPointers(containsPointers),
containsRCObjects(isRC),
m_sizeClassIndex(sizeClassIndex)
{
// Round itemSize to the nearest boundary of 8
itemSize = (itemSize+7)&~7;
m_firstBlock = NULL;
m_lastBlock = NULL;
m_firstFree = NULL;
m_numAlloc = 0;
m_maxAlloc = 0;
m_itemSize = itemSize;
m_numBlocks = 0;
// The number of items per block is kBlockSize minus
// the # of pointers at the base of each page.
m_itemsPerBlock = (kBlockSize - sizeof(GCBlock)) / m_itemSize;
m_numBitmapBytes = (m_itemsPerBlock>>1) + (m_itemsPerBlock & 1);
// round up to 4 bytes so we can go through the bits 8 items at a time
m_numBitmapBytes = (m_numBitmapBytes+3)&~3;
GCAssert(m_numBitmapBytes<<1 >= m_itemsPerBlock);
int usedSpace = m_itemsPerBlock * m_itemSize + sizeof(GCBlock);
GCAssert(usedSpace <= kBlockSize);
GCAssert(kBlockSize - usedSpace < (int)m_itemSize);
if(kBlockSize - usedSpace >= m_numBitmapBytes) {
m_bitsInPage = true;
} else {
m_bitsInPage = false;
}
// compute values that let us avoid division
GCAssert(m_itemSize <= 0xffff);
ComputeMultiplyShift((uint16)m_itemSize, multiple, shift);
}
GCAlloc::~GCAlloc()
{
// Free all of the blocks
GCAssertMsg(GetNumAlloc() == 0, "You have leaks");
while (m_firstBlock) {
if(((intptr)m_firstBlock->bits & 0xfff) == 0)
m_gc->GetGCHeap()->Free(m_firstBlock->bits);
#ifdef _DEBUG
// go through every item on the free list and make sure it wasn't written to
// after being poisoned.
void *item = m_firstBlock->firstFree;
while(item) {
for(int i=3, n=(m_firstBlock->size>>2)-1; i<n; i++)
{
int data = ((int*)item)[i];
if(data != 0xbabababa && data != 0xcacacaca)
{
GCDebugMsg(false, "Object 0x%x was written to after it was deleted, allocation trace:");
PrintStackTrace((int*)item+2);
GCDebugMsg(false, "Deletion trace:");
PrintStackTrace((int*)item+3);
GCDebugMsg(true, "Deleted item write violation!");
}
}
// next free item
item = *((void**)item);
}
#endif
GCBlock *b = m_firstBlock;
UnlinkChunk(b);
FreeChunk(b);
}
}
GCAlloc::GCBlock* GCAlloc::CreateChunk()
{
// Get space in the bitmap. Do this before allocating the actual block,
// since we might call GC::AllocBlock for more bitmap space and thus
// cause some incremental marking.
uint32* bits = NULL;
if(!m_bitsInPage)
bits = m_gc->GetBits(m_numBitmapBytes, m_sizeClassIndex);
// Allocate a new block
m_maxAlloc += m_itemsPerBlock;
m_numBlocks++;
int numBlocks = kBlockSize/GCHeap::kBlockSize;
GCBlock* b = (GCBlock*) m_gc->AllocBlock(numBlocks, GC::kGCAllocPage);
b->gc = m_gc;
b->alloc = this;
b->size = m_itemSize;
b->needsSweeping = false;
b->bits = m_bitsInPage ? (uint32*)((char*)b + sizeof(GCBlock)) : bits;
// Link the block at the end of the list
b->prev = m_lastBlock;
b->next = 0;
if (m_lastBlock) {
m_lastBlock->next = b;
}
if (!m_firstBlock) {
m_firstBlock = b;
}
m_lastBlock = b;
// Add our new ChunkBlock to the firstFree list (which should be empty)
if (m_firstFree)
{
GCAssert(m_firstFree->prevFree == 0);
m_firstFree->prevFree = b;
}
b->nextFree = m_firstFree;
b->prevFree = 0;
m_firstFree = b;
// calculate back from end (better alignment, no dead space at end)
b->items = (char*)b+GCHeap::kBlockSize - m_itemsPerBlock * m_itemSize;
b->nextItem = b->items;
b->numItems = 0;
return b;
}
void GCAlloc::UnlinkChunk(GCBlock *b)
{
m_maxAlloc -= m_itemsPerBlock;
m_numBlocks--;
// Unlink the block from the list
if (b == m_firstBlock) {
m_firstBlock = b->next;
} else {
b->prev->next = b->next;
}
if (b == m_lastBlock) {
m_lastBlock = b->prev;
} else {
b->next->prev = b->prev;
}
if(b->nextFree || b->prevFree || b == m_firstFree) {
RemoveFromFreeList(b);
}
#ifdef _DEBUG
b->next = b->prev = NULL;
b->nextFree = b->prevFree = NULL;
#endif
}
void GCAlloc::FreeChunk(GCBlock* b)
{
GCAssert(b->numItems == 0);
if(!m_bitsInPage) {
memset(b->GetBits(), 0, m_numBitmapBytes);
m_gc->FreeBits(b->GetBits(), m_sizeClassIndex);
b->bits = NULL;
}
// Free the memory
m_gc->FreeBlock(b, 1);
}
void* GCAlloc::Alloc(size_t size, int flags)
{
(void)size;
GCAssertMsg(((size_t)m_itemSize >= size), "allocator itemsize too small");
start:
if (m_firstFree == NULL) {
if (CreateChunk() == NULL) {
return NULL;
}
}
GCBlock* b = m_firstFree;
// lazy sweeping
if(b->needsSweeping) {
if(!GC::useNewSweep || !m_gc->collecting) {
if(Sweep(b)) {
if(GC::useNewSweep) {
UnlinkChunk(b);
FreeChunk(b);
}
goto start;
}
} else if(b->IsFull()) {
// we are collecting (possibly a Finalize allocation) so we can't
// sweep the page yet (because objects can examine other objects during
// finalize and Sweep poisons. So if we don't have any items (hence
// the IsFull()) we have to create a use a different chunk creating a new
// one if necessary
b = m_firstFree->nextFree;
if(!b) {
CreateChunk();
b = m_firstFree;
}
}
}
GCAssert(b && !b->IsFull());
void *item;
if(b->firstFree) {
item = b->firstFree;
b->firstFree = *((void**)item);
// clear free list pointer, the rest was zero'd in free
*(int*) item = 0;
#ifdef MEMORY_INFO
// ensure previously used item wasn't written to
// -1 because write back pointer space isn't poisoned.
for(int i=3, n=(b->size>>2)-1; i<n; i++)
{
int data = ((int*)item)[i];
if(data != 0xcacacaca && data != 0xbabababa)
{
GCDebugMsg(false, "Object 0x%x was written to after it was deleted, allocation trace:", item);
PrintStackTrace((int*)item+2);
GCDebugMsg(false, "Deletion trace:");
PrintStackTrace((int*)item+3);
GCDebugMsg(true, "Deleted item write violation!");
}
}
#endif
} else {
item = b->nextItem;
if(((int)((char*)item + b->size) & 0xfff) != 0) {
b->nextItem = (char*)item + b->size;
} else {
b->nextItem = NULL;
}
}
// set up bits, items start out white and whether they need finalization
// is determined by the caller
// make sure we ended up in the right place
GCAssert(((flags&GC::kContainsPointers) != 0) == ContainsPointers());
// this assumes what we assert
GCAssert((unsigned long)GC::kFinalize == (unsigned long)GCAlloc::kFinalize);
int index = GetIndex(b, item);
GCAssert(index >= 0);
ClearBits(b, index, 0xf);
SetBit(b, index, flags & kFinalize);
b->numItems++;
#ifdef MEMORY_INFO
m_numAlloc++;
#endif
// If we're out of free items, be sure to remove ourselves from the
// list of blocks with free items.
if (b->IsFull()) {
m_firstFree = b->nextFree;
b->nextFree = NULL;
GCAssert(b->prevFree == NULL);
if (m_firstFree)
m_firstFree->prevFree = 0;
}
return item;
}
/* static */
void GCAlloc::Free(void *item)
{
GCBlock *b = (GCBlock*) ((intptr) item & ~0xFFF);
GCAlloc *a = b->alloc;
#ifdef _DEBUG
// check that its not already been freed
void *free = b->firstFree;
while(free) {
GCAssert(free != item);
free = *((void**) free);
}
#endif
int index = GetIndex(b, item);
if(GetBit(b, index, kHasWeakRef)) {
b->gc->ClearWeakRef(GetUserPointer(item));
}
if(GC::useNewSweep && b->needsSweeping) {
b->alloc->Sweep(b);
}
if(b->IsFull()) {
a->AddToFreeList(b);
}
b->FreeItem(item, index);
if(b->numItems == 0 && !a->IsLastFreeBlock(b)) {
a->UnlinkChunk(b);
a->FreeChunk(b);
}
}
void GCAlloc::Finalize()
{
// Go through every item of every block. Look for items
// that are in use but not marked as reachable, and delete
// them.
GCBlock *next = NULL;
for (GCBlock* b = m_firstBlock; b != NULL; b = next)
{
// we can unlink block below
next = b->next;
static uint32 kMarkBits = 0x11111111;
static uint32 kFinalizeAndWeakRefBits = 0xcccccccc;
GCAssert(kMark == 0x1 && kFinalize == 0x4 && kHasWeakRef == 0x8);
int numMarkedItems = 0;
// TODO: MMX version for IA32
uint32 *bits = (uint32*) b->GetBits();
uint32 count = b->nextItem ? GetIndex(b, b->nextItem) : m_itemsPerBlock;
// round up to eight
count = (count+7)&~7;
for(int i=0, n=count>>3; i < n; i++)
{
uint32 b8 = bits[i];
uint32 unmarkedFinalizeAndWeakRefMask = ((~b8&kMarkBits) << 2) | ((~b8&kMarkBits) << 3);
uint32 finalizeAndWeakRefBits = b8&kFinalizeAndWeakRefBits;
// check the finalize and weak ref bits of unmarked objects
if((unmarkedFinalizeAndWeakRefMask & finalizeAndWeakRefBits) != 0)
{
uint32 marks = b8;
for(int j=0; j<8;j++,marks>>=4)
{
if(marks & kMark || !(marks & (kFinalize|kHasWeakRef)))
continue;
void* item = (char*)b->items + m_itemSize*((i*8)+j);
if (marks & kFinalize)
{
GCFinalizedObject *obj = (GCFinalizedObject*)GetUserPointer(item);
GCAssert(*(int*)obj != 0);
obj->~GCFinalizedObject();
#if defined(_DEBUG) && defined(MMGC_DRC)
if(b->alloc->IsRCObject()) {
m_gc->RCObjectZeroCheck((RCObject*)obj);
}
#endif
}
if (marks & kHasWeakRef) {
b->gc->ClearWeakRef(GetUserPointer(item));
}
}
}
numMarkedItems += CountBits(b8 & kMarkBits);
}
if(GC::useNewSweep && numMarkedItems == 0 && !IsLastFreeBlock(b)) {
// add to list of block to be returned to the Heap after finalization
// we don't do this during finalization b/c we want finalizers to be able
// to reference the memory of other objects being finalized
next = b->next;
UnlinkChunk(b);
b->gc->AddToSweepList(b);
} else if(numMarkedItems == b->numItems) {
// nothing changed on this page
continue;
} else if(GC::useNewSweep) {
// free'ing some items but not all
b->needsSweeping = true;
if(b->IsFull())
AddToFreeList(b);
}
}
}
bool GCAlloc::Sweep(GCBlock *b)
{
bool wasFull = b->IsFull();
// Mark all the items on the free list so we don't try free them again
// TODO: see if we can avoid this somehow
void *item = b->firstFree;
while (item != NULL) {
SetMark(item);
item = *((void**)item);
}
// TODO: MMX version for IA32
uint32 *bits = (uint32*) b->GetBits();
uint32 count = b->nextItem ? GetIndex(b, b->nextItem) : m_itemsPerBlock;
// round up to eight
int numInts = ((count+7)&~7) >> 3;
for(int i=0, n=numInts; i < n; i++)
{
uint32 b8 = bits[i];
uint32 marks = b8;
int subCount = i==(n-1) ? ((count-1)&7)+1 : 8;
for(int j=0; j<subCount;j++,marks>>=4)
{
if(marks & kMark)
continue;
item = (char*)b->items + m_itemSize*(i*8+j);
#ifdef MEMORY_INFO
DebugFreeReverse(item, 0xba, 4);
#endif
b->FreeItem(item, (i*8+j));
}
}
b->needsSweeping = false;
if((b == m_firstFree || b->prevFree != NULL) && // on freelist
b->numItems == 0 && // empty
!IsLastFreeBlock(b))
{
// take this page out of service
return true;
} else if(!GC::useNewSweep && !b->IsFull() && wasFull) {
AddToFreeList(b);
}
if(!GC::useNewSweep && b->numItems == 0) {
UnlinkChunk(b);
FreeChunk(b);
return true;
}
return false;
}
void GCAlloc::Sweep(bool force)
{
// Go through every item of every block. Look for items
// that are in use but not marked as reachable, and delete
// them.
GCBlock* next;
for (GCBlock* b = m_firstBlock; b != NULL; b = next)
{
next = b->next;
bool wasFull = b->IsFull();
// if we aren't forcing and the block wasn't full (ie its
// still on the free list) then just set a flag, the Sweep
// will happen the next time Alloc is called and b is firstFree
if(!force && !wasFull) {
b->needsSweeping = true;
} else {
Sweep(b);
}
}
}
void GCAlloc::ClearMarks()
{
GCBlock *block = m_firstBlock;
start:
while (block) {
GCBlock *next = block->next;
if(block->needsSweeping) {
if(Sweep(block)) {
if(GC::useNewSweep) {
UnlinkChunk(block);
FreeChunk(block);
}
block = next;
goto start;
}
}
// Clear all the mark bits
// FIXME: can we do this in sweep instead?
uint32 *pbits = (uint32*)block->GetBits();
const static uint32 mq32 = 0x33333333;
GCAssert((kMark|kQueued) == 0x3);
// TODO: MMX version for IA32
for(int i=0, n=m_numBitmapBytes>>2; i < n; i++) {
pbits[i] &= ~mq32;
}
// Advance to next block
block = next;
}
}
/*static*/
int GCAlloc::ConservativeGetMark(const void *item, bool bogusPointerReturnValue)
{
GCBlock *block = (GCBlock*) ((intptr) item & ~0xFFF);
#ifdef MEMORY_INFO
item = GetRealPointer(item);
#endif
// guard against bogus pointers to the block header
if (item < block->items)
return bogusPointerReturnValue;
// floor value to start of item
// FIXME: do this w/o division if we can
int itemNum = GetIndex(block, item);
// skip pointers into dead space at end of block
if (itemNum > block->alloc->m_itemsPerBlock - 1)
return bogusPointerReturnValue;
// skip pointers into objects
if(block->items + itemNum * block->size != item)
return bogusPointerReturnValue;
return GetMark(item);
}
// allows us to avoid division in GetItemIndex, kudos to Tinic
void GCAlloc::ComputeMultiplyShift(uint16 d, uint16 &muli, uint16 &shft)
{
uint32 s = 0;
uint32 n = 0;
uint32 m = 0;
for ( ; n < ( 1 << 13 ) ; s++) {
m = n;
n = ( ( 1 << ( s + 1 ) ) / d ) + 1;
}
shft = (uint16) s - 1;
muli = (uint16) m;
}
void GCAlloc::GCBlock::FreeItem(void *item, int index)
{
GCAssert(alloc->m_numAlloc != 0);
void *oldFree = firstFree;
firstFree = item;
#ifdef MEMORY_INFO
alloc->m_numAlloc--;
#endif
numItems--;
// clear all bits
ClearBits(this, index, 0xf);
#ifndef _DEBUG
// memset rest of item not including free list pointer, in _DEBUG
// we poison the memory (and clear in Alloc)
// FIXME: can we do something faster with MMX here?
if(!alloc->IsRCObject())
memset((char*)item, 0, size);
#endif
// Add this item to the free list
*((void**)item) = oldFree;
}
}

View File

@@ -1,342 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCAlloc__
#define __GCAlloc__
namespace MMgc
{
/**
*
* This is a fast, fixed-size memory allocator for garbage-collected
* objects.
*
* Memory is allocated from the system on 4096-byte aligned boundaries,
* which corresponds to the size of an OS page in Windows XP. Allocation
* of pages is performed via the GCPageAlloc class.
*
* In each 4096-byte block, there is a block header with marked bits,
* finalize bits, the pointer to the next free item and "recycling"
* free item linked list.
*
* The bits of the "marked" bitmap are controlled by the SetMark method.
*
* The bits of the "finalize" bitmap are set when an item is
* allocated. The value for the finalize bit is passed in as a
* parameter to the allocation call.
*
* When the Sweep method is invoked, all objects that are not marked
* with the specified mark flag are disposed of. If the corresponding
* finalize bit is set, the GCObject destructor is invoked on that
* item.
*
* When an allocation is requested and there are no more free
* entries, GCAlloc will request that a garbage collection take
* place. It will allocate new blocks if more than 20% of its
* blocks are used after the collection, targeting a 5:1
* heap size / minimim heap size ratio.
*
*/
class GCAlloc : public GCAllocBase
{
friend class GC;
public:
enum ItemBit { kMark=1, kQueued=2, kFinalize=4, kHasWeakRef=8 };
GCAlloc(GC* gc, int itemSize, bool containsPointers, bool isRC, int sizeClassIndex);
~GCAlloc();
void* Alloc(size_t size, int flags);
static void Free(void *ptr);
void Finalize();
void Sweep(bool force=false);
size_t GetItemSize() { return m_itemSize; }
void ClearMarks();
static int SetMark(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return SetBit(block, GetIndex(block, item), kMark);
}
static int SetQueued(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return SetBit(block, GetIndex(block, item), kQueued);
}
static int SetFinalize(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return SetBit(block, GetIndex(block, item), kFinalize);
}
static int IsWhite(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
// not a real item
if(item < block->items)
return false;
if(FindBeginning(item) != item)
return false;
return IsWhite(block, GetIndex(block, item));
}
static int GetMark(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
// Return the "marked" bit
return GetBit(block, GetIndex(block, item), kMark);
}
static void *FindBeginning(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return block->items + block->size * GetIndex(block, item);
}
static void ClearFinalized(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
ClearBits(block, GetIndex(block, item), kFinalize);
}
static int IsFinalized(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return GetBit(block, GetIndex(block, item), kFinalize);
}
static int HasWeakRef(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return GetBit(block, GetIndex(block, item), kHasWeakRef);
}
static bool ContainsPointers(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return block->alloc->ContainsPointers();
}
static bool IsRCObject(const void *item)
{
// Zero low 12 bits of address to get to the Block header
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
return item >= block->items && block->alloc->IsRCObject();
}
static bool IsUnmarkedPointer(const void *val);
int GetNumAlloc() const { return m_numAlloc; }
int GetMaxAlloc() const { return m_maxAlloc; }
int GetNumBlocks() const { return m_numBlocks; }
bool ContainsPointers() const { return containsPointers; }
bool IsRCObject() const { return containsRCObjects; }
void GetBitsPages(void **pages);
static void SetHasWeakRef(const void *item, bool to)
{
GCBlock *block = (GCBlock*) ((uint32)item & ~0xFFF);
if(to) {
SetBit(block, GetIndex(block, item), kHasWeakRef);
} else {
ClearBits(block, GetIndex(block, item), kHasWeakRef);
}
}
private:
const static int kBlockSize = 4096;
struct GCBlock;
friend struct GCAlloc::GCBlock;
struct GCBlock
{
GC *gc;
uint32 size;
GCAlloc *alloc;
char* nextItem;
void* firstFree; // first item on free list
GCBlock* next;
GCBlock* prev;
GCBlock *prevFree;
GCBlock *nextFree;
uint32* bits;
short numItems;
bool needsSweeping;
char *items;
int GetCount() const
{
if (nextItem) {
return GCAlloc::GetIndex(this, nextItem);
} else {
return alloc->m_itemsPerBlock;
}
}
uint32 *GetBits() const
{
return bits;
}
void FreeItem(void *item, int index);
bool IsFull()
{
bool full = (nextItem == firstFree);
// the only time nextItem and firstFree should be equal is when they
// are both zero which is also when we are full, assert to be sure
GCAssert(!full || nextItem==0);
GCAssert(!full || numItems == alloc->m_itemsPerBlock);
return full;
}
};
// The list of chunk blocks
GCBlock* m_firstBlock;
GCBlock* m_lastBlock;
// The lowest priority block that has free items
GCBlock* m_firstFree;
int m_itemsPerBlock;
size_t m_itemSize;
int m_numBitmapBytes;
int m_sizeClassIndex;
bool m_bitsInPage;
int m_maxAlloc;
int m_numAlloc;
int m_numBlocks;
// fast divide numbers
uint16 multiple;
uint16 shift;
bool containsPointers;
bool containsRCObjects;
GCBlock* CreateChunk();
void UnlinkChunk(GCBlock *b);
void FreeChunk(GCBlock* b);
void AddToFreeList(GCBlock *b)
{
GCAssert(b->nextFree == NULL && b->prevFree == NULL);
b->prevFree = NULL;
b->nextFree = m_firstFree;
if (m_firstFree) {
GCAssert(m_firstFree->prevFree == 0);
m_firstFree->prevFree = b;
}
m_firstFree = b;
}
void RemoveFromFreeList(GCBlock *b)
{
GCAssert(m_firstFree == b || b->prevFree != NULL);
if ( m_firstFree == b )
m_firstFree = b->nextFree;
else
b->prevFree->nextFree = b->nextFree;
if (b->nextFree)
b->nextFree->prevFree = b->prevFree;
}
bool Sweep(GCBlock *b);
bool IsLastFreeBlock(GCBlock *b) { return m_firstFree == NULL || (m_firstFree == b && b->nextFree == NULL); }
static int ConservativeGetMark(const void *item, bool bogusPointerReturnValue);
static int GetIndex(const GCBlock *block, const void *item)
{
int index = (((char*) item - block->items) * block->alloc->multiple) >> block->alloc->shift;
#ifdef _DEBUG
GCAssert(((char*) item - block->items) / block->size == (uint32) index);
#endif
return index;
}
static int IsWhite(GCBlock *block, int index)
{
return (block->GetBits()[index>>3] & ((kMark|kQueued)<<((index&7)<<2))) == 0;
}
static int SetBit(GCBlock *block, int index, int bit)
{
int mask = bit << ((index&7)<<2);
int set = (block->GetBits()[index>>3] & mask);
block->GetBits()[index>>3] |= mask;
return set;
}
static int GetBit(GCBlock *block, int index, int bit)
{
int mask = bit << ((index&7)<<2);
return block->GetBits()[index>>3] & mask;
}
static void ClearBits(GCBlock *block, int index, int bits)
{
int mask = bits << ((index&7)<<2);
block->GetBits()[index>>3] &= ~mask;
}
void ComputeMultiplyShift(uint16 d, uint16 &muli, uint16 &shft);
};
}
#endif /* __GCAlloc__ */

View File

@@ -1,71 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdlib.h>
#include "MMgc.h"
#include "GCDebug.h"
namespace MMgc
{
/* Returns the number of bits set in val.
* For a derivation of this algorithm, see
* "Algorithms and data structures with applications to
* graphics and geometry", by Jurg Nievergelt and Klaus Hinrichs,
* Prentice Hall, 1993.
*/
int GCAllocBase::CountBits(uint32 value)
{
value -= (value & 0xaaaaaaaaL) >> 1;
value = (value & 0x33333333L) + ((value >> 2) & 0x33333333L);
value = (value + (value >> 4)) & 0x0f0f0f0fL;
value += value >> 8;
value += value >> 16;
return (int)value & 0xff;
}
#ifdef MEMORY_INFO
void GCAllocBase::WriteBackPointer(const void *item, const void *container, size_t itemSize)
{
GCAssert(container != NULL);
int *p = (int*) item;
size_t size = *p++;
if(size && size <= itemSize) {
// skip traceIndex + data + endMarker
p += (2 + (size>>2));
GCAssert(sizeof(int) == sizeof(void*));
*p = (int) container;
}
}
#endif
}

View File

@@ -1,105 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCAllocBase__
#define __GCAllocBase__
namespace MMgc
{
class GC;
/**
* This is a base class for the GC allocators.
*/
class GCAllocBase : public GCAllocObject
{
public:
GCAllocBase(GC *gc) { m_gc = gc; }
virtual ~GCAllocBase() {}
#ifdef MMGC_IA32
static inline uint32 FindOneBit(uint32 value)
{
#ifndef __GNUC__
_asm
{
bsr eax,[value];
}
#else
// DBC - This gets rid of a compiler warning and matchs PPC results where value = 0
register int result = ~0;
if (value)
{
asm (
"bsr %1, %0"
: "=r" (result)
: "m"(value)
);
}
return result;
#endif
}
#endif
#ifdef MMGC_PPC
static inline int FindOneBit(uint32 value)
{
register int index;
#ifdef DARWIN
asm ("cntlzw %0,%1" : "=r" (index) : "r" (value));
#else
register uint32 in = value;
asm { cntlzw index, in; }
#endif
return 31-index;
}
#endif
static int CountBits(uint32 value);
#ifdef MEMORY_INFO
// debugging routine that records who marked who, can be used to
// answer the question, how did I get marked? also could be used to
// find false positives by verifying the back pointer chain gets back
// to a GC root
static void WriteBackPointer(const void *item, const void *container, size_t itemSize);
#endif
protected:
GC *m_gc;
};
}
#endif /* __GCAllocBase__ */

View File

@@ -1,59 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCAllocObject__
#define __GCAllocObject__
namespace MMgc
{
/**
* GCAllocObject is a base class for allocated objects. MMgc
* cannot have any dependency on the C runtime library, because
* Flash Player does not. MMgc also cannot rely on global
* operator new and delete, because it may be used to implement
* them! So, GCAllocObject provides a simple operator new and
* delete implementation for classes used internally by MMgc.
*
* The implementation of GCAllocObject is platform-dependent.
*/
class GCAllocObject
{
public:
void* operator new (size_t size);
void* operator new [] (size_t size);
void operator delete (void *ptr);
void operator delete [] (void *ptr);
};
}
#endif /* __GCAllocObject__ */

View File

@@ -1,81 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdlib.h>
#include "MMgc.h"
namespace MMgc
{
#if TARGET_API_MAC_CARBON
void* GCAllocObject::operator new (size_t size)
{
return malloc(size);
}
void* GCAllocObject::operator new[] (size_t size)
{
return malloc(size);
}
void GCAllocObject::operator delete (void *ptr)
{
free(ptr);
}
void GCAllocObject::operator delete[](void *ptr)
{
free(ptr);
}
#else
void* GCAllocObject::operator new (size_t size)
{
return NewPtr(size);
}
void* GCAllocObject::operator new[] (size_t size)
{
return NewPtr(size);
}
void GCAllocObject::operator delete (void *ptr)
{
DisposePtr((char*) ptr);
}
void GCAllocObject::operator delete[](void *ptr)
{
DisposePtr((char*) ptr);
}
#endif
}

View File

@@ -1,59 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdlib.h>
#include "MMgc.h"
namespace MMgc
{
void* GCAllocObject::operator new (size_t size)
{
return malloc(size);
}
void* GCAllocObject::operator new[] (size_t size)
{
return malloc(size);
}
void GCAllocObject::operator delete (void *ptr)
{
free(ptr);
}
void GCAllocObject::operator delete [] (void *ptr)
{
free(ptr);
}
}

View File

@@ -1,59 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <windows.h>
#include "MMgc.h"
namespace MMgc
{
void* GCAllocObject::operator new (size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
void* GCAllocObject::operator new[] (size_t size)
{
return HeapAlloc(GetProcessHeap(), 0, size);
}
void GCAllocObject::operator delete (void *ptr)
{
HeapFree(GetProcessHeap(), 0, ptr);
}
void GCAllocObject::operator delete [] (void *ptr)
{
HeapFree(GetProcessHeap(), 0, ptr);
}
}

View File

@@ -1,108 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCDebug__
#define __GCDebug__
#include "GCTypes.h"
#ifdef WIN32
#include <windows.h>
#endif
#ifdef _MAC
typedef const unsigned char* ConstStr255Param;
extern "C"
{
#if defined(TARGET_RT_MAC_MACHO) // DBC
//extern pascal void DebugStr(ConstStr255Param aStr);
#else
// extern pascal void DebugStr(ConstStr255Param aStr) = 0xABFF;
extern pascal void SysBreakStr(ConstStr255Param aStr) = {0x303C, 0xFE15, 0xA9C9};
#endif
}
#endif
namespace MMgc
{
void GCDebugMsg(bool debuggerBreak, const char* format, ...);
void GCDebugMsg(const char* msg, bool debuggerBreak);
void GCDebugMsg(const wchar* msg, bool debuggerBreak);
#ifdef _DEBUG
inline void _GCAssertMsg(int32 assertion, const char* msg)
{
if (assertion == 0)
GCDebugMsg(msg, true);
}
#define GCAssertMsg(x,y) do { _GCAssertMsg((x), (y)); } while (0) /* no semi */
#define GCAssert(x) _GCAssert((x), __LINE__,__FILE__)
#define _GCAssert(x, line_, file_) __GCAssert((x), line_, file_)
#define __GCAssert(x, line_, file_) do { _GCAssertMsg((x), "Assertion failed: \"" #x "\" (" #file_ ":" #line_ ")"); } while (0) /* no semi */
#else
#define GCAssertMsg(x,y) do { } while (0) /* no semi */
#define GCAssert(x) do { } while (0) /* no semi */
#endif
/*************************************************************************/
/******************************* Debugging *******************************/
/*************************************************************************/
/* This mess serves to define the DebugMsg function on each platform.
* DebugMsg is only defined when the Debug flag is turned on; it halts
* program execution and drops into the debugger with the given message.
* We define it as in inline so that when you fall into the debugger,
* you're in the function that issued the call and not in a "DebugMsg"
* subroutine.
*/
#ifdef _MAC
// WARNING: this function is NOT THREAD SAFE
/*plugin_export*/ ConstStr255Param MakePascalMsg(const char* theString);
#if SOFT_ASSERTS
inline void DebugMsg_(const char* /*msg*/) { }
#else
#ifdef powerc
inline void DebugMsg_(const char* msg) { DebugStr(MakePascalMsg(msg)); }
#else
inline void DebugMsg_(const char* msg) { SysBreakStr(MakePascalMsg(msg)); }
#endif
#endif // SOFT_ASSERTS
#endif
}
#endif /* __GCDebug__ */

View File

@@ -1,123 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
#ifndef __MWERKS__
#include <CoreServices/CoreServices.h>
#endif
#ifndef __MACH__
#include <windows.h>
#endif
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
namespace MMgc
{
void GCDebugMsg(bool debuggerBreak, const char* format, ...)
{
char buf[4096];
va_list args;
va_start(args, format);
#if TARGET_API_MAC_CARBON
vsprintf(buf, format, args);
#else
char *bufptr = buf;
// copied from flashstring
while (*format) {
if (*format == '%') {
switch (*++format) {
case 's':
strcpy(bufptr, va_arg(args, char *));
break;
case 'd':
{
int i = va_arg(args, int);
if (!i) {
*bufptr++ = '0';
} else {
if (i < 0) {
*bufptr++ = '-';
i = -i;
}
int n = 0;
char m_buf[128];
while (i > 0) {
int v = (i % 10);
m_buf[n++] = (v<10) ? (v+'0') : (v-10+'a');
i /= 10;
}
char* c = m_buf+n;
while (n--) {
*bufptr++ = (*--c);
}
}
break;
}
case 'c':
*bufptr++ = va_arg(args, char);
break;
case 0:
return;
}
} else {
*bufptr = *format;
}
format++;
bufptr++;
}
#endif
va_end(args);
GCDebugMsg(buf, debuggerBreak);
}
void GCDebugMsg(const char* p, bool debugBreak)
{
char buf[256];
strcpy(buf, p);
if(debugBreak) {
#if TARGET_API_MAC_CARBON
::CopyCStringToPascal(buf, (StringPtr)buf);
#else
c2pstr(buf);
#endif
DebugStr((StringPtr) buf);
} else {
CFStringRef cfStr = ::CFStringCreateWithCString(NULL, buf, kCFStringEncodingUTF8);
::CFShow(cfStr);
}
}
}

View File

@@ -1,54 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
namespace MMgc
{
void GCDebugMsg(bool debuggerBreak, const char* format, ...)
{
va_list args;
va_start(args, format);
vfprintf(stderr, format, args);
va_end(args);
}
void GCDebugMsg(const char* p, bool debugBreak)
{
fprintf(stderr, "%s\n", p);
}
}

View File

@@ -1,103 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#ifdef _DEBUG
#include <malloc.h>
#include <strsafe.h>
#endif
/*************************************************************************/
/******************************* Debugging *******************************/
/*************************************************************************/
#ifndef MB_SERVICE_NOTIFICATION
#define MB_SERVICE_NOTIFICATION 0x00200000L
#endif
namespace MMgc
{
static const bool logToStdErr = true;
void GCDebugMsg(bool debuggerBreak, const char *format, ...)
{
// [ggrossman 09.24.04]
// Changed this to _DEBUG only because we don't link to
// CRT in Release builds, so vsprintf is unavailable!!
#ifdef _DEBUG
va_list argptr;
va_start(argptr, format);
int bufferSize = _vscprintf(format, argptr)+1;
char *buffer = (char*)alloca(bufferSize+2);
if (buffer) {
StringCbVPrintf(buffer, bufferSize+1, format, argptr);
GCDebugMsg(buffer, debuggerBreak);
}
#else
(void)debuggerBreak;
(void)format;
#endif
}
void GCDebugMsg(const char* msg, bool debugBreak)
{
OutputDebugString(msg);
if(logToStdErr) {
fprintf( stderr, "%s\n", msg );
}
if (debugBreak) {
DebugBreak();
}
}
void GCDebugMsg(const wchar* msg, bool debugBreak)
{
OutputDebugStringW((LPCWSTR)msg);
if(logToStdErr) {
fprintf( stderr, "%S\n", msg );
}
if (debugBreak) {
DebugBreak();
}
}
}

View File

@@ -1,174 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
namespace MMgc
{
const void *GCHashtable::DELETED = (const void*)1;
GCHashtable::GCHashtable(unsigned int capacity)
{
tableSize = capacity*2;
table = new const void*[tableSize];
memset(table, 0, tableSize * sizeof(void*));
numValues = 0;
numDeleted = 0;
}
GCHashtable::~GCHashtable()
{
delete [] table;
table = 0;
tableSize = 0;
numDeleted = 0;
numValues = 0;
}
void GCHashtable::put(const void *key, const void *value)
{
int i = find(key, table, tableSize);
if (table[i] != key) {
// .75 load factor, note we don't take numDeleted into account
// we want to rehash a table with lots of deleted slots
if(numValues * 8 > tableSize * 3)
{
grow();
// grow rehashes
i = find(key, table, tableSize);
}
table[i] = key;
numValues++;
}
table[i+1] = value;
}
const void *GCHashtable::remove(const void *key)
{
const void *ret = NULL;
int i = find(key, table, tableSize);
if (table[i] == key) {
table[i] = (const void*)DELETED;
ret = table[i+1];
table[i+1] = NULL;
numDeleted++;
}
return ret;
}
const void *GCHashtable::get(const void *key)
{
return table[find(key, table, tableSize)+1];
}
/* static */
int GCHashtable::find(const void *key, const void **table, unsigned int tableSize)
{
GCAssert(key != (const void*)DELETED);
int bitmask = (tableSize - 1) & ~0x1;
// this is a quadratic probe but we only hit even numbered slots since those hold keys.
int n = 7 << 1;
#ifdef _DEBUG
unsigned loopCount = 0;
#endif
// Note: Mask off MSB to avoid negative indices. Mask off bottom
// 2 bits because of alignment. Double it because names, values stored adjacently.
unsigned i = ((0x7FFFFFF8 & (int)key)>>1) & bitmask;
const void *k;
while ((k=table[i]) != key && k != NULL)
{
i = (i + (n += 2)) & bitmask; // quadratic probe
GCAssert(loopCount++ < tableSize); // don't scan forever
}
GCAssert(i <= ((tableSize-1)&~0x1));
return i;
}
void GCHashtable::grow()
{
int newTableSize = tableSize;
unsigned int occupiedSlots = numValues - numDeleted;
GCAssert(numValues >= numDeleted);
// grow or shrink as appropriate:
// if we're greater than %50 full grow
// if we're less than %10 shrink
// else stay the same
if (4*occupiedSlots > tableSize)
newTableSize <<= 1;
else if(20*occupiedSlots < tableSize &&
tableSize > kDefaultSize)
newTableSize >>= 1;
const void **newTable = new const void*[newTableSize];
memset(newTable, 0, newTableSize*sizeof(void*));
numValues = 0;
numDeleted = 0;
for (int i=0, n=tableSize; i < n; i += 2)
{
const void *oldKey;
if ((oldKey=table[i]) != NULL)
{
// inlined & simplified version of put()
if(oldKey != (const void*)DELETED) {
int j = find(oldKey, newTable, newTableSize);
newTable[j] = oldKey;
newTable[j+1] = table[i+1];
numValues++;
}
}
}
delete [] table;
table = newTable;
tableSize = newTableSize;
}
int GCHashtable::nextIndex(int index)
{
unsigned int i = index<<1;
while(i < tableSize)
{
if(table[i] > DELETED)
return (i>>1)+1;
i += 2;
}
return 0;
}
}

View File

@@ -1,114 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCHashtable__
#define __GCHashtable__
namespace MMgc
{
class GCHashtableIterator;
/**
* simplified version of avmplus hashtable, doesn't shrink or handle deletions for instance
*/
class GCHashtable
{
friend class GCHashtableIterator;
public:
const static uint32 kDefaultSize=16;
const static void * DELETED;
GCHashtable(unsigned int capacity=kDefaultSize);
~GCHashtable();
const void *get(const void *key);
const void *get(int key) { return get((const void*)key); }
const void *remove(const void *key);
// updates value if present, adds and grows if necessary if not
void put(const void *key, const void *value);
void add(const void *key, const void *value) { put(key, value); }
void add(int key, const void *value) { put((const void*)key, value); }
int count() { return numValues; }
int nextIndex(int index);
const void *keyAt(int index) { return table[index<<1]; }
const void *valueAt(int index) { return table[((index)<<1)+1]; }
private:
// capacity
unsigned int tableSize;
// size of table array
unsigned int numValues;
// number of delete items
unsigned int numDeleted;
// table elements
const void **table;
static int find(const void *key, const void **table, unsigned int tableSize);
void grow();
};
class GCHashtableIterator
{
public:
GCHashtableIterator(GCHashtable *ht) : ht(ht), index(-2) {}
const void *nextKey()
{
do {
index+=2;
} while(index < (int)ht->tableSize && ht->table[index] <= GCHashtable::DELETED);
if(index < (int)ht->tableSize)
return ht->table[index];
return NULL;
}
const void *value()
{
GCAssert(ht->table[index] != NULL);
return ht->table[index+1];
}
void remove()
{
GCAssert(ht->table[index] != NULL);
ht->table[index] = (const void*)GCHashtable::DELETED;
ht->table[index+1] = NULL;
}
private:
GCHashtable *ht;
int index;
};
}
#endif

File diff suppressed because it is too large Load Diff

View File

@@ -1,392 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCHeap__
#define __GCHeap__
namespace MMgc
{
/**
* GCHeap is a heap manager for the Flash Player's garbage collector.
*
* Memory is allocated from the operating system in large chunks
* aligned on page boundaries (4096-byte aligned). All allocation
* requests are specified in numbers of 4096-byte pages. The first
* 4 bytes of each page is reserved for GCHeap's use.
*
* Allocations may fail if there is no free block large enough
* to satisfy the request. When this occurs, the GC class will
* choose to either garbage collect or expand the heap, and then
* call GCHeap again to retry the allocation.
*
* When blocks are freed, they are coalesced with their neighbors
* when possible to reduce fragmentation. A "boundary tag" scheme
* similar to Doug Lea's malloc is used to make coalescing fast.
* To keep things simple, coalescing is always performed immediately
* when a block is freed, and not deferred.
*
* Allocations are performed using multiple free lists. Blocks that
* are <= kUniqueThreshold pages in size get their own free list.
* Blocks above the threshold get mapped to more granular free lists,
* and all blocks above kHugeThreshold get mapped to the last free list.
* This approach is borrowed from Hans Boehm's C/C++ Garbage Collector.
*
* Free lists are doubly-linked lists sorted in size order. The
* sorting is done to ensure best-fit allocation. Each free list
* is itself a list node, and the lists are circular, in a technique
* also borrowed from Doug Lea's malloc. This makes for very simple
* logic to insert/remove nodes.
*
* Only Windows is currently supported, although this should be easy
* to get working on other platforms. Memory is allocated in large
* (64K minimum) chunks using the VirtualAlloc API. Every time the
* heap is expanded, a new heap region is created corresponding to
* the address space returned by VirtualAlloc. Heap regions are
* allocated contiguously if possible to reduce fragmentation.
*/
class GCHeap : public GCAllocObject
{
public:
// -- Constants
/** Size of a block */
const static int kBlockSize = 4096;
/** Initial heap size, in blocks */
static int kInitialHeapSize;
/** Default size of address space reserved per region */
const static int kDefaultReserve = 4096;
/** Sizes up to this many blocks each have their own free list. */
const static int kUniqueThreshold = 16;
/**
* Sizes of at least this many heap blocks are mapped to a
* single free list.
*/
const static int kHugeThreshold = 128;
/** In between sizes map this many distinct sizes to a single bin. */
const static int kFreeListCompression = 8;
/** Calculated number of free lists */
const static int kNumFreeLists = (kHugeThreshold-kUniqueThreshold)/kFreeListCompression+kUniqueThreshold;
/** Minimum heap increment, in blocks */
const static int kMinHeapIncrement = 32;
/** if this much of the heap stays free for kDecommitThresholdMillis decommit some memory */
const static int kDecommitThresholdPercentage = 25;
static const int kDecommitThresholdMillis = 1000;
/** The native VM page size (in bytes) for the current architecture */
static int kNativePageSize;
static bool heapVerbose;
/**
* Init must be called to set up the GCHeap singleton
*/
static void Init(GCMallocFuncPtr malloc = NULL, GCFreeFuncPtr free = NULL);
/**
* Destroy the GCHeap singleton
*/
static void Destroy();
/**
* Get the GCHeap singleton
*/
static GCHeap *GetGCHeap() { GCAssert(instance != NULL); return instance; }
/**
* Allocates a block from the heap.
* @param size the number of pages (kBlockSize bytes apiece)
* to allocate.
* @return pointer to beginning of block, or NULL if failed.
*/
void *Alloc(int size, bool expand=true, bool zero=true);
/**
* Frees a block.
* @param item the block to free. This must be the same
* pointer that was previously returned by
* a call to Alloc.
*/
void Free(void *item);
size_t Size(const void *item);
/**
* Expands the heap by size pages.
*
* Expands the heap by "size" blocks, such that a single contiguous
* allocation of "size" blocks can be performed. This method is
* also called to create the initial heap.
*
* On Windows, this uses the VirtualAlloc API to obtain memory.
* VirtualAlloc can _reserve_ memory, _commit_ memory or both at
* the same time. Reserved memory is just virtual address space.
* It consumes the address space of the process but isn't really
* allocated yet; there are no pages committed to it yet.
* Memory allocation really occurs when reserved pages are
* committed. Our strategy in GCHeap is to reserve a fairly large
* chunk of address space, and then commit pages from it as needed.
* By doing this, we're more likely to get contiguous regions in
* memory for our heap.
*
* By default, we reserve 16MB (4096 pages) per heap region.
* The amount to reserve by default is controlled by kDefaultReserve.
* That shouldn't be a big deal, as the process address space is 2GB.
* As we're usually a plug-in, however, we don't want to make it too
* big because it's not all our memory.
*
* The goal of reserving so much address space is so that subsequent
* expansions of the heap are able to obtain contiguous memory blocks.
* If we can keep the heap contiguous, that reduces fragmentation
* and the possibility of many small "Balkanized" heap regions.
*
* Algorithm: When an allocation is requested,
* 1. If there is enough reserved but uncommitted memory in the
* last-created region to satisfy the request, commit that memory
* and exit with success, also check decommitted list
* 2. Try to reserve a new region contiguous with the last-created
* region. Go for a 16MB reservation or the requested size,
* whichever is bigger.
* 3. If we tried for 16MB reserved space and it didn't work, try
* to reserve again, but for the requested size.
* 4. If we were able to retrieve a contiguous region in Step 2 or 3,
* commit any leftover memory from the last-created region,
* commit the remainer from the newly created region, and exit
* with success.
* 5. OK, the contiguous region didn't work out, so allocate a
* non-contiguous region. Go for 16MB or the requested size
* again, whichever is bigger.
* 6. If we tried for 16MB reserved space and it didn't work, try
* to reserve again, but for the requested size.
* 7. Commit the requested size out of the newly created region
* and exit with success.
*
* If we are able to reserve memory but can't commit it, then, well
* there isn't enough memory. We free the reserved memory and
* exit with failure.
*
* @param size the number of pages to expand the heap by
*/
bool ExpandHeap(int size);
/**
* Returns the used heap size, that is, the total
* space actually used by allocated objects.
* @return the minimum heap size in pages (kBlockSize bytes apiece)
*/
unsigned int GetUsedHeapSize() const { return numAlloc; }
/**
* Returns the "free heap size", that is, the difference in the
* total heap size and the used heap size
* @return the minimum heap size in pages (kBlockSize bytes apiece)
*/
unsigned int GetFreeHeapSize() const { return GetTotalHeapSize()-numAlloc; }
/**
* Returns the total heap size, that is, the total amount
* of space managed by the heap, including all used and
* free space.
* @return the total heap size in pages (kBlockSize bytes apiece)
*/
unsigned int GetTotalHeapSize() const { return blocksLen - numDecommitted; }
/**
* gives memory back to the OS when there hasn't been any memory activity in a while
* and we have lots of free memory
*/
void Decommit();
private:
// -- Implementation
static GCHeap *instance;
GCHeap(GCMallocFuncPtr m, GCFreeFuncPtr f);
~GCHeap();
// Heap regions
class Region : public GCAllocObject
{
public:
Region *prev;
char *baseAddr;
char *reserveTop;
char *commitTop;
int blockId;
};
Region *lastRegion;
// Block struct used for free lists and memory traversal
class HeapBlock : public GCAllocObject
{
public:
char *baseAddr; // base address of block's memory
int size; // size of this block
int sizePrevious; // size of previous block
HeapBlock *prev; // prev entry on free list
HeapBlock *next; // next entry on free list
bool committed; // is block fully committed?
bool dirty; // needs zero'ing, only valid if committed
#ifdef MEMORY_INFO
int allocTrace;
#endif
bool inUse() { return prev == NULL; }
};
bool ExpandHeapPrivate(int size);
// Core data structures
HeapBlock *blocks;
unsigned int blocksLen;
unsigned int numDecommitted;
HeapBlock freelists[kNumFreeLists];
unsigned int numAlloc;
// Core methods
void AddToFreeList(HeapBlock *block);
void AddToFreeList(HeapBlock *block, HeapBlock* pointToInsert);
HeapBlock *AllocBlock(int size, bool& zero);
void FreeBlock(HeapBlock *block);
void FreeAll();
HeapBlock *Split(HeapBlock *block, int size);
#ifdef DECOMMIT_MEMORY
void Commit(HeapBlock *block);
#endif
#ifdef _DEBUG
friend class GC;
#endif
HeapBlock *AddrToBlock(const void *item) const;
Region *AddrToRegion(const void *item) const;
void RemoveRegion(Region *r);
// only used on mac
GCMallocFuncPtr m_malloc;
GCFreeFuncPtr m_free;
// debug only freelist consistency checks
void CheckFreelist();
bool BlocksAreContiguous(void *item1, void *item2);
// Remove a block from a free list (inlined for speed)
inline void RemoveFromList(HeapBlock *block)
{
GCAssert(!block->inUse());
block->prev->next = block->next;
block->next->prev = block->prev;
block->next = block->prev = 0;
}
// Map a number of blocks to the appropriate large block free list index
// (inlined for speed)
inline int GetFreeListIndex(int size)
{
if (size <= kUniqueThreshold) {
return size-1;
} else if (size >= kHugeThreshold) {
return kNumFreeLists-1;
} else {
return (size-kUniqueThreshold)/kFreeListCompression+kUniqueThreshold-1;
}
}
// used for decommit smoothing
// millis to wait before decommitting anything
uint64 decommitTicks;
uint64 decommitThresholdTicks;
#ifdef GCHEAP_LOCK
GCSpinLock m_spinlock;
#endif /* GCHEAP_LOCK */
#ifdef MMGC_AVMPLUS
// OS abstraction to determine native page size
int vmPageSize();
size_t committedCodeMemory;
#ifdef WIN32
bool useGuardPages;
#endif
public:
// support for jit buffers
void* ReserveCodeMemory(void* address, size_t size);
void* CommitCodeMemory(void* address, size_t size=0); // size=0 => 1 page
void* DecommitCodeMemory(void* address, size_t size=0); // size=0 => 1 page
void ReleaseCodeMemory(void* address, size_t size);
bool SetGuardPage(void *address);
#ifdef AVMPLUS_JIT_READONLY
void SetExecuteBit(void *address, size_t size, bool executeFlag);
#endif /* AVMPLUS_JIT_READONLY */
size_t GetCodeMemorySize() const { return committedCodeMemory; }
#endif
#ifdef USE_MMAP
public:
char *ReserveMemory(char *address, size_t size);
bool CommitMemory(char *address, size_t size);
bool DecommitMemory(char *address, size_t size);
void ReleaseMemory(char *address, size_t size);
bool CommitMemoryThatMaySpanRegions(char *address, size_t size);
bool DecommitMemoryThatMaySpanRegions(char *address, size_t size);
#else
char *AllocateMemory(size_t size);
void ReleaseMemory(char *address);
#endif
private:
#ifdef _DEBUG
/* m_megamap is a debugging aid for finding bugs in this
memory allocator. It tracks allocated/free pages in
the crudest way possible ... a 1MB byte array with a
0/1 byte for every page in the 32-bit address space. */
static uint8 m_megamap[1048576];
#endif
};
}
#endif /* __GCHeap__ */

View File

@@ -1,368 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "MMgc.h"
#include "GC.h"
#ifdef USE_MMAP
#include <sys/mman.h>
#endif
#if defined(__MACH__)
#include <mach/mach.h>
#endif
#ifdef _MAC
#define MAP_ANONYMOUS MAP_ANON
#endif
#if defined(MMGC_IA32) && defined(MEMORY_INFO)
#include <dlfcn.h>
#endif
namespace MMgc
{
#ifndef USE_MMAP
void *aligned_malloc(size_t size, size_t align_size, GCMallocFuncPtr m_malloc)
{
char *ptr, *ptr2, *aligned_ptr;
int align_mask = align_size - 1;
int alloc_size = size + align_size + sizeof(int);
ptr=(char *)m_malloc(alloc_size);
if(ptr==NULL) return(NULL);
ptr2 = ptr + sizeof(int);
aligned_ptr = ptr2 + (align_size - ((size_t)ptr2 & align_mask));
ptr2 = aligned_ptr - sizeof(int);
*((int *)ptr2)=(int)(aligned_ptr - ptr);
return(aligned_ptr);
}
void aligned_free(void *ptr, GCFreeFuncPtr m_free)
{
int *ptr2=(int *)ptr - 1;
char *unaligned_ptr = (char*) ptr - *ptr2;
m_free(unaligned_ptr);
}
#endif /* !USE_MMAP */
#ifdef MMGC_AVMPLUS
#ifdef USE_MMAP
int GCHeap::vmPageSize()
{
long v = sysconf(_SC_PAGESIZE);
if (v == -1) v = 4096; // Mac 10.1 needs this
return v;
}
void* GCHeap::ReserveCodeMemory(void* address,
size_t size)
{
return mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
}
void GCHeap::ReleaseCodeMemory(void* address,
size_t size)
{
if (munmap(address, size) != 0)
GCAssert(false);
}
bool GCHeap::SetGuardPage(void* /*address*/)
{
return false;
}
#ifdef AVMPLUS_JIT_READONLY
/**
* SetExecuteBit changes the page access protections on a block of pages,
* to make JIT-ted code executable or not.
*
* If executableFlag is true, the memory is made executable and read-only.
*
* If executableFlag is false, the memory is made non-executable and
* read-write.
*/
void GCHeap::SetExecuteBit(void *address,
size_t size,
bool executableFlag)
{
// mprotect requires that the addresses be aligned on page boundaries
void *endAddress = (void*) ((char*)address + size);
void *beginPage = (void*) ((size_t)address & ~0xFFF);
void *endPage = (void*) (((size_t)endAddress + 0xFFF) & ~0xFFF);
size_t sizePaged = (size_t)endPage - (size_t)beginPage;
int retval = mprotect(beginPage, sizePaged,
executableFlag ? (PROT_READ|PROT_EXEC) : (PROT_READ|PROT_WRITE));
GCAssert(retval == 0);
(void)retval;
}
#endif /* AVMPLUS_JIT_READONLY */
void* GCHeap::CommitCodeMemory(void* address,
size_t size)
{
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
#ifdef AVMPLUS_JIT_READONLY
void *res = mmap(address,
size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-1, 0);
#else
void *res = mmap(address,
size,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-1, 0);
#endif /* AVMPLUS_JIT_READONLY */
if (res == MAP_FAILED)
address = 0;
else
address = (void*)( (int)address + size );
return address;
}
void* GCHeap::DecommitCodeMemory(void* address,
size_t size)
{
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
char *addr = (char*)mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-1, 0);
GCAssert(addr == address);
(void)addr;
return address;
}
#else
int GCHeap::vmPageSize()
{
return 4096;
}
void* GCHeap::ReserveCodeMemory(void* address,
size_t size)
{
return aligned_malloc(size, 4096, m_malloc);
}
void GCHeap::ReleaseCodeMemory(void* address,
size_t size)
{
aligned_free(address, m_free);
}
bool GCHeap::SetGuardPage(void *address)
{
return false;
}
#ifdef AVMPLUS_JIT_READONLY
void GCHeap::SetExecuteBit(void *address,
size_t size,
bool executableFlag)
{
// No-op on Mac CFM
}
#endif /* AVMPLUS_JIT_READONLY */
void* GCHeap::CommitCodeMemory(void* address,
size_t size)
{
return address;
}
void* GCHeap::DecommitCodeMemory(void* address,
size_t size)
{
return address;
}
#endif /* USE_MMAP */
#endif /* MMGC_AVMPLUS */
#ifdef USE_MMAP
char* GCHeap::ReserveMemory(char *address, size_t size)
{
char *addr = (char*)mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
// the man page for mmap documents it returns -1 to signal failure.
if (addr == (char *)-1) return NULL;
if(address && address != addr) {
// behave like windows and fail if we didn't get the right address
ReleaseMemory(addr, size);
return NULL;
}
return addr;
}
bool GCHeap::CommitMemory(char *address, size_t size)
{
char *addr = (char*)mmap(address,
size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS,
-1, 0);
GCAssert(addr == address);
return addr == address;
}
bool GCHeap::DecommitMemory(char *address, size_t size)
{
char *addr = (char*)mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-1, 0);
GCAssert(addr == address);
return addr == address;
}
bool GCHeap::CommitMemoryThatMaySpanRegions(char *address, size_t size)
{
return CommitMemory(address, size);
}
bool GCHeap::DecommitMemoryThatMaySpanRegions(char *address, size_t size)
{
return DecommitMemory(address, size);
}
void GCHeap::ReleaseMemory(char *address, size_t size)
{
int result = munmap(address, size);
GCAssert(result == 0);
(void)result;
}
#else
char* GCHeap::AllocateMemory(size_t size)
{
return (char *) aligned_malloc(size, 4096, m_malloc);
//return (char *) MPAllocateAligned(size, kMPAllocate4096ByteAligned, 0);
}
void GCHeap::ReleaseMemory(char *address)
{
aligned_free(address, m_free);
//MPFree(address);
}
#endif
#ifdef MEMORY_INFO
#ifdef MMGC_PPC
// no idea how to do this with codewarrior
void GetInfoFromPC(int pc, char *buff, int /*buffSize*/)
{
sprintf(buff, "0x%x", pc);
}
void GetStackTrace(int *trace, int len, int skip)
{
register int stackp;
int pc;
asm("mr %0,r1" : "=r" (stackp));
while(skip--) {
stackp = *(int*)stackp;
}
int i=0;
// save space for 0 terminator
len--;
while(i<len && stackp) {
pc = *((int*)stackp+2);
trace[i++]=pc;
stackp = *(int*)stackp;
}
trace[i] = 0;
}
#endif
#ifdef MMGC_IA32
void GetInfoFromPC(int pc, char *buff, int buffSize)
{
Dl_info dlip;
dladdr((void * const)pc, &dlip);
snprintf(buff, buffSize, "0x%08x:%s", pc, dlip.dli_sname);
}
void GetStackTrace(int* trace, int len, int skip)
{
void **ebp;
asm("mov %%ebp, %0" : "=r" (ebp));
while(skip-- && *ebp)
{
ebp = (void**)(*ebp);
}
len--;
int i=0;
while(i<len && *ebp)
{
trace[i++] = *((int*)ebp+1);
ebp = (void**)(*ebp);
}
trace[i] = 0;
}
#endif
#endif
}

View File

@@ -1,320 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef USE_MMAP
#include <sys/mman.h>
#endif
#include <unistd.h>
#include "GCDebug.h"
#include "MMgc.h"
#include "GC.h"
// avmplus standalone uses UNIX
#ifdef _MAC
#define MAP_ANONYMOUS MAP_ANON
#endif
namespace MMgc
{
#ifndef USE_MMAP
void *aligned_malloc(size_t size, size_t align_size, GCMallocFuncPtr m_malloc)
{
char *ptr, *ptr2, *aligned_ptr;
int align_mask = align_size - 1;
int alloc_size = size + align_size + sizeof(int);
ptr=(char *)m_malloc(alloc_size);
if(ptr==NULL) return(NULL);
ptr2 = ptr + sizeof(int);
aligned_ptr = ptr2 + (align_size - ((size_t)ptr2 & align_mask));
ptr2 = aligned_ptr - sizeof(int);
*((int *)ptr2)=(int)(aligned_ptr - ptr);
return(aligned_ptr);
}
void aligned_free(void *ptr, GCFreeFuncPtr m_free)
{
int *ptr2=(int *)ptr - 1;
char *unaligned_ptr = (char*) ptr - *ptr2;
m_free(unaligned_ptr);
}
#endif /* !USE_MMAP */
#ifdef USE_MMAP
int GCHeap::vmPageSize()
{
long v = sysconf(_SC_PAGESIZE);
return v;
}
void* GCHeap::ReserveCodeMemory(void* address,
size_t size)
{
return (char*) mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
}
void GCHeap::ReleaseCodeMemory(void* address,
size_t size)
{
if (munmap(address, size) != 0)
GCAssert(false);
}
bool GCHeap::SetGuardPage(void *address)
{
return false;
}
#ifdef AVMPLUS_JIT_READONLY
/**
* SetExecuteBit changes the page access protections on a block of pages,
* to make JIT-ted code executable or not.
*
* If executableFlag is true, the memory is made executable and read-only.
*
* If executableFlag is false, the memory is made non-executable and
* read-write.
*/
void GCHeap::SetExecuteBit(void *address,
size_t size,
bool executableFlag)
{
// mprotect requires that the addresses be aligned on page boundaries
void *endAddress = (void*) ((char*)address + size);
void *beginPage = (void*) ((size_t)address & ~0xFFF);
void *endPage = (void*) (((size_t)endAddress + 0xFFF) & ~0xFFF);
size_t sizePaged = (size_t)endPage - (size_t)beginPage;
int retval = mprotect(beginPage, sizePaged,
executableFlag ? (PROT_READ|PROT_EXEC) : (PROT_READ|PROT_WRITE));
GCAssert(retval == 0);
}
#endif /* AVMPLUS_JIT_READONLY */
void* GCHeap::CommitCodeMemory(void* address,
size_t size)
{
void* res;
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
#ifdef AVMPLUS_JIT_READONLY
mmap(address,
size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS,
-1, 0);
#else
mmap(address,
size,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS,
-1, 0);
#endif /* AVMPLUS_JIT_READONLY */
res = address;
if (res == address)
address = (void*)( (int)address + size );
else
address = 0;
return address;
}
void* GCHeap::DecommitCodeMemory(void* address,
size_t size)
{
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
// release and re-reserve it
ReleaseCodeMemory(address, size);
address = ReserveCodeMemory(address, size);
return address;
}
#else
int GCHeap::vmPageSize()
{
return 4096;
}
void* GCHeap::ReserveCodeMemory(void* address,
size_t size)
{
return aligned_malloc(size, 4096, m_malloc);
}
void GCHeap::ReleaseCodeMemory(void* address,
size_t size)
{
aligned_free(address, m_free);
}
bool GCHeap::SetGuardPage(void *address)
{
return false;
}
void* GCHeap::CommitCodeMemory(void* address,
size_t size)
{
return address;
}
void* GCHeap::DecommitCodeMemory(void* address,
size_t size)
{
return address;
}
#endif /* USE_MMAP */
#ifdef USE_MMAP
char* GCHeap::ReserveMemory(char *address, size_t size)
{
char *addr = (char*)mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS,
-1, 0);
if(address && address != addr) {
// behave like windows and fail if we didn't get the right address
ReleaseMemory(addr, size);
return NULL;
}
return addr;
}
bool GCHeap::CommitMemory(char *address, size_t size)
{
char *addr = (char*)mmap(address,
size,
PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_FIXED | MAP_ANONYMOUS,
-1, 0);
GCAssert(addr == address);
return addr == address;
}
bool GCHeap::DecommitMemory(char *address, size_t size)
{
ReleaseMemory(address, size);
// re-reserve it
char *addr = (char*)mmap(address,
size,
PROT_NONE,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED,
-1, 0);
GCAssert(addr == address);
return addr == address;
}
bool GCHeap::CommitMemoryThatMaySpanRegions(char *address, size_t size)
{
return CommitMemory(address, size);
}
bool GCHeap::DecommitMemoryThatMaySpanRegions(char *address, size_t size)
{
return DecommitMemory(address, size);
}
void GCHeap::ReleaseMemory(char *address, size_t size)
{
int result = munmap(address, size);
GCAssert(result == 0);
}
#else
char* GCHeap::AllocateMemory(size_t size)
{
return (char *) aligned_malloc(size, 4096, m_malloc);
}
void GCHeap::ReleaseMemory(char *address)
{
aligned_free(address, m_free);
}
#endif
#ifdef MEMORY_INFO
// Bandaid implementations for these functions. Windows has its own version.
void GetInfoFromPC(int pc, char *buff, int buffSize)
{
sprintf(buff, "0x%x", pc);
}
#ifdef MMGC_PPC
void GetStackTrace(int *trace, int len, int skip)
{
register int stackp;
int pc;
asm("mr %0,r1" : "=r" (stackp));
while(skip--) {
stackp = *(int*)stackp;
}
int i=0;
// save space for 0 terminator
len--;
while(i<len && stackp) {
pc = *((int*)stackp+2);
trace[i++]=pc;
stackp = *(int*)stackp;
}
trace[i] = 0;
}
#endif
#ifdef MMGC_IA32
void GetStackTrace(int *trace, int len, int skip) {}
#endif
#ifdef MMGC_ARM
void GetStackTrace(int *trace, int len, int skip) {}
#endif
#endif
}

View File

@@ -1,547 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <windows.h>
#include "MMgc.h"
#ifdef MEMORY_INFO
#include <malloc.h>
#include <strsafe.h>
#include <DbgHelp.h>
#endif
#ifdef MEMORY_INFO
namespace MMgc
{
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// helper snarfed and simplified from main flash player code.
// since we only need it here and only for debug, I didn't bother
// migrating the whole thing.
class DynamicLoadLibraryHelper
{
protected:
DynamicLoadLibraryHelper(const char* p_dllName, bool p_required = true);
virtual ~DynamicLoadLibraryHelper();
FARPROC GetProc(const char* p_funcName, bool p_required = true);
public:
// note that this is only if any of the *required* ones failed;
// some "optional" ones may be missing and still have this return true.
bool AllRequiredItemsPresent() const { return m_allRequiredItemsPresent; }
private:
HMODULE m_lib;
bool m_allRequiredItemsPresent;
};
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
#define GETPROC(n) do { m_##n = (n##ProcPtr)GetProc(#n); } while (0)
#define GETPROC_OPTIONAL(n) do { m_##n = (n##ProcPtr)GetProc(#n, false); } while (0)
// --------------------------------------------------------------------------
DynamicLoadLibraryHelper::DynamicLoadLibraryHelper(const char* p_dllName, bool p_required) :
m_lib(NULL),
m_allRequiredItemsPresent(true) // assume the best
{
m_lib = ::LoadLibraryA(p_dllName);
if (p_required && (m_lib == NULL || m_lib == INVALID_HANDLE_VALUE))
{
// don't assert here... it will trigger a DebugBreak(), which will crash
// systems not running a debugger... and QE insists that they be able
// to run Debug builds on debuggerless Win98 systems... (sigh)
//GCAssertMsg(0, p_dllName);
m_allRequiredItemsPresent = false;
}
}
// --------------------------------------------------------------------------
FARPROC DynamicLoadLibraryHelper::GetProc(const char* p_funcName, bool p_required)
{
FARPROC a_proc = NULL;
if (m_lib != NULL && m_lib != INVALID_HANDLE_VALUE)
{
a_proc = ::GetProcAddress(m_lib, p_funcName);
}
if (p_required && a_proc == NULL)
{
// don't assert here... it will trigger a DebugBreak(), which will crash
// systems not running a debugger... and QE insists that they be able
// to run Debug builds on debuggerless Win98 systems... (sigh)
//GCAssertMsg(0, p_funcName);
m_allRequiredItemsPresent = false;
}
return a_proc;
}
// --------------------------------------------------------------------------
DynamicLoadLibraryHelper::~DynamicLoadLibraryHelper()
{
if (m_lib != NULL && m_lib != INVALID_HANDLE_VALUE)
{
::FreeLibrary(m_lib);
}
}
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
class DbgHelpDllHelper : public DynamicLoadLibraryHelper
{
public:
DbgHelpDllHelper();
public:
typedef BOOL (__stdcall *StackWalk64ProcPtr)(
DWORD MachineType,
HANDLE hProcess,
HANDLE hThread,
LPSTACKFRAME64 StackFrame,
PVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress
);
typedef PVOID (__stdcall *SymFunctionTableAccess64ProcPtr)(
HANDLE hProcess,
DWORD64 AddrBase
);
typedef DWORD64 (__stdcall *SymGetModuleBase64ProcPtr)(
HANDLE hProcess,
DWORD64 qwAddr
);
typedef BOOL (__stdcall *SymGetLineFromAddr64ProcPtr)(
HANDLE hProcess,
DWORD64 qwAddr,
PDWORD pdwDisplacement,
PIMAGEHLP_LINE64 Line64
);
typedef BOOL (__stdcall *SymGetSymFromAddr64ProcPtr)(
HANDLE hProcess,
DWORD64 qwAddr,
PDWORD64 pdwDisplacement,
PIMAGEHLP_SYMBOL64 Symbol
);
typedef BOOL (__stdcall *SymInitializeProcPtr)(
HANDLE hProcess,
PSTR UserSearchPath,
BOOL fInvadeProcess
);
public:
StackWalk64ProcPtr m_StackWalk64;
SymFunctionTableAccess64ProcPtr m_SymFunctionTableAccess64;
SymGetModuleBase64ProcPtr m_SymGetModuleBase64;
SymGetLineFromAddr64ProcPtr m_SymGetLineFromAddr64;
SymGetSymFromAddr64ProcPtr m_SymGetSymFromAddr64;
SymInitializeProcPtr m_SymInitialize;
};
// --------------------------------------------------------------------------
DbgHelpDllHelper::DbgHelpDllHelper() :
DynamicLoadLibraryHelper("dbghelp.dll"),
m_StackWalk64(NULL),
m_SymFunctionTableAccess64(NULL),
m_SymGetModuleBase64(NULL),
m_SymGetLineFromAddr64(NULL),
m_SymGetSymFromAddr64(NULL),
m_SymInitialize(NULL)
{
GETPROC(StackWalk64);
GETPROC(SymFunctionTableAccess64);
GETPROC(SymGetModuleBase64);
GETPROC(SymGetLineFromAddr64);
GETPROC(SymGetSymFromAddr64);
GETPROC(SymInitialize);
}
// declaring this statically will dynamically load the dll and procs
// at startup, and never ever release them... if this ever becomes NON-debug
// code, you might want to have a way to toss all this... but for _DEBUG
// only, it should be fine
static DbgHelpDllHelper g_DbgHelpDll;
}
#endif
namespace MMgc
{
#ifdef MMGC_AVMPLUS
int GCHeap::vmPageSize()
{
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
return sysinfo.dwPageSize;
}
void* GCHeap::ReserveCodeMemory(void* address,
size_t size)
{
return VirtualAlloc(address,
size,
MEM_RESERVE,
PAGE_NOACCESS);
}
void GCHeap::ReleaseCodeMemory(void* address,
size_t /*size*/)
{
VirtualFree(address, 0, MEM_RELEASE);
}
void* GCHeap::CommitCodeMemory(void* address,
size_t size)
{
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
#ifdef AVMPLUS_JIT_READONLY
void* addr = VirtualAlloc(address,
size,
MEM_COMMIT,
PAGE_READWRITE);
#else
void* addr = VirtualAlloc(address,
size,
MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
#endif /* AVMPLUS_JIT_READONLY */
if (addr == NULL)
address = 0;
else {
address = (void*)( (int)address + size );
committedCodeMemory += size;
}
return address;
}
#ifdef AVMPLUS_JIT_READONLY
/**
* SetExecuteBit changes the page access protections on a block of pages,
* to make JIT-ted code executable or not.
*
* If executableFlag is true, the memory is made executable and read-only.
*
* If executableFlag is false, the memory is made non-executable and
* read-write.
*
* [rickr] bug #182323 The codegen can bail in the middle of generating
* code for any number of reasons. When this occurs we need to ensure
* that any code that was previously on the page still executes, so we
* leave the page as PAGE_EXECUTE_READWRITE rather than PAGE_READWRITE.
* Ideally we'd use PAGE_READWRITE and then on failure revert it back to
* read/execute but this is a little tricker and doesn't add too much
* protection since only a single page is 'exposed' with this technique.
*/
void GCHeap::SetExecuteBit(void *address,
size_t size,
bool executableFlag)
{
DWORD oldProtectFlags = 0;
BOOL retval = VirtualProtect(address,
size,
executableFlag ? PAGE_EXECUTE_READ : PAGE_EXECUTE_READWRITE,
&oldProtectFlags);
(void)retval;
GCAssert(retval);
// We should not be clobbering PAGE_GUARD protections
GCAssert((oldProtectFlags & PAGE_GUARD) == 0);
}
#endif /* AVMPLUS_JIT_READONLY */
bool GCHeap::SetGuardPage(void *address)
{
if (!useGuardPages)
{
return false;
}
void *res = VirtualAlloc(address,
GCHeap::kNativePageSize,
MEM_COMMIT,
PAGE_GUARD | PAGE_READWRITE);
return res != 0;
}
void* GCHeap::DecommitCodeMemory(void* address,
size_t size)
{
if (size == 0)
size = GCHeap::kNativePageSize; // default of one page
if (VirtualFree(address, size, MEM_DECOMMIT) == false)
address = 0;
else
committedCodeMemory -= size;
return address;
}
#endif
#ifdef USE_MMAP
char* GCHeap::ReserveMemory(char *address,
size_t size)
{
return (char*) VirtualAlloc(address,
size,
MEM_RESERVE,
PAGE_NOACCESS);
}
bool GCHeap::CommitMemory(char *address,
size_t size)
{
void *addr = VirtualAlloc(address,
size,
MEM_COMMIT,
PAGE_READWRITE);
#ifdef _DEBUG
if(addr == NULL) {
MEMORY_BASIC_INFORMATION mbi;
VirtualQuery(address, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
LPVOID lpMsgBuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf, 0, NULL );
GCAssertMsg(false, (const char*)lpMsgBuf);
}
#endif
return addr != NULL;
}
bool GCHeap::DecommitMemory(char *address, size_t size)
{
return VirtualFree(address, size, MEM_DECOMMIT) != 0;
}
void GCHeap::ReleaseMemory(char *address,
size_t /*size*/)
{
VirtualFree(address, 0, MEM_RELEASE);
}
bool GCHeap::CommitMemoryThatMaySpanRegions(char *address, size_t size)
{
bool success = false;
MEMORY_BASIC_INFORMATION mbi;
do {
VirtualQuery(address, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
size_t commitSize = size > mbi.RegionSize ? mbi.RegionSize : size;
success = CommitMemory(address, commitSize);
address += commitSize;
size -= commitSize;
} while(size > 0 && success);
return success;
}
bool GCHeap::DecommitMemoryThatMaySpanRegions(char *address, size_t size)
{
bool success = false;
MEMORY_BASIC_INFORMATION mbi;
do {
VirtualQuery(address, &mbi, sizeof(MEMORY_BASIC_INFORMATION));
size_t commitSize = size > mbi.RegionSize ? mbi.RegionSize : size;
success = DecommitMemory(address, commitSize);
address += commitSize;
size -= commitSize;
} while(size > 0 && success);
return success;
}
#else
char* GCHeap::AllocateMemory(size_t size)
{
return (char*)_aligned_malloc(size, kBlockSize);
}
void GCHeap::ReleaseMemory(char *address)
{
_aligned_free(address);
}
#endif
#ifdef MEMORY_INFO
#ifndef MEMORY_INFO
// empty when MEMORY_INFO not defined
void GetInfoFromPC(int pc, char *buff, int buffSize) { }
void GetStackTrace(int *trace, int len, int skip) {}
#else
void GetStackTrace(int *trace, int len, int skip)
{
HANDLE ht = GetCurrentThread();
HANDLE hp = GetCurrentProcess();
CONTEXT c;
memset( &c, '\0', sizeof c );
c.ContextFlags = CONTEXT_FULL;
#if 0
// broken with SP2
if ( !GetThreadContext( ht, &c ) )
return;
#else
__asm
{
call x
x: pop eax
mov c.Eip, eax
mov c.Ebp, ebp
}
#endif
// skip an extra frame
skip++;
STACKFRAME64 frame;
memset(&frame, 0, sizeof frame);
frame.AddrPC.Offset = c.Eip;
frame.AddrPC.Mode = AddrModeFlat;
frame.AddrFrame.Offset = c.Ebp;
frame.AddrFrame.Mode = AddrModeFlat;
int i=0;
// save space for 0 pc terminator
len--;
while(i < len &&
g_DbgHelpDll.m_StackWalk64 != NULL &&
g_DbgHelpDll.m_SymFunctionTableAccess64 != NULL &&
g_DbgHelpDll.m_SymGetModuleBase64 != NULL &&
(*g_DbgHelpDll.m_StackWalk64)(IMAGE_FILE_MACHINE_I386, hp, ht, &frame,
NULL, NULL, g_DbgHelpDll.m_SymFunctionTableAccess64, g_DbgHelpDll.m_SymGetModuleBase64, NULL)) {
if(skip-- > 0)
continue;
// FIXME: not 64 bit safe
trace[i++] = (int) frame.AddrPC.Offset;
}
trace[i] = 0;
}
static bool inited = false;
static const int MaxNameLength = 256;
void GetInfoFromPC(int pc, char *buff, int buffSize)
{
if(!inited) {
if(!g_DbgHelpDll.m_SymInitialize ||
!(*g_DbgHelpDll.m_SymInitialize)(GetCurrentProcess(), NULL, true)) {
LPVOID lpMsgBuf;
if(FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf, 0, NULL ))
{
GCDebugMsg("See lpMsgBuf", true);
LocalFree(lpMsgBuf);
}
goto nosym;
}
inited = true;
}
// gleaned from IMAGEHLP_SYMBOL64 docs
IMAGEHLP_SYMBOL64 *pSym = (IMAGEHLP_SYMBOL64 *) alloca(sizeof(IMAGEHLP_SYMBOL64) + MaxNameLength);
pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64);
pSym->MaxNameLength = MaxNameLength;
DWORD64 offsetFromSymbol;
if(!g_DbgHelpDll.m_SymGetSymFromAddr64 ||
!(*g_DbgHelpDll.m_SymGetSymFromAddr64)(GetCurrentProcess(), pc, &offsetFromSymbol, pSym)) {
goto nosym;
}
// get line
IMAGEHLP_LINE64 line;
memset(&line, 0, sizeof(IMAGEHLP_LINE64));
line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
DWORD offsetFromLine;
if(!g_DbgHelpDll.m_SymGetLineFromAddr64 ||
!(*g_DbgHelpDll.m_SymGetLineFromAddr64)(GetCurrentProcess(), pc, &offsetFromLine, &line)) {
goto nosym;
}
/*
this isn't working, I think i need to call SymLoadModule64 or something
IMAGEHLP_MODULE64 module;
memset(&module, 0, sizeof module);
module.SizeOfStruct = sizeof module;
if(!SymGetModuleInfo64(GetCurrentProcess(), pSym->Address, &module))
{
LPVOID lpMsgBuf;
if(FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf, 0, NULL ))
{
GCDebugMsg((wchar*)lpMsgBuf, true);
LocalFree(lpMsgBuf);
}
}
*/
// success!
char *fileName = line.FileName + strlen(line.FileName);
// skip everything up to last slash
while(fileName > line.FileName && *fileName != '\\')
fileName--;
fileName++;
StringCchPrintfA(buff, buffSize, "%s:%d", fileName, line.LineNumber);
return;
nosym:
StringCchPrintfA(buff, buffSize, "0x%x", pc);
}
#endif
#endif // MEMORY_INFO
}

View File

@@ -1,179 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string.h>
#include "MMgc.h"
namespace MMgc
{
GCLargeAlloc::GCLargeAlloc(GC* gc) : GCAllocBase(gc)
{
m_blocks = NULL;
}
void* GCLargeAlloc::Alloc(size_t size, int flags)
{
int blocks = (size+sizeof(LargeBlock)+GCHeap::kBlockSize-1) / GCHeap::kBlockSize;
LargeBlock *block = (LargeBlock*) m_gc->AllocBlock(blocks, GC::kGCLargeAllocPageFirst, (flags&GC::kZero) != 0);
void *item = NULL;
if (block)
{
block->flags = ((flags&GC::kFinalize) != 0) ? kFinalizeFlag : 0;
block->flags |= ((flags&GC::kContainsPointers) != 0) ? kContainsPointers : 0;
block->flags |= ((flags&GC::kRCObject) != 0) ? kRCObject : 0;
block->gc = this->m_gc;
block->next = m_blocks;
block->usableSize = blocks*GCHeap::kBlockSize - sizeof(LargeBlock);
m_blocks = block;
item = (void*)(block+1);
#ifdef _DEBUG
if (flags & GC::kZero)
{
// AllocBlock should take care of this
for(int i=0, n=size/sizeof(int); i<n; i++) {
if(((int*)item)[i] != 0)
GCAssert(false);
}
}
#endif
}
return item;
}
void GCLargeAlloc::Free(void *item)
{
LargeBlock *b = GetBlockHeader(item);
if(b->flags & kHasWeakRef)
b->gc->ClearWeakRef(GetUserPointer(item));
LargeBlock **prev = &m_blocks;
while(*prev)
{
if(b == *prev)
{
*prev = b->next;
m_gc->FreeBlock(b, b->GetNumBlocks());
return;
}
prev = &(*prev)->next;
}
GCAssertMsg(false, "Bad free!");
}
void GCLargeAlloc::ClearMarks()
{
LargeBlock *block = m_blocks;
while (block) {
block->flags &= ~(kMarkFlag|kQueuedFlag);
block = block->next;
}
}
void GCLargeAlloc::Finalize()
{
LargeBlock *b = m_blocks;
while (b) {
if ((b->flags & kMarkFlag) == 0) {
void *item = b+1;
if (NeedsFinalize(b)) {
GCFinalizedObject *obj = (GCFinalizedObject *) item;
obj = (GCFinalizedObject *) GetUserPointer(obj);
obj->~GCFinalizedObject();
#if defined(_DEBUG) && defined(MMGC_DRC)
if((b->flags & kRCObject) != 0) {
b->gc->RCObjectZeroCheck((RCObject*)obj);
}
#endif
}
if(b->flags & kHasWeakRef) {
b->gc->ClearWeakRef(GetUserPointer(item));
}
}
b = b->next;
}
}
size_t GCLargeAlloc::Sweep()
{
size_t visitedSize=0;
LargeBlock **prev = &m_blocks;
while (*prev) {
LargeBlock *block = *prev;
visitedSize += block->GetNumBlocks();
LargeBlock *next = block->next;
if ((block->flags & kMarkFlag) == 0) {
// Destroy this block
*prev = block->next;
void *item = block+1;
(void)item;
#ifdef ALLOC_LOG
m_gc->LogFree(item);
#endif
#ifdef MEMORY_INFO
DebugFreeReverse(item, 0xba, 3);
#endif
m_gc->FreeBlock(block, block->GetNumBlocks());
} else {
prev = &block->next;
}
block = next;
}
return visitedSize;
}
GCLargeAlloc::~GCLargeAlloc()
{
GCAssert(!m_blocks);
}
/* static */
bool GCLargeAlloc::ConservativeGetMark(const void *item, bool bogusPointerReturnValue)
{
if(((intptr) item & 0xfff) == sizeof(LargeBlock))
{
return GetMark(item);
}
return bogusPointerReturnValue;
}
}

View File

@@ -1,177 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCLargeAlloc__
#define __GCLargeAlloc__
namespace MMgc
{
/**
* This is a garbage collecting allocator for large memory blocks.
*/
class GCLargeAlloc : public GCAllocBase
{
friend class GC;
private:
enum {
kMarkFlag = 0x1,
kQueuedFlag = 0x2,
kFinalizeFlag = 0x4,
kHasWeakRef = 0x8,
kContainsPointers = 0x10,
kRCObject = 0x20
};
public:
GCLargeAlloc(GC* gc);
~GCLargeAlloc();
void* Alloc(size_t size, int flags);
void Free(void *ptr);
void Finalize();
size_t Sweep();
void ClearMarks();
static void SetHasWeakRef(const void *item, bool to)
{
if(to) {
GetBlockHeader(item)->flags |= kHasWeakRef;
} else {
GetBlockHeader(item)->flags &= ~kHasWeakRef;
}
}
static bool HasWeakRef(const void *item)
{
return (GetBlockHeader(item)->flags & kHasWeakRef) != 0;
}
static bool IsLargeBlock(const void *item)
{
// The pointer should be 4K aligned plus 16 bytes
// Mac inserts 16 bytes for new[] so make it more general
return (((uint32)item & 0xFFF) == sizeof(LargeBlock));
}
static bool SetMark(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
bool oldMark = (block->flags & kMarkFlag) != 0;
block->flags |= kMarkFlag;
block->flags &= ~kQueuedFlag;
return oldMark;
}
static void SetQueued(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
block->flags |= kQueuedFlag;
}
static void SetFinalize(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
block->flags |= kFinalizeFlag;
}
static bool GetMark(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
return (block->flags & kMarkFlag) != 0;
}
static bool IsWhite(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
if(!IsLargeBlock(item))
return false;
return (block->flags & (kMarkFlag|kQueuedFlag)) == 0;
}
static void* FindBeginning(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
return (void*) (block+1);
}
static void ClearFinalized(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
block->flags &= ~kFinalizeFlag;
}
static bool ContainsPointers(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
return (block->flags & kContainsPointers) != 0;
}
static bool IsFinalized(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
return (block->flags & kFinalizeFlag) != 0;
}
static bool IsRCObject(const void *item)
{
LargeBlock *block = GetBlockHeader(item);
return (block->flags & kRCObject) != 0;
}
private:
struct LargeBlock
{
GC *gc;
uint32 usableSize;
uint32 flags;
LargeBlock *next;
int GetNumBlocks() const { return (usableSize + sizeof(LargeBlock)) / GCHeap::kBlockSize; }
};
static LargeBlock* GetBlockHeader(const void *addr)
{
return (LargeBlock*) ((uint32)addr & ~0xFFF);
}
static bool NeedsFinalize(LargeBlock *block)
{
return (block->flags & kFinalizeFlag) != 0;
}
// The list of chunk blocks
LargeBlock* m_blocks;
static bool ConservativeGetMark(const void *item, bool bogusPointerReturnValue);
};
}
#endif /* __GCLargeAlloc__ */

View File

@@ -1,546 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
#ifdef MEMORY_INFO
#ifndef __MWERKS__
#include <typeinfo>
#endif
namespace MMgc
{
GCThreadLocal<const char*> memtag;
GCThreadLocal<void*> memtype;
// Turn this to see GC stack traces.
const bool enableTraces = false;
// this is how many stack frames we'll attempt to lookup, we may not get this many and
// we may leave some out
const int kMaxTraceDepth = 7;
// include total and swept memory totals in memory profiling dumps
const bool showTotal = false;
const bool showSwept = false;
// controls size of table which is fixed
const int kNumTracesPow = 20;
const int kNumTraces = (enableTraces ? 1 << kNumTracesPow : 1);
#ifdef GCHEAP_LOCK
GCCriticalSection m_traceTableLock;
#endif
struct StackTrace
{
int ips[kMaxTraceDepth];
int size;
int totalSize;
int sweepSize;
int vtable;
const char *memtag;
int count;
int totalCount;
int sweepCount;
bool lumped;
};
static StackTrace traceTable[kNumTraces];
unsigned int hashTrace(int *trace)
{
unsigned int hash = *trace++;
while(*trace++ != 0) {
hash ^= *trace;
}
return hash;
}
bool tracesEqual(int *trace1, int *trace2)
{
while(*trace1) {
if(*trace1 != *trace2)
return false;
trace1++;
trace2++;
}
return *trace1 == *trace2;
}
unsigned int LookupTrace(int *trace)
{
#ifdef GCHEAP_LOCK
GCEnterCriticalSection lock(m_traceTableLock);
#endif
// this is true when traces are off
if(*trace == 0)
return 0;
static int numTraces = 0;
int modmask = kNumTraces - 1;
unsigned int hash = hashTrace(trace);
unsigned int index = hash & modmask;
unsigned int n = 17; // small number means cluster at start
int c = 1;
while(traceTable[index].ips[0] && !tracesEqual(traceTable[index].ips, trace)) {
// probe
index = (index + (n=n+c)) & modmask;
}
if(traceTable[index].ips[0] == 0) {
memcpy(traceTable[index].ips, trace, kMaxTraceDepth * sizeof(int));
numTraces++;
}
if(numTraces == kNumTraces) {
GCAssertMsg(false, "Increase trace table size!");
}
return index;
}
// increase this to get more
const int kNumTypes = 10;
const int kNumTracesPerType=5;
// data structure to gather allocations by type with the top 5 traces
struct TypeGroup
{
const char *name;
size_t size;
int count;
int traces[kNumTracesPerType ? kNumTracesPerType : 1];
};
const char* GetTypeName(int index, void *obj)
{
// cache
if(index > kNumTraces)
return "unknown";
if(traceTable[index].memtag)
return traceTable[index].memtag;
const char*name="unknown";
#ifdef WIN32
try {
const std::type_info *ti = &typeid(*(MMgc::GCObject*)obj);
if(ti->name())
name = ti->name();
// sometimes name will get set to bogus memory with no exceptions catch that
char c = *name;
(void)c; // silence compiler warning
} catch(...) {
name = "unknown";
}
#else
(void)obj;
#endif
// cache
traceTable[index].memtag = name;
return name;
}
#define PERCENT(all, some) ((((float)some)/(float)all)*100.0)
void DumpFatties()
{
GCHashtable typeTable(128);
#ifdef GCHEAP_LOCK
//GCEnterCriticalSection lock(m_traceTableLock);
#endif
int residentSize=0;
int residentCount=0;
for(int i=0; i < kNumTraces; i++)
{
int size;
if(showSwept) {
size = traceTable[i].sweepSize;
} else if(showTotal) {
size = traceTable[i].totalSize;
} else {
size = traceTable[i].size;
}
if(size == 0)
continue;
residentSize += size;
int count = traceTable[i].lumped ? 0 : traceTable[i].count;
residentCount += traceTable[i].count;
const char *name = "unknown";
#ifndef _MAC
#ifndef AVMPLUS_LINUX // TODO_LINUX
#ifndef MMGC_ARM
name = GetTypeName(i, &traceTable[i].vtable);
#endif //AVMPLUS_LINUX
#endif //MMGC_ARM
#endif
TypeGroup *tg = (TypeGroup*) typeTable.get((void*)name);
if(tg) {
GCAssert(tg->name == name);
tg->size += size;
tg->count += count;
for(int j=0; j<kNumTracesPerType; j++) {
if(traceTable[tg->traces[j]].size < size) {
if(j != kNumTracesPerType-1) {
memmove(&tg->traces[j+1], &tg->traces[j], (kNumTracesPerType-j-1)*sizeof(int));
}
tg->traces[j] = i;
break;
}
}
} else {
tg = new TypeGroup();
tg->size = size;
tg->count = count;
tg->name = name;
tg->traces[0] = i;
if(kNumTracesPerType) {
int num = kNumTracesPerType - 1;
memset(&tg->traces[1], 0, sizeof(int)*num);
}
typeTable.put((void*)name, tg);
}
}
int codeSize = GCHeap::GetGCHeap()->GetCodeMemorySize();
int inUse = GCHeap::GetGCHeap()->GetUsedHeapSize() * GCHeap::kBlockSize;
int committed = GCHeap::GetGCHeap()->GetTotalHeapSize() * GCHeap::kBlockSize + codeSize;
int free = GCHeap::GetGCHeap()->GetFreeHeapSize() * GCHeap::kBlockSize;
int memInfo = residentCount*16;
// executive summary
GCDebugMsg(false, "Code Size %d kb \n", codeSize>>10);
GCDebugMsg(false, "Total in use (used pages, ignoring code) %d kb \n", inUse>>10);
GCDebugMsg(false, "Total resident (individual allocations - code) %d kb \n", (residentSize-codeSize)>>10);
GCDebugMsg(false, "Allocator overhead (used pages - resident, ignoring code and mem_info): %d kb \n", ((inUse-memInfo)-(residentSize-codeSize))>>10);
GCDebugMsg(false, "Heap overhead (unused committed pages, ignoring code): %d kb \n", free>>10);
GCDebugMsg(false, "Total committed (including code) %d kb \n\n", committed>>10);
TypeGroup *residentFatties[kNumTypes];
memset(residentFatties, 0, kNumTypes * sizeof(TypeGroup *));
GCHashtableIterator iter(&typeTable);
const char *name;
while((name = (const char*)iter.nextKey()) != NULL)
{
TypeGroup *tg = (TypeGroup*)iter.value();
for(int j=0; j<kNumTypes; j++) {
if(!residentFatties[j]) {
residentFatties[j] = tg;
break;
}
if(residentFatties[j]->size < tg->size) {
if(j != kNumTypes-1) {
memmove(&residentFatties[j+1], &residentFatties[j], (kNumTypes-j-1) * sizeof(TypeGroup *));
}
residentFatties[j] = tg;
break;
}
}
}
for(int i=0; i < kNumTypes; i++)
{
TypeGroup *tg = residentFatties[i];
if(!tg)
break;
GCDebugMsg(false, "%s - %3.1f%% - %d kb %d items, avg %d b\n", tg->name, PERCENT(residentSize, tg->size), tg->size>>10, tg->count, tg->count ? tg->size/tg->count : 0);
for(int j=0; j < kNumTracesPerType; j++) {
int traceIndex = tg->traces[j];
if(traceIndex) {
int size = traceTable[traceIndex].size;
int count = traceTable[traceIndex].count;
if(showSwept) {
size = traceTable[traceIndex].sweepSize;
count = traceTable[traceIndex].sweepCount;
} else if(showTotal) {
size = traceTable[traceIndex].totalSize;
count = traceTable[traceIndex].totalCount;
}
GCDebugMsg(false, "\t %3.1f%% - %d kb - %d items - ", PERCENT(tg->size, size), size>>10, count);
PrintStackTraceByIndex(traceIndex);
}
}
}
GCHashtableIterator iter2(&typeTable);
while(iter2.nextKey() != NULL)
delete (TypeGroup*)iter2.value();
}
size_t DebugSize()
{
return 4 * sizeof(int);
}
/*
* allocate the memory such that we can detect underwrites, overwrites and remember
* the allocation stack in case of a leak. Memory is laid out like so:
*
* first four bytes == size / 4
* second four bytes == stack trace index
* size data bytes
* last 4 bytes == 0xdeadbeef
*
* Its important that the stack trace index is not stored in the first 4 bytes,
* it enables the leak detection to work see ~FixedAlloc. Underwrite detection isn't
* perfect, an assert will be fired if the stack table index is invalid (greater than
* the table size or to an unused table entry) or it the size gets mangled and the
* end tag isn't at mem+size.
*/
void *DebugDecorate(void *item, size_t size, int skip)
{
if (!item) return NULL;
static void *lastItem = 0;
static int lastTrace = 0;
#ifndef _MAC
if(lastItem)
{
// this guy might be deleted so swallow access violations
try {
traceTable[lastTrace].vtable = *(int*)lastItem;
} catch(...) {}
lastItem = 0;
}
#endif
int traceIndex;
// get index into trace table
{
#ifdef GCHEAP_LOCK
GCEnterCriticalSection lock(m_traceTableLock);
#endif
traceIndex = GetStackTraceIndex(skip);
}
if(GC::enableMemoryProfiling && memtype)
{
// if an allocation is tagged with MMGC_MEM_TYPE its a sub
// allocation of a "master" type and this flag prevents it
// from contributing to the count so averages make more sense
traceTable[traceIndex].lumped = true;
}
// subtract decoration space
size -= DebugSize();
ChangeSize(traceIndex, size);
int *mem = (int*)item;
// set up the memory
*mem++ = size;
*mem++ = traceIndex;
void *ret = mem;
mem += (size>>2);
*mem++ = 0xdeadbeef;
*mem = 0;
// save these off so we can save the vtable (which is assigned after memory is
// allocated)
if(GC::enableMemoryProfiling)
{
if(memtag || memtype) {
if(memtag)
traceTable[traceIndex].memtag = memtag;
else
traceTable[traceIndex].vtable = *(int*)(void*)memtype;
memtag = NULL;
memtype = NULL;
} else {
lastTrace = traceIndex;
lastItem = ret;
}
}
return ret;
}
void DebugFreeHelper(void *item, int poison, int skip)
{
int *ip = (int*) item;
int size = *ip;
int traceIndex = *(ip+1);
int *endMarker = ip + 2 + (size>>2);
// clean up
*ip = 0;
ip += 2;
// this can be called twice on some memory in inc gc
if(size == 0)
return;
if (*endMarker != 0xdeadbeef)
{
// if you get here, you have a buffer overrun. The stack trace about to
// be printed tells you where the block was allocated from. To find the
// overrun, put a memory breakpoint on the location endMarker is pointing to.
GCDebugMsg("Memory overwrite detected\n", false);
PrintStackTraceByIndex(traceIndex);
GCAssert(false);
}
{
#ifdef GCHEAP_LOCK
GCEnterCriticalSection lock(m_traceTableLock);
#endif
ChangeSize(traceIndex, -1 * size);
if(poison == 0xba) {
traceTable[traceIndex].sweepSize += size;
traceTable[traceIndex].sweepCount++;
}
traceIndex = GetStackTraceIndex(skip);
}
// whack the entire thing except the first 8 bytes,
// the free list
if(poison == 0xca || poison == 0xba)
size = GC::Size(ip);
else
size = FixedMalloc::Size(ip);
// size is the non-Debug size, so add 4 to get last 4 bytes, don't
// touch write back pointer space
memset(ip, poison, size+4);
// write stack index to ip (currently 3rd 4 bytes of item)
*ip = traceIndex;
}
void *DebugFree(void *item, int poison, int skip)
{
item = (int*) item - 2;
DebugFreeHelper(item, poison, skip);
return item;
}
void *DebugFreeReverse(void *item, int poison, int skip)
{
DebugFreeHelper(item, poison, skip);
item = (int*) item + 2;
return item;
}
void ChangeSize(int traceIndex, int delta)
{
#ifdef GCHEAP_LOCK
GCEnterCriticalSection lock(m_traceTableLock);
#endif
if(!enableTraces)
return;
traceTable[traceIndex].size += delta;
traceTable[traceIndex].count += (delta > 0) ? 1 : -1;
GCAssert(traceTable[traceIndex].size >= 0);
if(delta > 0) {
traceTable[traceIndex].totalSize += delta;
traceTable[traceIndex].totalCount++;
}
}
unsigned int GetStackTraceIndex(int skip)
{
if(!enableTraces)
return 0;
int trace[kMaxTraceDepth]; // an array of pcs
GetStackTrace(trace, kMaxTraceDepth, skip);
// get index into trace table
return LookupTrace(trace);
}
void DumpStackTraceHelper(int *trace)
{
if(!enableTraces)
return;
char out[2048];
char *tp = out;
for(int i=0; trace[i] != 0; i++) {
char buff[256];
GetInfoFromPC(trace[i], buff, 256);
strcpy(tp, buff);
tp += strlen(buff);
*tp++ = ' ';
}
*tp++ = '\n';
*tp = '\0';
GCDebugMsg(out, false);
}
void DumpStackTrace()
{
if(!enableTraces)
return;
int trace[kMaxTraceDepth];
GetStackTrace(trace, kMaxTraceDepth, 1);
DumpStackTraceHelper(trace);
}
void PrintStackTrace(const void *item)
{
if (item)
PrintStackTraceByIndex(*((int*)item - 1));
}
void PrintStackTraceByIndex(unsigned int i)
{
#ifdef GCHEAP_LOCK
GCEnterCriticalSection lock(m_traceTableLock);
#endif
if(i < kNumTraces)
DumpStackTraceHelper(traceTable[i].ips);
}
void ChangeSizeForObject(void *object, int size)
{
int traceIndex = *(((int*)object)-1);
ChangeSize(traceIndex, size);
}
void SetMemTag(const char *s)
{
if(memtag == NULL)
memtag = s;
}
void SetMemType(void *s)
{
if(memtype == NULL)
memtype = s;
}
}
#endif

View File

@@ -1,216 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCMemoryProfiler__
#define __GCMemoryProfiler__
#ifndef MEMORY_INFO
#define MMGC_MEM_TAG(_x)
#define MMGC_MEM_TYPE(_x)
#define GetRealPointer(_x) _x
#define GetUserPointer(_x) _x
#define DebugSize() 0
#else
#define MMGC_MEM_TAG(_x) MMgc::SetMemTag(_x)
#define MMGC_MEM_TYPE(_x) MMgc::SetMemType(_x)
namespace MMgc
{
#ifdef WIN32
/**
* GCCriticalSection is a simple Critical Section class used by GCMemoryProfiler to
* ensure mutually exclusive access. GCSpinLock doesn't suffice since its not
* re-entrant and we need that
*/
class GCCriticalSection
{
public:
GCCriticalSection()
{
InitializeCriticalSection(&cs);
}
inline void Acquire()
{
EnterCriticalSection(&cs);
}
inline void Release()
{
LeaveCriticalSection(&cs);
}
private:
CRITICAL_SECTION cs;
};
template<typename T>
class GCThreadLocal
{
public:
GCThreadLocal()
{
GCAssert(sizeof(T) == sizeof(LPVOID));
tlsId = TlsAlloc();
}
T operator=(T tNew)
{
TlsSetValue(tlsId, (LPVOID) tNew);
return tNew;
}
operator T() const
{
return (T) TlsGetValue(tlsId);
}
private:
DWORD tlsId;
};
#else
// FIXME: implement
template<typename T>
class GCThreadLocal
{
public:
GCThreadLocal()
{
}
T operator=(T tNew)
{
tlsId = tNew;
return tNew;
}
operator T() const
{
return tlsId;
}
private:
T tlsId;
};
class GCCriticalSection
{
public:
GCCriticalSection()
{
}
inline void Acquire()
{
}
inline void Release()
{
}
};
#endif
class GCEnterCriticalSection
{
public:
GCEnterCriticalSection(GCCriticalSection& cs) : m_cs(cs)
{
m_cs.Acquire();
}
~GCEnterCriticalSection()
{
m_cs.Release();
}
private:
GCCriticalSection& m_cs;
};
void SetMemTag(const char *memtag);
void SetMemType(void *memtype);
/**
* calculate a stack trace skipping skip frames and return index into
* trace table of stored trace
*/
unsigned int GetStackTraceIndex(int skip);
unsigned int LookupTrace(int *trace);
void ChangeSize(int traceIndex, int delta);
void DumpFatties();
/**
* Manually set me, for special memory not new/deleted, like the code memory region
*/
void ChangeSizeForObject(void *object, int size);
/**
* How much extra size does DebugDecorate need?
*/
size_t DebugSize();
/**
* decorate memory with debug information, return pointer to memory to return to caller
*/
void *DebugDecorate(void *item, size_t size, int skip);
/**
* Given a pointer to user memory do debug checks and return pointer to real memory
*/
void *DebugFree(void *item, int poison, int skip);
/**
* Given a pointer to real memory do debug checks and return pointer to user memory
*/
void *DebugFreeReverse(void *item, int poison, int skip);
/**
* Given a user pointer back up to real beginning
*/
inline void *GetRealPointer(const void *item) { return (void*)((intptr) item - 2 * sizeof(int)); }
/**
* Given a user pointer back up to real beginning
*/
inline void *GetUserPointer(const void *item) { return (void*)((intptr) item + 2 * sizeof(int)); }
const char* GetTypeName(int index, void *obj);
void GetInfoFromPC(int pc, char *buff, int buffSize);
void GetStackTrace(int *trace, int len, int skip);
// print stack trace of index into trace table
void PrintStackTraceByIndex(unsigned int index);
void PrintStackTrace(const void *item);
// print stack trace of caller
void DumpStackTrace();
}
#endif //MEMORY_INFO
#endif //!__GCMemoryProfiler__

View File

@@ -1,79 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
namespace MMgc
{
GCWeakRef* GCObject::GetWeakRef() const
{
return GC::GetWeakRef(this);
}
GCWeakRef* GCFinalizedObject::GetWeakRef() const
{
return GC::GetWeakRef(this);
}
void* GCFinalizedObject::operator new(size_t size, GC *gc, size_t extra)
{
return gc->Alloc(size + extra, GC::kFinalize|GC::kContainsPointers|GC::kZero, 4);
}
void GCFinalizedObject::operator delete (void *gcObject)
{
GC::GetGC(gcObject)->Free(gcObject);
}
void* GCFinalizedObjectOptIn::operator new(size_t size, GC *gc, size_t extra)
{
return gc->Alloc(size + extra, GC::kContainsPointers|GC::kZero, 4);
}
void GCFinalizedObjectOptIn::operator delete (void *gcObject)
{
GC::GetGC(gcObject)->Free(gcObject);
}
#if defined(MMGC_DRC) && defined(_DEBUG)
void RCObject::DumpHistory()
{
GCDebugMsg(false, "Ref count modification history for object 0x%x:\n", this);
int *traces = history.GetData();
for(int i=0, n=history.Count(); i<n; i++)
{
PrintStackTraceByIndex(traces[i]);
}
}
#endif
}

View File

@@ -1,390 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCObject__
#define __GCObject__
// VC++ wants these declared
//void *operator new(size_t size);
//void *operator new[] (size_t size);
inline void *operator new(size_t size, MMgc::GC *gc, int flags=MMgc::GC::kContainsPointers|MMgc::GC::kZero)
{
return gc->Alloc(size, flags, 4);
}
namespace MMgc
{
/**
*
*/
class GCCustomSizer
{
public:
virtual ~GCCustomSizer() {} // here since gcc complains otherwise
virtual size_t Size() = 0;
};
/**
* Baseclass for GC managed objects that aren't finalized
*/
class GCObject
{
public:
static void *operator new(size_t size, GC *gc, size_t extra = 0)
#ifdef __GNUC__
// add this to avoid GCC warning: 'operator new' must not return NULL unless it is declared 'throw()' (or -fcheck-new is in effect)
throw()
#endif
{
// TODO throw exception and shutdown player?
if (size + extra < size)
{
GCAssert(0);
return 0;
}
return gc->Alloc(size + extra, GC::kContainsPointers|GC::kZero, 4);
}
static void operator delete (void *gcObject)
{
GC::GetGC(gcObject)->Free(gcObject);
}
GCWeakRef *GetWeakRef() const;
#ifdef MEMORY_INFO
// give everyone a vtable for rtti type info purposes
virtual ~GCObject() {}
#endif
};
/**
* Baseclass for GC managed objects that are finalized
*/
class GCFinalizedObject
//: public GCObject can't do this, get weird compile errors in AVM plus, I think it has to do with
// the most base class (GCObject) not having any virtual methods)
{
public:
virtual ~GCFinalizedObject() {}
GCWeakRef *GetWeakRef() const;
static void *operator new(size_t size, GC *gc, size_t extra = 0);
static void operator delete (void *gcObject);
};
/**
* Baseclass for GC managed objects that are finalized
*/
class GCFinalizedObjectOptIn : public GCFinalizedObject
//: public GCObject can't do this, get weird compile errors in AVM plus, I think it has to do with
// the most base class (GCObject) not having any virtual methods)
{
public:
static void *operator new(size_t size, GC *gc, size_t extra = 0);
static void operator delete (void *gcObject);
};
#ifdef MMGC_DRC
class RCObject : public GCFinalizedObject
{
friend class GC;
public:
RCObject()
#ifdef _DEBUG
: history(0)
#endif
{
// composite == 0 is special, it means a deleted object in Release builds
// b/c RCObjects have a vtable we know composite isn't the first 4 byte and thus
// won't be trampled by the freelist
composite = 1;
GC::GetGC(this)->AddToZCT(this);
}
~RCObject()
{
// for explicit deletion
if (InZCT())
GC::GetGC(this)->RemoveFromZCT(this);
composite = 0;
}
bool IsPinned()
{
return (composite & STACK_PIN) != 0;
}
void Pin()
{
#ifdef _DEBUG
// this is a deleted object but 0xca indicates the InZCT flag so we
// might erroneously get here for a deleted RCObject
if(composite == 0xcacacaca || composite == 0xbabababa)
return;
#endif
// In Release builds, a deleted object is indicated by
// composite == 0. We must not set the STACK_PIN bit
// on a deleted object, because if we do, it transforms
// from a deleted object into a zero-ref count live object,
// causing nasty crashes down the line.
if (composite == 0)
return;
composite |= STACK_PIN;
}
void Unpin()
{
composite &= ~STACK_PIN;
}
int InZCT() const { return composite & ZCTFLAG; }
int RefCount() const { return (composite & RCBITS) - 1; }
int Sticky() const { return composite & STICKYFLAG; }
void Stick() { composite = STICKYFLAG; }
// called by EnqueZCT
void ClearZCTFlag()
{
composite &= ~(ZCTFLAG|ZCT_INDEX);
}
void IncrementRef()
{
if(Sticky() || composite == 0)
return;
#ifdef _DEBUG
GCAssert(GC::GetGC(this)->IsRCObject(this));
GCAssert(this == GC::GetGC(this)->FindBeginning(this));
// don't touch swept objects
if(composite == 0xcacacaca || composite == 0xbabababa)
return;
#endif
composite++;
if((composite&RCBITS) == RCBITS) {
composite |= STICKYFLAG;
} else if(InZCT()) {
GCAssert(RefCount() == 1);
GC::GetGC(this)->RemoveFromZCT(this);
}
#ifdef _DEBUG
if(GC::keepDRCHistory)
history.Push(GetStackTraceIndex(2));
#endif
}
__forceinline void DecrementRef()
{
if(Sticky() || composite == 0)
return;
#ifdef _DEBUG
GCAssert(GC::GetGC(this)->IsRCObject(this));
GCAssert(this == GC::GetGC(this)->FindBeginning(this));
// don't touch swept objects
if(composite == 0xcacacaca || composite == 0xbabababa)
return;
if(GC::GetGC(this)->Destroying())
return;
if(RefCount() == 0) {
DumpHistory();
GCAssert(false);
}
#endif
if (RefCount() == 0)
{
// This is a defensive measure. If DecrementRef is
// ever called on a zero ref-count object, composite--
// will cause an underflow, flipping all kinds of bits
// in bad ways and resulting in a crash later. Often,
// such a DecrementRef bug would be caught by the
// _DEBUG asserts above, but sometimes we have
// release-only crashers like this. Better to fail
// gracefully at the point of failure, rather than
// push the failure to some later point.
return;
}
composite--;
#ifdef _DEBUG
// the delete flag works around the fact that DecrementRef
// may be called after ~RCObject since all dtors are called
// in one pass. For example a FunctionScriptObject may be
// the sole reference to a ScopeChain and dec its ref in
// ~FunctionScriptObject during a sweep, but since ScopeChain's
// are smaller the ScopeChain was already finalized, thus the
// push crashes b/c the history object has been destructed.
if(GC::keepDRCHistory)
history.Push(GetStackTraceIndex(1));
#endif
// composite == 1 is the same as (rc == 1 && !notSticky && !notInZCT)
if(RefCount() == 0) {
GC::GetGC(this)->AddToZCT(this);
}
}
#ifdef _DEBUG
void DumpHistory();
#endif
void setZCTIndex(int index)
{
GCAssert(index >= 0 && index < (ZCT_INDEX>>8));
GCAssert(index < ZCT_INDEX>>8);
composite = (composite&~ZCT_INDEX) | ((index<<8)|ZCTFLAG);
}
int getZCTIndex() const
{
return (composite & ZCT_INDEX) >> 8;
}
static void *operator new(size_t size, GC *gc, size_t extra = 0)
{
return gc->Alloc(size + extra, GC::kContainsPointers|GC::kZero|GC::kRCObject|GC::kFinalize, 4);
}
private:
// 1 bit for inZCT flag (0x80000000)
// 1 bit for sticky flag (0x40000000)
// 20 bits for ZCT index
// 8 bits for RC count (0x000000FF)
static const int ZCTFLAG = 0x80000000;
static const int STICKYFLAG = 0x40000000;
static const int STACK_PIN = 0x20000000;
static const int RCBITS = 0x000000FF;
static const int ZCT_INDEX = 0x0FFFFF00;
#ifdef MMGC_DRC
int32 composite;
#ifdef _DEBUG
// addref/decref stack traces
GCStack<int,4> history;
int padto32bytes;
#endif
#endif
};
class RCFinalizedObject : public RCObject{};
template<class T>
class ZeroPtr
{
public:
ZeroPtr() { t = NULL; }
ZeroPtr(T t) : t(t) { }
~ZeroPtr()
{
t = NULL;
}
operator T() { return t; }
bool operator!=(T other) { return other != t; }
T operator->() const { return t; }
private:
T t;
};
template<class T>
class RCPtr
{
public:
RCPtr() { t = NULL; }
RCPtr(T t) : t(t) { if(t && (int)t != 1) t->IncrementRef(); }
~RCPtr()
{
if(t && t != (T)1)
t->DecrementRef();
// 02may06 grandma : I want to enable
// class DataIOBase { DRC(PlayerToplevel *) const m_toplevel; }
//
// DataIOBase is a virtual base class, so we don't know if the
// subclass is GCObject or not. We need it to be const, or
// a GCObject would require a DWB(), and if it's const, we
// cannot zero it out during ~DataIOBase. The simplest solution
// seemed to be zeroing out the member here.
t = NULL;
}
T operator=(T tNew)
{
if(t && (int)t != 1)
t->DecrementRef();
t = tNew;
if(t && (int)t != 1)
t->IncrementRef();
// this cast is safe b/c other wise compilation would fail
return (T) t;
}
operator T() const
{
return (T) t;
}
operator ZeroPtr<T>() const { return t; }
bool operator!=(T other) { return other != t; }
T operator->() const
{
return (T) t;
}
void Clear() { t = NULL; }
private:
T t;
};
#define DRC(_type) MMgc::RCPtr<_type>
#else // !MMGC_DRC
#define DRC(_type) _type
class RCObject : public GCObject {};
class RCFinalizedObject : public GCFinalizedObject {};
#endif
}
#endif /* __GCObject__ */

View File

@@ -1,101 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCSpinLock__
#define __GCSpinLock__
#include <pthread.h>
namespace MMgc
{
/**
* GCSpinLock is a simple spin lock class used by GCHeap to
* ensure mutually exclusive access. The GCHeap may be accessed
* by multiple threads, so this is necessary to ensure that
* the threads do not step on each other.
*/
class GCSpinLock
{
public:
GCSpinLock()
{
pthread_spin_init( &m1, 0 );
}
~GCSpinLock()
{
pthread_spin_destroy( &m1 );
}
inline void Acquire()
{
pthread_spin_lock( &m1 );
}
inline void Release()
{
pthread_spin_unlock( &m1 );
}
private:
pthread_spinlock_t m1;
};
/**
* GCAcquireSpinlock is a convenience class which acquires
* the specified spinlock at construct time, then releases
* the spinlock at desruct time. The single statement
*
* GCAcquireSpinlock acquire(spinlock);
*
* ... will acquire the spinlock at the top of the function
* and release it at the end. This makes for less error-prone
* code than explicit acquire/release.
*/
class GCAcquireSpinlock
{
public:
GCAcquireSpinlock(GCSpinLock& spinlock) : m_spinlock(spinlock)
{
m_spinlock.Acquire();
}
~GCAcquireSpinlock()
{
m_spinlock.Release();
}
private:
GCSpinLock& m_spinlock;
};
}
#endif /* __GCSpinLock__ */

View File

@@ -1,135 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCSpinLock__
#define __GCSpinLock__
#ifdef __GNUC__
#include <CoreServices/CoreServices.h>
#else // __GNUC__
#include <Multiprocessing.h>
#endif // __GNUC__
#if TARGET_RT_MAC_MACHO
extern "C"
{
extern void _spin_lock(uint32_t *);
extern void _spin_unlock(uint32_t *);
}
#endif
namespace MMgc
{
/**
* GCSpinLock is a simple spin lock class used by GCHeap to
* ensure mutually exclusive access. The GCHeap may be accessed
* by multiple threads, so this is necessary to ensure that
* the threads do not step on each other.
*/
class GCSpinLock
{
public:
GCSpinLock()
{
#if TARGET_RT_MAC_MACHO
m1 = 0;
#else
OSStatus critErr = ::MPCreateCriticalRegion( &mCriticalRegion );
GCAssert( critErr == noErr );
#endif
}
~GCSpinLock()
{
#if !TARGET_RT_MAC_MACHO
OSStatus critErr = ::MPDeleteCriticalRegion( mCriticalRegion );
GCAssert( critErr == noErr );
#endif
}
inline void Acquire()
{
#if TARGET_RT_MAC_MACHO
_spin_lock(&m1);
#else
OSStatus critErr = ::MPEnterCriticalRegion( mCriticalRegion, kDurationForever );
GCAssert( critErr == noErr );
#endif
}
inline void Release()
{
#if TARGET_RT_MAC_MACHO
_spin_unlock(&m1);
#else
OSStatus critErr = ::MPExitCriticalRegion( mCriticalRegion );
GCAssert( critErr == noErr );
#endif
}
private:
#if TARGET_RT_MAC_MACHO
uint32_t m1;
#else
MPCriticalRegionID mCriticalRegion;
#endif
};
/**
* GCAcquireSpinlock is a convenience class which acquires
* the specified spinlock at construct time, then releases
* the spinlock at desruct time. The single statement
*
* GCAcquireSpinlock acquire(spinlock);
*
* ... will acquire the spinlock at the top of the function
* and release it at the end. This makes for less error-prone
* code than explicit acquire/release.
*/
class GCAcquireSpinlock
{
public:
GCAcquireSpinlock(GCSpinLock& spinlock) : m_spinlock(spinlock)
{
m_spinlock.Acquire();
}
~GCAcquireSpinlock()
{
m_spinlock.Release();
}
private:
GCSpinLock& m_spinlock;
};
}
#endif /* __GCSpinLock__ */

View File

@@ -1,99 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCSpinLock__
#define __GCSpinLock__
#include <windows.h>
namespace MMgc
{
/**
* GCSpinLock is a simple spin lock class used by GCHeap to
* ensure mutually exclusive access. The GCHeap may be accessed
* by multiple threads, so this is necessary to ensure that
* the threads do not step on each other.
*/
class GCSpinLock
{
public:
GCSpinLock()
{
sl = 0;
}
inline void Acquire()
{
GCAssert(sl==0 || sl==1 || sl==0); // Poor mans defense against thread timing issues, per Tom R.
while (InterlockedCompareExchange(&sl, 1, 0) != 0) {
Sleep(0);
}
}
inline void Release()
{
InterlockedExchange(&sl, 0);
}
private:
long sl;
};
/**
* GCAcquireSpinlock is a convenience class which acquires
* the specified spinlock at construct time, then releases
* the spinlock at desruct time. The single statement
*
* GCAcquireSpinlock acquire(spinlock);
*
* ... will acquire the spinlock at the top of the function
* and release it at the end. This makes for less error-prone
* code than explicit acquire/release.
*/
class GCAcquireSpinlock
{
public:
GCAcquireSpinlock(GCSpinLock& spinlock) : m_spinlock(spinlock)
{
m_spinlock.Acquire();
}
~GCAcquireSpinlock()
{
m_spinlock.Release();
}
private:
GCSpinLock& m_spinlock;
};
}
#endif /* __GCSpinLock__ */

View File

@@ -1,123 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCStack__
#define __GCStack__
namespace MMgc
{
template<typename T, int defSize=512>
class GCStack
{
enum { kDefSize = defSize };
public:
GCStack(int defaultSize=kDefSize) : m_iCount(0), m_iAllocSize(defaultSize), m_items(NULL)
{
Alloc();
}
~GCStack()
{
if ( m_items )
{
delete [] m_items;
m_items = NULL;
}
m_iCount = m_iAllocSize = 0;
}
void Push(T item)
{
if ( ( m_iCount + 1 ) > m_iAllocSize )
{
// need to allocate a new block first
m_iAllocSize = m_iAllocSize ? m_iAllocSize*2 : kDefSize;
Alloc();
}
m_items[m_iCount++] = item;
}
T Pop()
{
T t = m_items[--m_iCount];
#ifdef _DEBUG
GCAssert(m_iCount>=0);
memset(&m_items[m_iCount], 0, sizeof(T));
#endif
return t;
}
T Peek()
{
#ifdef _DEBUG
GCAssert(m_iCount>=0);
#endif
T t = m_items[m_iCount-1];
return t;
}
unsigned int Count() { return m_iCount; }
void Keep(unsigned int num)
{
GCAssert(num <= m_iCount);
m_iCount = num;
}
T* GetData() { return m_items; }
protected:
// no impl
GCStack(const GCStack& other);
GCStack& operator=(const GCStack& other);
private:
void Alloc()
{
// need to allocate a new block first
if(m_iAllocSize) {
T* items = new T[ m_iAllocSize ];
if ( items )
{
::memcpy(items, m_items, m_iCount * sizeof(T));
}
delete [] m_items;
m_items = items;
}
}
unsigned int m_iCount, m_iAllocSize;
T *m_items;
};
}
#endif /* __GCStack__ */

View File

@@ -1,147 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"
#ifdef _MSC_VER
// "behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized"
#pragma warning(disable:4345) // b/c GCObject doesn't have a ctor
#endif
namespace MMgc
{
GC *gc;
GCWeakRef* createWeakRef(int extra=0)
{
return (new (gc, extra) GCObject())->GetWeakRef();
}
void weakRefSweepSmall()
{
GCWeakRef *ref = createWeakRef();
gc->Collect();
gc->CleanStack(true);
gc->Collect();
(void)ref;
GCAssert(ref->get() == NULL);
}
void weakRefSweepLarge()
{
GCWeakRef *ref = createWeakRef(5000);
gc->Collect();
gc->CleanStack(true);
gc->Collect();
(void)ref;
GCAssert(ref->get() == NULL);
}
void weakRefFreeSmall()
{
GCWeakRef *ref = createWeakRef();
delete ref->get();
GCAssert(ref->get() == NULL);
}
void weakRefFreeLarge()
{
GCWeakRef *ref = createWeakRef(5000);
delete ref->get();
GCAssert(ref->get() == NULL);
}
class RCObjectAddRefInDtor : public RCObject
{
public:
RCObjectAddRefInDtor(RCObject **stackPinners, int length) : rcs(stackPinners), length(length) {}
~RCObjectAddRefInDtor()
{
// whack these, used create freelist
for(int i=0, n=length; i<n;i++)
{
r1 = rcs[i];
}
// add/remove myself (this was the apollo bug)
r1 = this;
r1 = NULL;
rcs = NULL;
length = 0;
}
DRCWB(RCObject*) r1;
// naked pointer so I can kick these pinners out out of the ZCT during reap
RCObject **rcs;
int length;
};
GCWeakRef* createProblem(RCObject **stackPinners)
{
// now create one that causes some removes from the dtor
return (new (gc) RCObjectAddRefInDtor(stackPinners, 3))->GetWeakRef();
}
/* see bug 182420 */
void drcApolloTest()
{
// prime ZCT with some pinners
RCObject *stackPinners[3];
GCWeakRef *wr = createProblem(stackPinners);
stackPinners[0] = new (gc) RCObject();
stackPinners[1] = new (gc) RCObject();
stackPinners[2] = new (gc) RCObject();
// force ZCT
for(int i=0, n=1000;i<n; i++)
{
new (gc) RCObject();
}
// it may still be alive if we had a dirty stack
if(wr->get())
delete wr->get();
}
void RunGCTests(GC *g)
{
gc = g;
weakRefSweepSmall();
weakRefSweepLarge();
weakRefFreeSmall();
weakRefFreeLarge();
drcApolloTest();
}
}

View File

@@ -1,42 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCTests__
#define __GCTests__
namespace MMgc
{
void RunGCTests(GC *gc);
}
#endif /* __GCTests__ */

View File

@@ -1,94 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __GCTypes__
#define __GCTypes__
#ifdef _MAC
#include <stdint.h>
#endif
namespace MMgc
{
#ifdef _MSC_VER
typedef __int64 int64;
typedef __int64 sint64;
typedef unsigned __int64 uint64;
#elif defined(_MAC)
typedef int64_t int64;
typedef int64_t sint64;
typedef uint64_t uint64;
#else
typedef long long int64;
typedef long long sint64;
typedef unsigned long long uint64;
#endif
typedef unsigned long uint32;
typedef signed long int32;
typedef unsigned short uint16;
typedef signed short int16;
typedef unsigned char uint8;
typedef signed char int8;
// math friendly pointer (64 bits in LP 64 systems)
typedef unsigned long intptr;
/* wchar is our version of wchar_t, since wchar_t is different sizes
on different platforms, but we want to use UTF-16 uniformly. */
typedef unsigned short wchar;
/**
* Conservative collector unit of work
*/
class GCWorkItem
{
public:
GCWorkItem() : ptr(0), size(0) {}
GCWorkItem(const void *p, uint32 s) : ptr(p), size(s) {}
const void *ptr;
uint32 size;
};
typedef void* (*GCMallocFuncPtr)(size_t size);
typedef void (*GCFreeFuncPtr)(void* mem);
#ifndef NULL
#define NULL 0
#endif
}
#endif /* __GCTypes__ */

View File

@@ -1,107 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
//
// GCWeakRef.h
// GC weak references (aka safe handles) as template classes
//
#ifndef _GC_WEAK_REF_H_
#define _GC_WEAK_REF_H_
namespace MMgc
{
// new improved weak ref
class GCWeakRef : public GCObject
{
friend class GC;
public:
GCObject *get() { return (GCObject*)m_obj; }
void clear() { m_obj = 0; }
private:
// override new so we can be tell the GC we don't contain pointers
static void *operator new(size_t size, GC *gc)
{
return gc->Alloc(size, 0, 4);
}
// private, only GC can access
GCWeakRef(const void *obj) : m_obj(obj)
{
#ifdef _DEBUG
obj_creation = *((int*)GetRealPointer(obj)+1);
#endif
}
const void *m_obj;
#ifdef _DEBUG
int obj_creation;
#endif
};
#if 0
// something like this would be nice
template<class T> class GCWeakRefPtr
{
public:
GCWeakRefPtr() {}
GCWeakRefPtr(T t) { set(t);}
~GCWeakRefPtr() { t = NULL; }
T operator=(const GCWeakRefPtr<T>& wb)
{
return set(wb.t);
}
T operator=(T tNew)
{
return set(tNew);
}
operator T() const { return (T) t->get(); }
bool operator!=(T other) const { return other != t; }
T operator->() const
{
return (T) t->get();
}
private:
T set(const T tNew)
{
t = tNew->GetWeakRef();
}
GCWeakRef* t;
};
#endif
}
#endif // _GC_WEAK_REF_H_

View File

@@ -1,32 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "MMgc.h"

View File

@@ -1,151 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __MMgc__
#define __MMgc__
// For size_t
#include <stddef.h>
#ifdef WIN32
#include "winbuild.h"
#endif
#ifdef _MAC
#include "macbuild.h"
#endif
#ifdef AVMPLUS_LINUX
#include "linuxbuild.h"
#endif
#ifdef MMGC_ARM
#include "armbuild.h"
#endif
//define this to get an alloc log
//#define ALLOC_LOG
#if defined(ALLOC_LOG) || defined(GC_STATS)
#include <stdio.h>
#endif
#ifdef SCRIPT_DEBUGGER
#ifndef DEBUGGER
#define DEBUGGER
#endif
#endif
#if defined(_DEBUG) || defined(_MAC)
// for memset
#include <string.h>
#endif
#ifndef _MSC_VER
#define __forceinline
#endif
#include "GCDebug.h"
/*
* If _GCHeapLock is defined, a spin lock is used for thread safety
* on all public API's (Alloc, Free, ExpandHeap)
*
* Warning:
* We may use GCHeap for allocation on other threads, hence the
* spinlock, but the MMgc garbage collector in general is not
* thread-safe.
*/
#ifdef GCHEAP_LOCK
#ifdef WIN32
#include "GCSpinLockWin.h"
#endif
#ifdef _MAC
#include "GCSpinLockMac.h"
#endif
#ifdef AVMPLUS_LINUX
#include "GCSpinLockLinux.h"
#endif
#endif
namespace MMgc
{
class GCAllocBase;
class GC;
class GCTraceObject;
class RCObject;
class GCWeakRef;
class GCObject;
class GCHashtable;
class Cleaner;
class GCAlloc;
}
#ifdef _MSC_VER
#pragma warning(disable:4291) // no matching operator delete found; memory will not be freed if initialization throws an exception
#endif
#include "GCTypes.h"
#include "GCStack.h"
#include "GCAllocObject.h"
#include "GCAllocBase.h"
#include "GCHeap.h"
#include "GCAlloc.h"
#include "GCLargeAlloc.h"
#include "GCMemoryProfiler.h"
#include "FixedAlloc.h"
#include "FixedMalloc.h"
#include "GCHashtable.h"
#include "GC.h"
#include "GCObject.h"
#include "GCWeakRef.h"
#include "WriteBarrier.h"
#ifdef MMGC_AVMPLUS
#include "avmbuild.h"
#include "avmplus.h"
#ifdef AVMPLUS_PROFILE
#define PROFILE(x) avmplus::DynamicProfiler::StackMark mark(x)
#else
#define PROFILE(x)
#endif
#else
#define PROFILE(x)
#endif
#if defined(MMGC_DRC) && !defined(WRITE_BARRIERS)
#error "Need write barriers for DRC"
#endif
#endif /* __MMgc__ */

Binary file not shown.

View File

@@ -1,30 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MMgc", "MMgc.vcproj", "{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
VTune = VTune
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug.ActiveCfg = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug.Build.0 = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release.ActiveCfg = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release.Build.0 = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune.ActiveCfg = VTune|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune.Build.0 = VTune|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.Debug.ActiveCfg = Debug|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.Debug.Build.0 = Debug|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.Release.ActiveCfg = Release|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.Release.Build.0 = Release|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.VTune.ActiveCfg = VTune|Win32
{FE29422B-B9A1-4C3A-954A-0B37CF0642D5}.VTune.Build.0 = VTune|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -1,375 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="MMgc"
ProjectGUID="{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}"
SccProjectName=""
SccAuxPath=""
SccLocalPath=""
SccProvider=""
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="0">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc_d.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="4"
CharacterSet="0">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="0"
OptimizeForProcessor="0"
AdditionalIncludeDirectories=".;..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32"
StringPooling="TRUE"
ExceptionHandling="FALSE"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
AssemblerOutput="4"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="TRUE"
Detect64BitPortabilityProblems="FALSE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="VTune|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="0">
<Tool
Name="VCCLCompilerTool"
Optimization="3"
FavorSizeOrSpeed="1"
OptimizeForProcessor="2"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32"
StringPooling="TRUE"
ExceptionHandling="FALSE"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="2"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="lib/MMgc_vtune.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release Debugger|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;DEBUGGER;AVMPLUS_IA32"
StringPooling="TRUE"
ExceptionHandling="FALSE"
RuntimeLibrary="0"
BufferSecurityCheck="FALSE"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="TRUE"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Debug Debugger|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="0">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;DEBUGGER;AVMPLUS_IA32"
MinimalRebuild="TRUE"
ExceptionHandling="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc_d.lib"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\FixedAlloc.cpp">
</File>
<File
RelativePath=".\FixedMalloc.cpp">
</File>
<File
RelativePath="GC.cpp">
</File>
<File
RelativePath="GCAlloc.cpp">
</File>
<File
RelativePath="GCAllocBase.cpp">
</File>
<File
RelativePath=".\GCAllocObjectWin.cpp">
</File>
<File
RelativePath=".\GCDebugWin.cpp">
</File>
<File
RelativePath=".\GCHashtable.cpp">
</File>
<File
RelativePath="GCHeap.cpp">
</File>
<File
RelativePath="GCHeapWin.cpp">
</File>
<File
RelativePath="GCLargeAlloc.cpp">
</File>
<File
RelativePath=".\GCMemoryProfiler.cpp">
</File>
<File
RelativePath=".\GCObject.cpp">
</File>
<File
RelativePath=".\GCTests.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\FixedAlloc.h">
</File>
<File
RelativePath=".\FixedMalloc.h">
</File>
<File
RelativePath="GC.h">
</File>
<File
RelativePath="GCAlloc.h">
</File>
<File
RelativePath="GCAllocBase.h">
</File>
<File
RelativePath=".\GCAllocObject.h">
</File>
<File
RelativePath=".\GCDebug.h">
</File>
<File
RelativePath=".\GCHashtable.h">
</File>
<File
RelativePath="GCHeap.h">
</File>
<File
RelativePath="GCLargeAlloc.h">
</File>
<File
RelativePath=".\GCMemoryProfiler.h">
</File>
<File
RelativePath=".\GCObject.h">
</File>
<File
RelativePath=".\GCSpinLockWin.h">
</File>
<File
RelativePath=".\GCStack.h">
</File>
<File
RelativePath=".\GCTests.h">
</File>
<File
RelativePath=".\GCTypes.h">
</File>
<File
RelativePath=".\GCWeakRef.h">
</File>
<File
RelativePath=".\MMgc.h">
</File>
<File
RelativePath=".\winbuild.h">
</File>
<File
RelativePath=".\WriteBarrier.h">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
</Filter>
<File
RelativePath=".\VTune\MMgc.vpj">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,28 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MMgc", "MMgc_8.vcproj", "{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Debugger|Win32 = Debug Debugger|Win32
Debug|Win32 = Debug|Win32
Release Debugger|Win32 = Release Debugger|Win32
Release|Win32 = Release|Win32
VTune|Win32 = VTune|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug Debugger|Win32.ActiveCfg = Debug Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug Debugger|Win32.Build.0 = Debug Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug|Win32.ActiveCfg = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug|Win32.Build.0 = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release Debugger|Win32.ActiveCfg = Release Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release Debugger|Win32.Build.0 = Release Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release|Win32.ActiveCfg = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release|Win32.Build.0 = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune|Win32.ActiveCfg = VTune|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune|Win32.Build.0 = VTune|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@@ -1,531 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="MMgc"
ProjectGUID="{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
IntermediateDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
ExceptionHandling="1"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
TreatWChar_tAsBuiltInType="false"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc_d.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
IntermediateDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories=".;..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
TreatWChar_tAsBuiltInType="false"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
AssemblerOutput="4"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="VTune|Win32"
OutputDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
IntermediateDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="3"
FavorSizeOrSpeed="1"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;AVMPLUS_IA32;_CRT_SECURE_NO_DEPRECATE"
StringPooling="true"
ExceptionHandling="0"
RuntimeLibrary="0"
BufferSecurityCheck="false"
TreatWChar_tAsBuiltInType="false"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc_vtune.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Debugger|Win32"
OutputDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
IntermediateDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;DEBUGGER;AVMPLUS_IA32;_CRT_SECURE_NO_DEPRECATE"
ExceptionHandling="0"
TreatWChar_tAsBuiltInType="false"
RuntimeTypeInfo="false"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug Debugger|Win32"
OutputDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
IntermediateDirectory="obj_8/$(ProjectName)/$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\core;..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;DEBUGGER;AVMPLUS_IA32;_CRT_SECURE_NO_DEPRECATE"
MinimalRebuild="true"
ExceptionHandling="1"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
TreatWChar_tAsBuiltInType="false"
UsePrecompiledHeader="0"
ProgramDataBaseFileName="$(IntDir)/MMgc.pdb"
BrowseInformation="0"
WarningLevel="4"
WarnAsError="true"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/MMgc_d.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\FixedAlloc.cpp"
>
</File>
<File
RelativePath=".\FixedMalloc.cpp"
>
</File>
<File
RelativePath="GC.cpp"
>
</File>
<File
RelativePath="GCAlloc.cpp"
>
</File>
<File
RelativePath="GCAllocBase.cpp"
>
</File>
<File
RelativePath=".\GCAllocObjectWin.cpp"
>
</File>
<File
RelativePath=".\GCDebugWin.cpp"
>
</File>
<File
RelativePath=".\GCHashtable.cpp"
>
</File>
<File
RelativePath="GCHeap.cpp"
>
</File>
<File
RelativePath="GCHeapWin.cpp"
>
</File>
<File
RelativePath="GCLargeAlloc.cpp"
>
</File>
<File
RelativePath=".\GCMemoryProfiler.cpp"
>
</File>
<File
RelativePath=".\GCObject.cpp"
>
</File>
<File
RelativePath=".\GCTests.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\FixedAlloc.h"
>
</File>
<File
RelativePath=".\FixedMalloc.h"
>
</File>
<File
RelativePath="GC.h"
>
</File>
<File
RelativePath="GCAlloc.h"
>
</File>
<File
RelativePath="GCAllocBase.h"
>
</File>
<File
RelativePath=".\GCAllocObject.h"
>
</File>
<File
RelativePath=".\GCDebug.h"
>
</File>
<File
RelativePath=".\GCHashtable.h"
>
</File>
<File
RelativePath="GCHeap.h"
>
</File>
<File
RelativePath="GCLargeAlloc.h"
>
</File>
<File
RelativePath=".\GCMemoryProfiler.h"
>
</File>
<File
RelativePath=".\GCObject.h"
>
</File>
<File
RelativePath=".\GCSpinLockWin.h"
>
</File>
<File
RelativePath=".\GCStack.h"
>
</File>
<File
RelativePath=".\GCTests.h"
>
</File>
<File
RelativePath=".\GCTypes.h"
>
</File>
<File
RelativePath=".\GCWeakRef.h"
>
</File>
<File
RelativePath=".\MMgc.h"
>
</File>
<File
RelativePath=".\winbuild.h"
>
</File>
<File
RelativePath=".\WriteBarrier.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\VTune\MMgc.vpj"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,108 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version 1.1 (the
# "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is [Open Source Virtual Machine.]
#
# The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
# by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
# Reserved.
#
# Contributor(s): Adobe AS3 Team
#
# Alternatively, the contents of this file may be used under the terms of either the GNU
# General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
# License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
# LGPL are applicable instead of those above. If you wish to allow use of your version of this
# file only under the terms of either the GPL or the LGPL, and not to allow others to use your
# version of this file under the terms of the MPL, indicate your decision by deleting provisions
# above and replace them with the notice and other provisions required by the GPL or the
# LGPL. If you do not delete the provisions above, a recipient may use your version of this file
# under the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK ***** */
# DEBUG can be set to YES to include debugging info, or NO otherwise
DEBUG := YES
# DEBUGGER can be set to choose the Content Debugger version of the gc
DEBUGGER := YES
MMGC_ROOT := .
CC := gcc
CXX := g++
AR := ar
UNAME := $(shell uname)
ARCH := ${shell uname -m}
ifeq ($(UNAME),Linux)
MMGC_PLATFORM_DEFS := -DSOFT_ASSERTS -D_DEBUG
endif
ifeq ($(UNAME),Darwin)
MMGC_PLATFORM_DEFS := -DDARWIN -D_MAC -Dpowerc -DSOFT_ASSERTS -DDEBUGGER -DTARGET_RT_MAC_MACHO=1 -D_DEBUG -DDEBUG
ifeq (${ARCH},i386)
MMGC_PLATFORM_DEFS := ${MMGC_PLATFORM_DEFS} -DAVMPLUS_IA32
else
MMGC_PLATFORM_DEFS := ${MMGC_PLATFORM_DEFS} -DAVMPLUS_PPC
endif
endif
ifeq ($(UNAME),CYGWIN_NT-5.1)
MMGC_PLATFORM_DEFS := -DCYGWIN -DAVMPLUS_IA32
endif
include makecommon
#****************************************************************************
# Targets of the build
#****************************************************************************
OUTPUT := libmmgc.a
all: ${OUTPUT}
#****************************************************************************
# Output
#****************************************************************************
OBJS := $(addsuffix .o,$(basename ${MMGC_SRCS}))
${OUTPUT}: ${OBJS}
@echo "=== creating libmmgc.a ==="
${AR} rcs $@ ${OBJS}
@echo "Done"
#****************************************************************************
# Dependencies
#****************************************************************************
# Create a lists of object and .d files to create -
# one for each source file in the directory
DEPS := ${patsubst %${strip .cpp},%.d,${MMGC_SRCS}}
# make any non-existent make files (using the g++ preprocessor)
${DEPS} : %.d : %.cpp
${CXX} ${MMGC_CXXFLAGS} ${MMGC_INCS} -MM $< > $@
# Rules
clean:
-rm -f core* ${OBJS} ${OUTPUT} ${DEPS} log outputdebug.txt
ifneq (${MAKECMDGOALS},clean)
ifneq (${UNAME},Linux)
include ${DEPS} # include the generated make files, which make the object files
endif
endif

View File

@@ -1,172 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version 1.1 (the
# "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is [Open Source Virtual Machine.]
#
# The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
# by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
# Reserved.
#
# Contributor(s): Adobe AS3 Team
#
# Alternatively, the contents of this file may be used under the terms of either the GNU
# General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
# License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
# LGPL are applicable instead of those above. If you wish to allow use of your version of this
# file only under the terms of either the GPL or the LGPL, and not to allow others to use your
# version of this file under the terms of the MPL, indicate your decision by deleting provisions
# above and replace them with the notice and other provisions required by the GPL or the
# LGPL. If you do not delete the provisions above, a recipient may use your version of this file
# under the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK ***** */
# Set this to yes if doing ARM skunkworks
ARM_SKUNKWORKS := YES
# Set this to yes for GNUARM
GNUARM := YES
# DEBUG can be set to YES to include debugging info, or NO otherwise
DEBUG := YES
CC := arm-elf-gcc
CXX := arm-elf-g++
AR := arm-elf-ar
RANLIB := arm-elf-ranlib
UNAME := $(shell uname)
ifeq ($(UNAME),Linux)
PLATFORM_DEFS := -DAVMPLUS_LINUX -DSOFT_ASSERTS -DDEBUGGER -DAVMPLUS_IA32 -D_DEBUG -DDEBUG -DCYGWIN -DAVMPLUS_IA32
endif
ifeq ($(UNAME),Darwin)
PLATFORM_DEFS := -DDARWIN -D_MAC -Dpowerc -DSOFT_ASSERTS -DAVMPLUS_PPC -DDEBUGGER -DTARGET_RT_MAC_MACHO=1 -D_DEBUG -DDEBUG
endif
ifeq ($(UNAME),CYGWIN_NT-5.1)
PLATFORM_DEFS := -DCYGWIN -DAVMPLUS_IA32
endif
ifeq (YES, ${ARM_SKUNKWORKS})
ifeq (YES, ${GNUARM})
SOFT_FLOAT :=
USE_MMAP :=
else
SOFT_FLOAT := -msoft-float
USE_MMAP := -DUSE_MMAP
endif
else
SOFT_FLOAT :=
USE_MMAP := -DUSE_MMAP
endif
ifeq (YES, ${ARM_SKUNKWORKS})
PLATFORM_DEFS := -DSOFT_ASSERTS -DMMGC_ARM -DAVMPLUS_ARM -DAVMPLUS_UCLINUX -DDEBUGGER -D_DEBUG -DDEBUG
endif
DEBUG_CFLAGS := -g -MMD
RELEASE_CFLAGS := -O3 -MMD
DEBUG_CXXFLAGS := ${DEBUG_CFLAGS} -fno-rtti -fcheck-new ${SOFT_FLOAT} ${USE_MMAP}
RELEASE_CXXFLAGS := ${RELEASE_CFLAGS} -fno-rtti -fcheck-new ${SOFT_FLOAT} ${USE_MMAP}
ifeq (YES, ${DEBUG})
CFLAGS := ${DEBUG_CFLAGS}
CXXFLAGS := ${DEBUG_CXXFLAGS}
else
CFLAGS := ${RELEASE_CFLAGS}
CXXFLAGS := ${RELEASE_CXXFLAGS}
endif
#****************************************************************************
# Preprocessor directives
#****************************************************************************
DEFS := -DUNIX ${PLATFORM_DEFS} -DENABLE_PROFILER
CFLAGS := ${CFLAGS} ${DEFS}
CXXFLAGS := ${CXXFLAGS} ${DEFS}
#****************************************************************************
# Include paths
#****************************************************************************
INCS := -I. -I../core -I../codegen
#****************************************************************************
# Targets of the build
#****************************************************************************
OUTPUT := libmmgc.a
all: ${OUTPUT}
#****************************************************************************
# Source files
#****************************************************************************
SRCS := GCObject.cpp \
GCMemoryProfiler.cpp \
GCLargeAlloc.cpp \
GCHeapUnix.cpp \
GCHeap.cpp \
GCHashtable.cpp \
GCDebugUnix.cpp \
GCAllocObjectUnix.cpp \
GCAllocBase.cpp \
GCAlloc.cpp \
GC.cpp \
FixedMalloc.cpp \
FixedAlloc.cpp
#****************************************************************************
# Output
#****************************************************************************
OBJS := $(addsuffix .o,$(basename ${SRCS}))
${OUTPUT}: ${OBJS}
${AR} rcs $@ ${OBJS}
${RANLIB} $@
@echo "Done"
#****************************************************************************
# Dependencies
#****************************************************************************
# Create a lists of object and .d files to create -
# one for each source file in the directory
DEPS := $(addsufix .d,$(basename ${SRCS}))
# make any non-existent make files (using the g++ preprocessor)
${DEPS} : %.d : %.cpp
${CXX} ${CXXFLAGS} ${INCS} -MM $< > $@
#****************************************************************************
# Rules
#****************************************************************************
# Rules for compiling source files to object files
%.o : %.cpp
@echo "=== compiling:" $@ ${OPT}
@${CXX} -c ${OPT} ${CXXFLAGS} ${INCS} $< -o $@
clean:
-rm -f core* ${OBJS} ${OUTPUT} ${DEPS} log outputdebug.txt
ifneq (${MAKECMDGOALS},clean)
ifneq (${UNAME},Linux)
include ${DEPS} # include the generated make files, which make the object files
endif
endif

View File

@@ -1,189 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
//
// GCWriteBarrier
//
#ifndef _WRITE_BARRIER_H_
#define _WRITE_BARRIER_H_
#ifdef WRITE_BARRIERS
// inline write barrier
#define WB(gc, container, addr, value) gc->writeBarrier(container, addr, (const void *) (value))
// fast manual RC write barrier
#define WBRC(gc, container, addr, value) gc->writeBarrierRC(container, addr, (const void *) (value))
// declare write barrier
#define DWB(type) MMgc::WriteBarrier<type>
// declare an optimized RCObject write barrier
#define DRCWB(type) MMgc::WriteBarrierRC<type>
#else
#define WB(gc, container, addr, value) *addr = value
#define WBRC(gc, container, addr, value) *addr = value
// declare write barrier
#define DWB(type) type
#define DVWB(type) type
#endif
namespace MMgc
{
/**
* WB is a smart pointer write barrier meant to be used on any field of a GC object that
* may point to another GC object. A write barrier may only be avoided if if the field is
* const and no allocations occur between the construction of the object holding the field
* and the assignment.
*/
template<class T> class WriteBarrier
{
public:
WriteBarrier() {}
WriteBarrier(T t)
{
set(t);
}
~WriteBarrier()
{
t = 0;
}
T operator=(const WriteBarrier<T>& wb)
{
return set(wb.t);
}
T operator=(T tNew)
{
return set(tNew);
}
// BEHOLD ... The weird power of C++ operator overloading
operator T() const { return t; }
#ifdef MMGC_DRC
operator ZeroPtr<T>() const { return t; }
#endif
bool operator!=(T other) const { return other != t; }
T operator->() const
{
return t;
}
private:
// private to prevent its use and someone adding it, GCC creates
// WriteBarrier's on the stack with it
WriteBarrier(const WriteBarrier<T>& toCopy) { GCAssert(false); }
T set(const T tNew)
{
if(t != tNew || tNew != 0)
GC::WriteBarrier(this, (const void*)tNew);
else
t = tNew;
return tNew;
}
T t;
};
/**
* WriteBarrierRC is a write barrier for naked (not pointer swizzled) RC objects.
* the only thing going in and out of the slot is NULL or a valid RCObject
*/
template<class T> class WriteBarrierRC
{
public:
WriteBarrierRC() {}
WriteBarrierRC(T t)
{
set(t);
}
~WriteBarrierRC()
{
if(t != 0) {
((RCObject*)t)->DecrementRef();
t=0;
}
}
T operator=(const WriteBarrierRC<T>& wb)
{
return set(wb.t);
}
T operator=(T tNew)
{
return set(tNew);
}
operator T() const { return t; }
#ifdef MMGC_DRC
operator ZeroPtr<T>() const { return t; }
#endif
bool operator!=(T other) const { return other != t; }
T operator->() const
{
return t;
}
void Clear() { t = 0; }
private:
// see note for WriteBarrier
WriteBarrierRC(const WriteBarrierRC<T>& toCopy);
T set(const T tNew)
{
GC *gc = GC::GetGC(this);
gc->writeBarrierRC(gc->FindBeginning(this), this, (const void*)tNew);
return tNew;
}
T t;
};
}
#endif // _WRITE_BARRIER_H_

View File

@@ -1,79 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifdef DEBUG
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
/**
* Critical section on GCHeap allocations.
*/
//#define GCHEAP_LOCK
/**
* Define this to get stack traces. Helps with memory leaks.
*/
#ifdef DEBUG
#define MEMORY_INFO
#endif
/**
* This turns on incremental collection as well as all of
* the write barriers.
*/
// TODO_LINUX
//#define WRITE_BARRIERS
/**
* Define this if MMgc is being integrated with avmplus.
* Activates dynamic profiling support, etc.
*/
#define MMGC_AVMPLUS
/**
*
*/
#define DECOMMIT_MEMORY
/**
* USE_MMAP not used for ARM skunkworks
*/
//#define USE_MMAP
/**
* Controls whether DRC is in use
*/
//#define MMGC_DRC

View File

@@ -1,87 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifdef DEBUG
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
/**
* Critical section on GCHeap allocations.
*/
#define GCHEAP_LOCK
/**
* IA-32
*/
#define MMGC_IA32
/**
* Define this to get stack traces. Helps with memory leaks.
*/
#ifdef DEBUG
#define MEMORY_INFO
#endif
/**
* This turns on incremental collection as well as all of
* the write barriers.
*/
// TODO_LINUX
#define WRITE_BARRIERS
/**
* Define this if MMgc is being integrated with avmplus.
* Activates dynamic profiling support, etc.
*/
#define MMGC_AVMPLUS
/**
*
*/
#define DECOMMIT_MEMORY
/**
* USE_MMAP only for MACHO builds
*/
#if TARGET_RT_MAC_MACHO
#ifndef USE_MMAP
#define USE_MMAP
#endif
#endif
/**
* Controls whether DRC is in use
*/
#define MMGC_DRC

View File

@@ -1,95 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifdef DEBUG
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
/**
* Critical section on GCHeap allocations.
*/
#define GCHEAP_LOCK
/**
* PowerPC (MacOS)
*/
#ifdef __i386__
#define MMGC_IA32
#else
#define MMGC_PPC
#endif
#define MMGC_MAC
/**
* Define this to get stack traces. Helps with memory leaks.
*/
#ifdef DEBUG
#define MEMORY_INFO
#endif
/**
* This turns on incremental collection as well as all of
* the write barriers.
*/
#define WRITE_BARRIERS
/**
* Define this if MMgc is being integrated with avmplus.
* Activates dynamic profiling support, etc.
*/
#define MMGC_AVMPLUS
/**
*
*/
#define DECOMMIT_MEMORY
/**
* USE_MMAP only for MACHO builds
*/
#if TARGET_RT_MAC_MACHO
#ifndef USE_MMAP
#define USE_MMAP
#endif
#endif
#define MMGC_DRC
/**
* This makes JIT code buffers read-only to reduce the probability of
* heap overflow attacks.
*/
#define AVMPLUS_JIT_READONLY

View File

@@ -1,95 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version 1.1 (the
# "License"); you may not use this file except in compliance with the License. You may obtain
# a copy of the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
# WARRANTY OF ANY KIND, either express or implied. See the License for the specific
# language governing rights and limitations under the License.
#
# The Original Code is [Open Source Virtual Machine.]
#
# The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
# by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
# Reserved.
#
# Contributor(s): Adobe AS3 Team
#
# Alternatively, the contents of this file may be used under the terms of either the GNU
# General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
# License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
# LGPL are applicable instead of those above. If you wish to allow use of your version of this
# file only under the terms of either the GPL or the LGPL, and not to allow others to use your
# version of this file under the terms of the MPL, indicate your decision by deleting provisions
# above and replace them with the notice and other provisions required by the GPL or the
# LGPL. If you do not delete the provisions above, a recipient may use your version of this file
# under the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK ***** */
MMGC_DEBUG_CFLAGS := -g -MMD
MMGC_RELEASE_CFLAGS := -O3 -MMD
MMGC_DEBUG_CXXFLAGS := ${MMGC_DEBUG_CFLAGS} -fno-rtti -fcheck-new
MMGC_RELEASE_CXXFLAGS := ${MMGC_RELEASE_CFLAGS} -fno-rtti -fcheck-new
ifeq (YES, ${DEBUG})
MMGC_CFLAGS := ${MMGC_DEBUG_CFLAGS}
MMGC_CXXFLAGS := ${MMGC_DEBUG_CXXFLAGS}
else
MMGC_CFLAGS := ${MMGC_RELEASE_CFLAGS}
MMGC_CXXFLAGS := ${MMGC_RELEASE_CXXFLAGS}
endif
#************************************************************************
# DEFS
#************************************************************************
MMGC_DEFS := ${MMGC_DEFS} -DAVMPLUS_LINUX -DSOFT_ASSERTS -DDEBUGGER -DAVMPLUS_IA32 -DDEBUG -DCYGWIN -DUSE_MMAP -DENABLE_PROFILER -DENABLE_COMPILER
#************************************************************************
# Include Paths
#************************************************************************
MMGC_INCS := -I${MMGC_ROOT} -I${MMGC_ROOT}/../core -I${MMGC_ROOT}/../codegen
#****************************************************************************
# Preprocessor directives
#****************************************************************************
MMGC_DEFS := ${MMGC_DEFS} -DUNIX ${MMGC_PLATFORM_DEFS} -DUSE_MMAP -DENABLE_PROFILER
MMGC_CFLAGS := ${MMGC_CFLAGS} ${MMGC_DEFS}
MMGC_CXXFLAGS := ${MMGC_CXXFLAGS} ${MMGC_DEFS}
#************************************************************************
# MMgc common files
#************************************************************************
MMGC_SRCS := ${MMGC_ROOT}/GCObject.cpp \
${MMGC_ROOT}/GCMemoryProfiler.cpp \
${MMGC_ROOT}/GCLargeAlloc.cpp \
${MMGC_ROOT}/GCHeapUnix.cpp \
${MMGC_ROOT}/GCHeap.cpp \
${MMGC_ROOT}/GCHashtable.cpp \
${MMGC_ROOT}/GCDebugUnix.cpp \
${MMGC_ROOT}/GCAllocObjectUnix.cpp \
${MMGC_ROOT}/GCAllocBase.cpp \
${MMGC_ROOT}/GCAlloc.cpp \
${MMGC_ROOT}/GC.cpp \
${MMGC_ROOT}/GCTests.cpp \
${MMGC_ROOT}/FixedMalloc.cpp \
${MMGC_ROOT}/FixedAlloc.cpp
#************************************************************************
# MMgc rules
#************************************************************************
define mmgc-cmd
@echo "=== compiling MMgc: ===" $@ ${OPT}
@${CXX} -c ${OPT} ${MMGC_CXXFLAGS} ${MMGC_INCS} $< -o $@
endef
${MMGC_ROOT}/%.o : ${MMGC_ROOT}/%.cpp
$(mmgc-cmd)

View File

@@ -1,67 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <stdio.h>
#include "MMgc.h"
using namespace MMgc;
using namespace avmplus;
int main(int argc, char*argv[])
{
GCHeap::Init();
GC *gc = new GC(GCHeap::GetGCHeap());
int buffer[1024];
List<void*> allocations(gc, 1024*16, false);
FILE *file = fopen("alloc.log", "rb");
int read = 0;
while((read = fread(buffer, 4, 1024, file)) > 0)
{
for(int i=0; i < read; i++) {
int allocSize = buffer[i];
// positive # is alloc, negative is index of alloc to free
if(allocSize > 0)
allocations.add(gc->Alloc(allocSize&~7, allocSize&6));
else {
int index = -allocSize;
void *obj = allocations[index];
allocations.set(index, 0);
//gc->Free(obj);
}
}
}
fclose(file);
}

View File

@@ -1,60 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "run_alloc", "run_alloc.vcproj", "{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}"
ProjectSection(ProjectDependencies) = postProject
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B} = {B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}
{437E43D2-ED2D-406B-88DB-B5940F838AE8} = {437E43D2-ED2D-406B-88DB-B5940F838AE8}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MMgc", "..\MMgc.vcproj", "{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avmplus", "..\..\platform\win32\avmplus.vcproj", "{437E43D2-ED2D-406B-88DB-B5940F838AE8}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Debug Debugger = Debug Debugger
Release = Release
Release Debugger = Release Debugger
VTune = VTune
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Debug.ActiveCfg = Debug|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Debug.Build.0 = Debug|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Debug Debugger.ActiveCfg = Debug|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Debug Debugger.Build.0 = Debug|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Release.ActiveCfg = Release|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Release.Build.0 = Release|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Release Debugger.ActiveCfg = Release|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.Release Debugger.Build.0 = Release|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.VTune.ActiveCfg = VTune|Win32
{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}.VTune.Build.0 = VTune|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug.ActiveCfg = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug.Build.0 = Debug|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug Debugger.ActiveCfg = Debug Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Debug Debugger.Build.0 = Debug Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release.ActiveCfg = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release.Build.0 = Release|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release Debugger.ActiveCfg = Release Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.Release Debugger.Build.0 = Release Debugger|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune.ActiveCfg = VTune|Win32
{B004A8CC-B3A9-4600-A1A9-EF1BBCF2434B}.VTune.Build.0 = VTune|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Debug.ActiveCfg = Debug|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Debug.Build.0 = Debug|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Debug Debugger.ActiveCfg = Debug Debugger|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Debug Debugger.Build.0 = Debug Debugger|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Release.ActiveCfg = Release|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Release.Build.0 = Release|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Release Debugger.ActiveCfg = Release Debugger|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.Release Debugger.Build.0 = Release Debugger|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.VTune.ActiveCfg = VTune|Win32
{437E43D2-ED2D-406B-88DB-B5940F838AE8}.VTune.Build.0 = VTune|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

View File

@@ -1,188 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="run_alloc"
ProjectGUID="{AE14C92F-2B7C-4B33-9B2C-425A4152A0A7}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..;..\..\core;..\..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;_DEBUG;_CONSOLE;AVMPLUS_IA32"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="5"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib DbgHelp.lib"
OutputFile="$(OutDir)/run_alloc.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/run_alloc.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..;..\..\core;..\..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;NDEBUG;_CONSOLE;AVMPLUS_IA32"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/run_alloc.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="VTune|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
FavorSizeOrSpeed="2"
AdditionalIncludeDirectories="..;..\..\core;..\..\codegen"
PreprocessorDefinitions="WIN32_LEAN_AND_MEAN;WIN32;NDEBUG;_CONSOLE;AVMPLUS_IA32"
RuntimeLibrary="4"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib"
OutputFile="$(OutDir)/run_alloc.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\run_alloc.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
</Filter>
<File
RelativePath=".\vtune\run_alloc.vpj">
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,113 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
/**
* Critical section on GCHeap allocations.
*/
#define GCHEAP_LOCK
/**
* IA32 (Intel architecture)
*/
#define MMGC_IA32
/**
* Define this to get stack traces. Helps with memory leaks.
*/
#ifdef _DEBUG
#define MEMORY_INFO
#endif
/**
* This turns on incremental collection as well as all of
* the write barriers.
*/
#define WRITE_BARRIERS
/**
* Define this if MMgc is being integrated with avmplus.
* Activates dynamic profiling support, etc.
*/
#define MMGC_AVMPLUS
/**
* Use VirtualAlloc to reserve/commit memory
*/
#define USE_MMAP
/**
* Define this to track GC pause times
*/
// uncommenting requires you to link with C runtime
//#define GC_STATS
/**
* Turn this on to decommit memory
*/
#define DECOMMIT_MEMORY
/**
* Controls whether DRC is in use
*/
#define MMGC_DRC
/**
* This makes JIT code buffers read-only to reduce the probability of
* heap overflow attacks.
*/
#define AVMPLUS_JIT_READONLY
/**
* compiled with the /W4 warning level
* which is quite picky. Disable warnings we don't care about.
*/
#ifdef _MSC_VER
#pragma warning(disable:4512) //assignment operator could not be generated
#pragma warning(disable:4511) //can't generate copy ctor
#pragma warning(disable:4127) //conditional expression is constant
// enable some that are off even in /W4 mode, but are still handy
#pragma warning(error:4265) // 'class' : class has virtual functions, but destructor is not virtual
#pragma warning(error:4905) // wide string literal cast to 'LPSTR'
#pragma warning(error:4906) // string literal cast to 'LPWSTR'
// some that might be useful to turn on someday, but would require too much twiddly code tweaking right now
// #pragma warning(error:4263) // 'function' : member function does not override any base class virtual member function
// #pragma warning(error:4264) // 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
// #pragma warning(error:4266) // 'function' : no override available for virtual member function from base 'type'; function is hidden
// #pragma warning(error:4242) // 'identifier' : conversion from 'type1' to 'type2', possible loss of data
// #pragma warning(error:4263) // member function does not override any base class virtual member function
// #pragma warning(error:4296) // expression is always true (false) (Generally, an unsigned variable was used in a comparison operation with zero.)
#endif

View File

@@ -1,894 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
//hack
#include <stdio.h>
namespace avmplus
{
#ifdef AVMPLUS_ARM
#ifdef AVMPLUS_VERBOSE
const char* ArmAssembler::conditionCodes[] =
{
"eq",
"ne",
"cs",
"cc",
"mi",
"pl",
"vs",
"vc",
"hi",
"ls",
"ge",
"lt",
"gt",
"le",
"al",
"nv"
};
const char* ArmAssembler::regNames[] =
{
"r0",
"r1",
"r2",
"r3",
"r4",
"r5",
"r6",
"r7",
"r8",
"r9",
"r10",
"fp",
"ip",
"sp",
"lr",
"pc"
};
#endif /* AVMPLUS_VERBOSE */
ArmAssembler::ArmAssembler()
{
mip = 0;
mipStart = 0;
mInstructionCount = 0;
verboseFlag = false;
console = 0;
conditionCode = AL;
}
#define PRINT_LAST_INSTRUCTION()
//#define PRINT_LAST_INSTRUCTION() console->format("%A\n", mip[-1])
void ArmAssembler::MOV(Register dst, Register src)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A mov %R, %R\n", mip, dst, src);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01A00000 | (conditionCode<<28) | (dst<<12) | src;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::LSL(Register dst, Register src, Register rShift)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A lsl %R, %R, %R\n", mip, dst, src, rShift);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01A00010 | (conditionCode<<28) | (dst<<12) | src | (rShift<<7);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::LSR(Register dst, Register src, Register rShift)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A lsr %R, %R, %R\n", mip, dst, src, rShift);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01A00030 | (conditionCode<<28) | (dst<<12) | src | (rShift<<7);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::ASR(Register dst, Register src, Register rShift)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A asr %R, %R, %R\n", mip, dst, src, rShift);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01A00050 | (conditionCode<<28) | (dst<<12) | src | (rShift<<7);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::CMP(Register Rn, Register Rm)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A cmp %R, %R\n", mip, Rn, Rm);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01400000 | (conditionCode<<28) | (Rn<<16) | Rm;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::ADD(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A add %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x00800000 | (conditionCode<<28) | (dst<<12) | (src1<<16) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::AND(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A and %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x00000000 | (conditionCode<<28) | (dst<<12) | (src1<<16) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::OR(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A or %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x01800000 | (conditionCode<<28) | (dst<<12) | (src1<<16) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::XOR(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A xor %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x00200000 | (conditionCode<<28) | (dst<<12) | (src1<<16) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::MUL(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A mul %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x00000090 | (conditionCode<<28) | (dst<<16) | (src1<<8) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::SUB(Register dst, Register src1, Register src2)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A sub %R, %R, %R\n", mip, dst, src1, src2);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x00400000 | (conditionCode<<28) | (dst<<12) | (src1<<16) | src2;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::STMFD_bang(Register dst, int mask)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A stmfd %R!, %A\n", mip, dst, mask);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x09200000 | (conditionCode<<28) | (dst<<16) | mask;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::SUB_imm8(Register dst, Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A sub %R, %R, %d\n", mip, dst, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x02400000 | (conditionCode<<28) | (src<<16) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::RSB_imm8(Register dst, Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A rsb %R, %R, %d\n", mip, dst, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x02600000 | (conditionCode<<28) | (src<<16) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::BL(int offset24)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A bl %A\n", mip, offset24);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x0B000000 | (conditionCode<<28) | ((offset24-8)>>2)&0xFFFFFF;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::B(int offset24)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A b %A\n", mip, offset24);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x0A000000 | (conditionCode<<28) | ((offset24-8)>>2)&0xFFFFFF;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::LDR(Register dst, int offset, Register base)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A ldr %R, %d(%R)\n", mip, dst, offset, base);
#endif /* AVMPLUS_VERBOSE */
if (offset<0) {
*mip++ = 0x05100000 | (conditionCode<<28) | (base<<16) | (dst<<12) | (-offset&0x7FF);
} else {
*mip++ = 0x05900000 | (conditionCode<<28) | (base<<16) | (dst<<12) | (offset&0x7FF);
}
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::BIC_imm8(Register dst, Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A bic %R, %R, %d\n", mip, dst, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x03C00000 | (conditionCode<<28) | (src<<16) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::MOV_imm8(Register dst, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A mov %R, %d\n", mip, dst, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x03A00000 | (conditionCode<<28) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
// Cheesy macro for doing IMM32. Needs work.
void ArmAssembler::MOV_imm32(Register dst, int imm32)
{
// Branch to instruction after constant
B(8);
// Write the constant
*mip++ = imm32;
// Load the constant (-12 due to ARM pipeline's +8 bias)
LDR(dst, -12, PC);
}
void ArmAssembler::CMP_imm8(Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A cmp %R, %d\n", mip, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x03500000 | (conditionCode<<28) | (src<<16) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::STR(Register src, int offset, Register base)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A str %R, %d(%R)\n", mip, src, offset, base);
#endif /* AVMPLUS_VERBOSE */
if (offset<0) {
*mip++ = 0x05000000 | (conditionCode<<28) | (base<<16) | (src<<12) | (-offset&0x7FF);
} else {
*mip++ = 0x05800000 | (conditionCode<<28) | (base<<16) | (src<<12) | (offset&0x7FF);
}
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::ADD_imm8(Register dst, Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A add %R, %R, %d\n", mip, dst, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x02800000 | (conditionCode<<28) | (src<<16) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::AND_imm8(Register dst, Register src, int imm8)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A and %R, %R, %d\n", mip, dst, src, imm8);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x02000000 | (conditionCode<<28) | (src<<16) | (dst<<12) | (imm8&0xFF);
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::LDMFD(Register src, int mask)
{
incInstructionCount();
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format(" %A ldmfd %R, %A\n", mip, src, mask);
#endif /* AVMPLUS_VERBOSE */
*mip++ = 0x08900000 | (conditionCode<<28) | (src<<16) | mask;
PRINT_LAST_INSTRUCTION();
}
void ArmAssembler::SET_CONDITION_CODE(ConditionCode conditionCode)
{
this->conditionCode = conditionCode;
#ifdef AVMPLUS_VERBOSE
if (verboseFlag)
console->format("%s:", conditionCodes[conditionCode]);
#endif /* AVMPLUS_VERBOSE */
}
#ifdef AVMPLUS_MIR
bool CodegenMIR::canImmFold(OP *ins, OP *imm) const
{
bool can = false;
return can;
}
void CodegenMIR::emitNativeThunk(NativeMethod *info)
{
SET_CONDITION_CODE(AL);
// Hack to see what instructions we're generating
//verbose = true;
const Register TEMP = R7;
const Register AP = R6;
const Register ARGC = R5;
#ifdef DEBUGGER
const Register ENV = R4;
const Register SAVE0 = R5;
const Register SAVE1 = R6;
const int NonVolatileMask = R4_mask | R5_mask | R6_mask | R7_mask;
const int NonVolatileCount = 4;
#else
const int NonVolatileMask = R5_mask | R6_mask | R7_mask;
const int NonVolatileCount = 3;
#endif
if (!pool)
core->console << "no pool " << info << "\n";
code = getMDBuffer(pool);
mip = (MDInstruction*)code;
if (!code)
{
overflow = true;
return;
}
#ifdef FEATURE_BUFFER_GUARD
GrowthGuard guard(pool->codeBuffer);
#else
if (!ensureMDBufferCapacity(pool, md_native_thunk_size))
return;
#endif /* FEATURE_BUFFER_GUARD */
int in_arg_offset = 0;
const int kMaxGPRIndex = 3;
#ifdef DEBUGGER
uint32 *sendEnterAddr = mip;
*mip++ = ENVADDR(MethodEnv::sendEnter);
uint32 *sendExitAddr = mip;
*mip++ = ENVADDR(MethodEnv::sendExit);
#endif
union {
int handler_addr;
NativeMethod::Handler handler;
};
handler = info->m_handler;
uint32 *handlerAddr = mip;
*mip++ = handler_addr;
// scan for double optional arguments; these will
// be constants stored up front
uint32 *const_ip = mip;
int first_optional = 1+info->param_count-info->optional_count;
for (int i=first_optional; i <= info->param_count; i++)
{
Traits* type = info->paramTraits(i);
Atom arg = info->getDefaultValue(i-first_optional);
if (type == OBJECT_TYPE || type == VOID_TYPE)
{
*mip++ = arg;
}
else if (type == BOOLEAN_TYPE)
{
*mip++ = (arg>>3);
}
else if (type == NUMBER_TYPE)
{
double d = core->number_d(arg);
int *dp = (int*)&d;
*mip++ = dp[0];
*mip++ = dp[1];
}
else if (type == INT_TYPE)
{
Atom arg = info->getDefaultValue(i-first_optional);
int i = core->integer_i(arg);
*mip++ = i;
}
else if (type == UINT_TYPE)
{
Atom arg = info->getDefaultValue(i-first_optional);
uint32 u = core->integer_u(arg);
*mip++ = u;
}
else
{
// push pointer type
// this case includes kStringType, kObjectType, and kNamespaceType
int p = (arg&7)==kSpecialType ? 0 : arg & ~7;
*mip++ = p;
}
}
mipStart = mip;
// prologue
MOV (IP, SP);
// save callee-saved registers
STMFD_bang (SP, NonVolatileMask | FP_mask | IP_mask | LR_mask | PC_mask);
SUB_imm8 (FP, IP, 4);
// the frame size will be updated later
uint32 *patch_frame_size = mip;
SUB_imm8 (SP, SP, 0);
// set up other registers
MOV (AP, R2);
MOV (ARGC, R1);
#ifdef DEBUGGER
MOV (ENV, R0);
#endif
#ifdef DEBUGGER
//MOV (R0, ENV);
//MOV (R1, ARGC);
//MOV (R2, AP);
LDR (IP, (int)sendEnterAddr-(int)mip-8, PC);
MOV (LR, PC);
MOV (PC, IP);
//thincall(ENVADDR(MethodEnv::sendEnter));
#endif
// Push receiver object as first argument
#ifdef NATIVE_GLOBAL_FUNCTION_HACK
// hack - native toplevel functions get invoked with user defined receiver
// but are expecting the global object. this hack is totally unsound
// because it gives users the power to crash the vm. we need to either
// directly support toplevel native functions, or not use them.
LDR (R0, 0, AP); // this is ap[0]
BIC_imm (R0, R0, 7);
#else
LDR (R0, 0, AP); // this is ap[0]
#endif
in_arg_offset += 4;
int GPRIndex = 1;
bool need_rest = ((info->flags & AbstractFunction::NEED_REST) != 0);
if (info->flags & AbstractFunction::NATIVE_COOKIE)
{
MOV_imm8 (R1, info->m_cookie);
GPRIndex++;
}
// push args left to right
for (int i=1; i <= info->param_count; i++)
{
// param 0 is receiver, real params start at 1
Traits* type = info->paramTraits(i);
if (i >= first_optional) {
// emit code to check whether argument
// was specified
CMP_imm8 (ARGC, i);
SET_CONDITION_CODE(LT);
// emit code to push the default value
Atom arg = info->getDefaultValue(i-first_optional);
// the arguments have already been coerced to the right type
// by the caller. We do not do type conversions here.
if (type == NUMBER_TYPE)
{
int offset = (int)const_ip - (int)mip;
// Do first word of double
if (GPRIndex < kMaxGPRIndex) {
LDR ((Register)(R0+GPRIndex), offset, PC);
} else {
LDR (TEMP, offset, PC);
STR (TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
// Do second word of double
if ((GPRIndex+1) < kMaxGPRIndex) {
LDR ((Register)(R0+GPRIndex+1), offset, PC);
} else {
LDR (TEMP, offset+4, PC);
STR (TEMP, (GPRIndex+1-kMaxGPRIndex)*4, SP);
}
const_ip += 2;
}
else
{
int offset = (int)const_ip - (int)mip;
if (GPRIndex < kMaxGPRIndex) {
LDR ((Register)(R0+GPRIndex), offset, PC);
} else {
LDR (TEMP, offset, PC);
STR (TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
const_ip++;
}
SET_CONDITION_CODE(GE);
}
// Generate the code for the non-optional case.
// these args will already be converted to native form by the caller
if (type == NUMBER_TYPE)
{
// Copy first word of double
if (GPRIndex < kMaxGPRIndex) {
LDR((Register)(R0+GPRIndex), in_arg_offset, AP);
} else {
LDR(TEMP, in_arg_offset, AP);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
GPRIndex++;
in_arg_offset += 4;
// Copy second word of double
if (GPRIndex < kMaxGPRIndex) {
LDR((Register)(R0+GPRIndex), in_arg_offset, AP);
} else {
LDR(TEMP, in_arg_offset, AP);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
GPRIndex++;
in_arg_offset += 4;
}
else
{
// push general type
// this case includes everything except Number/double
if (GPRIndex < kMaxGPRIndex) {
LDR((Register)(R0+GPRIndex), in_arg_offset, AP);
} else {
LDR(TEMP, in_arg_offset, AP);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
in_arg_offset += 4;
GPRIndex++;
}
SET_CONDITION_CODE(AL);
}
if (need_rest) {
// If the method signature ends with "...",
// deliver any arguments after the explicitly
// specified ones as (Atom *argv, int argc)
// rest_count = argc-param_count
CMP_imm8 (ARGC, info->param_count);
SET_CONDITION_CODE (LT);
// rest_count<0, push argc=0, argv=NULL
// push argc
if (GPRIndex < kMaxGPRIndex) {
MOV_imm8((Register)(R0+GPRIndex), 0);
} else {
MOV_imm8(TEMP, 0);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
// push argv
if ((GPRIndex+1) < kMaxGPRIndex) {
MOV_imm8((Register)(R0+GPRIndex+1), 0);
} else {
MOV_imm8(TEMP, 0);
STR(TEMP, (GPRIndex+1-kMaxGPRIndex)*4, SP);
}
SET_CONDITION_CODE(GE);
// rest_count>=0
// push rest_count
// push rest_argv = argv+param_count
// push argv
if (GPRIndex < kMaxGPRIndex) {
ADD_imm8((Register)(R0+GPRIndex), AP, info->restOffset);
} else {
ADD_imm8(TEMP, AP, info->restOffset);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
GPRIndex++;
// push argc
if (GPRIndex < kMaxGPRIndex) {
SUB_imm8((Register)(R0+GPRIndex), ARGC, info->param_count);
} else {
SUB_imm8(TEMP, ARGC, info->param_count);
STR(TEMP, (GPRIndex-kMaxGPRIndex)*4, SP);
}
GPRIndex++;
SET_CONDITION_CODE(AL);
}
// all args have been pushed, now call function using thiscall calling conventions
Traits* type = info->returnTraits();
LDR (IP, (int)handlerAddr-(int)mip-8, PC);
MOV (LR, PC);
MOV (PC, IP);
//thincall(handler_addr);
#ifdef DEBUGGER
if (type == NUMBER_TYPE)
{
// result is in R0, R1. Store in nonvolatile while
// we call sendExit.
MOV (SAVE0, R0);
MOV (SAVE1, R1);
}
else
{
// result is in R0. Store in nonvolatile while we
// call sendExit.
MOV (SAVE0, R0);
}
MOV (R0, ENV);
LDR (IP, (int)sendExitAddr-(int)mip-8, PC);
MOV (LR, PC);
MOV (PC, IP);
//thincall(ENVADDR(MethodEnv::sendExit));
if (type == NUMBER_TYPE)
{
MOV (R0, SAVE0);
MOV (R1, SAVE1);
}
else
{
MOV (R0, SAVE0);
}
#endif
if (type != NUMBER_TYPE)
{
// result in R3
if (type == BOOLEAN_TYPE)
{
// return value already in R3
// bool is just a byte, so mask it off
AND_imm8 (R0, R0, 255);
}
else if (type == VOID_TYPE)
{
MOV_imm8 (R0, undefinedAtom);
}
}
// else, result in FPU register F1
// epilogue
SUB_imm8 (SP, FP, 12 + NonVolatileCount * 4);
LDMFD (SP, NonVolatileMask | FP_mask | SP_mask | PC_mask);
// Patch up the frame size.
// For each arg, we need 4 bytes in the called parameter
// area. We also leave a little cushion in the called
// parameter area, since there are a few other function
// calls the thunk makes (intToAtom, doubleToAtom)
if (GPRIndex > kMaxGPRIndex)
{
int frameSize = (GPRIndex-kMaxGPRIndex)*4;
*patch_frame_size |= (frameSize & 0xFF);
}
bindMethod(info);
}
void* CodegenMIR::emitImtThunk(ImtBuilder::ImtEntry *e)
{
SET_CONDITION_CODE(AL);
mip = mipStart = (MDInstruction*)getMDBuffer(pool);
#ifdef FEATURE_BUFFER_GUARD
GrowthGuard guard(pool->codeBuffer);
#else
if (!ensureMDBufferCapacity(pool, md_native_thunk_size))
return NULL;
#endif /* FEATURE_BUFFER_GUARD */
// the generated thunk does not call any helper methods, so we are
// free to use eax, ecx, edx as scratch regs without touchning the
// stack.
// in: R3 = iid
// R0 = MethodEnv
// R1 = argc
// R2 = ap
// 0(ap) = ScriptObject (concrete instance of class)
// local register allocation:
// R4 = iid parameter
// R5 = vtable of receiver obj
// R6 = temp
#ifdef AVMPLUS_VERBOSE
if (pool->verbose)
{
core->console << "imt thunk\n";
}
#endif
LDR (IP, 0, R2); // obj
LDR (IP, offsetof(ScriptObject, vtable), IP); // vtable
AvmAssert(e->next != NULL); // must have 2 or more entries
while (e->next)
{
ImtBuilder::ImtEntry *next = e->next;
#ifdef AVMPLUS_VERBOSE
if (pool->verbose)
{
core->console << " disp_id="<< e->disp_id << " " << e->virt << "\n";
}
#endif
int iid = e->virt->iid();
CMP_imm8 (R3, iid);
#if 0
// todo
if (isUIMM(iid))
{
CMP (R3, iid);
}
else
{
//LI32(R0, iid);
//CMP (R3, R0);
}
#endif
SET_CONDITION_CODE(EQ);
LDR (IP, offsetof(VTable,methods)+4*e->disp_id, IP); // load concrete env
LDR (IP, offsetof(MethodEnv, impl32), IP); // invoke real method indirectly
MOV (PC, IP);
SET_CONDITION_CODE(AL);
pool->core->gc->Free(e);
e = next;
}
// last one is unconditional
#ifdef AVMPLUS_VERBOSE
if (pool->verbose)
{
core->console << " disp_id="<< e->disp_id << " " << e->virt << "\n";
}
#endif
LDR (IP, offsetof(VTable,methods)+4*e->disp_id, IP); // load concrete env
LDR (IP, offsetof(MethodEnv, impl32), IP); // invoke real method indirectly
MOV (PC, IP);
MDInstruction *retval;
retval = mipStart;
// lock in the next available location in the buffer (16B aligned)
pool->codeBuffer->setPos((byte*) ( (size_t)mip+15 & ~15 ));
return retval;
}
#endif /* AVMPLUS_MIR */
#endif /* AVMPLUS_ARM */
}

View File

@@ -1,207 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_ArmAssembler__
#define __avmplus_ArmAssembler__
namespace avmplus
{
class ArmAssembler
{
public:
/* ARM registers */
typedef enum
{
R0 = 0,
R1 = 1,
R2 = 2,
R3 = 3,
R4 = 4,
R5 = 5,
R6 = 6,
R7 = 7,
R8 = 8,
R9 = 9,
R10 = 10,
FP = 11,
IP = 12,
SP = 13,
LR = 14,
PC = 15,
// Pseudo-register for floating point
F0 = 0,
Unknown = -1
}
Register;
/* ARM registers */
typedef enum
{
R0_mask = (1<<0),
R1_mask = (1<<1),
R2_mask = (1<<2),
R3_mask = (1<<3),
R4_mask = (1<<4),
R5_mask = (1<<5),
R6_mask = (1<<6),
R7_mask = (1<<7),
R8_mask = (1<<8),
R9_mask = (1<<9),
R10_mask = (1<<10),
FP_mask = (1<<11),
IP_mask = (1<<12),
SP_mask = (1<<13),
LR_mask = (1<<14),
PC_mask = (1<<15)
}
RegisterMask;
/* ARM condition codes */
typedef enum
{
EQ = 0x0, // Equal
NE = 0x1, // Not Equal
CS = 0x2, // Carry Set (or HS)
CC = 0x3, // Carry Clear (or LO)
MI = 0x4, // MInus
PL = 0x5, // PLus
VS = 0x6, // oVerflow Set
VC = 0x7, // oVerflow Clear
HI = 0x8, // HIgher
LS = 0x9, // Lower or Same
GE = 0xA, // Greater or Equal
LT = 0xB, // Less Than
GT = 0xC, // Greater Than
LE = 0xD, // Less or Equal
AL = 0xE, // ALways
NV = 0xF // NeVer
}
ConditionCode;
/* --- Data Processing Instructions --- */
/* Values for operator "a" */
typedef enum
{
AND_op = 0x0, // Boolean And Rd = Rn AND Op2
EOR_op = 0x1, // Boolean Eor Rd = Rn EOR Op2
SUB_op = 0x2, // Subtract Rd = Rn - Op2
RSB_op = 0x3, // Reverse Subtract Rd = Op2 - Rn
ADD_op = 0x4, // Addition Rd = Rn + Op2
ADC_op = 0x5, // Add with Carry Rd = Rn + Op2 + C
SBC_op = 0x6, // Subtract with Carry Rd = Rn - Op2 - (1-C)
RSC_op = 0x7, // Reverse Subtract with Carry Rd - Op2 - Rn - (1-C)
TST_op = 0x8, // Test bit Rn AND Op2
TEQ_op = 0x9, // Test equality Rn EOR Op2
CMP_op = 0xA, // Compare Rn - Op2
CMN_op = 0xB, // Compare Negative Rn + Op2
ORR_op = 0xC, // Boolean Or Rd = Rn OR Op2
MOV_op = 0xD, // Move value Rd = Op2
BIC_op = 0xE, // Bit Clear Rd = Rn AND NOT Op2
MVN_op = 0xF // Move Not Rd = NOT Op2
}
Operator;
/* Values for operand "t" */
typedef enum
{
LSL_imm = 0, // LSL #c - Logical Shift Left
LSL_reg = 1, // LSL Rc - Logical Shift Left
LSR_imm = 2, // LSR #c - Logical Shift Right
LSR_reg = 3, // LSR Rc - Logical Shift Right
ASR_imm = 4, // ASR #c - Arithmetic Shift Right
ASR_reg = 5, // ASR Rc - Arithmetic Shift Right
ROR_imm = 6, // Rotate Right (c != 0)
RRX = 6, // Rotate Right one bit with extend (c == 0)
ROR_reg = 7 // Rotate Right
}
ShiftOperator;
typedef uint32 MDInstruction;
/* Instruction pointer */
MDInstruction *mip;
MDInstruction *mipStart;
int mInstructionCount; // number of machine instructions
#define incInstructionCount() mInstructionCount++
/* Current condition code */
ConditionCode conditionCode;
ArmAssembler();
void SET_CONDITION_CODE(ConditionCode conditionCode);
void MOV(Register dst, Register src);
void STMFD_bang(Register dst, int mask);
void SUB_imm8(Register dst, Register src, int imm8);
void RSB_imm8(Register dst, Register src, int imm8);
void B(int offset24);
void BL(int offset24);
void LDR(Register dst, int offset, Register base);
void BIC_imm8(Register dst, Register src, int imm8);
void MOV_imm8(Register dst, int imm8);
void CMP_imm8(Register src, int imm8);
void ADD(Register dst, Register src1, Register src2);
void SUB(Register dst, Register src1, Register src2);
void AND(Register dst, Register src1, Register src2);
void OR(Register dst, Register src1, Register src2);
void XOR(Register dst, Register src1, Register src2);
void MUL(Register dst, Register src1, Register src2);
void CMP(Register Rn, Register Rm);
void LSL(Register dst, Register src, Register rShift);
void LSR(Register dst, Register src, Register rShift);
void ASR(Register dst, Register src, Register rShift);
void STR(Register src, int offset, Register base);
void ADD_imm8(Register dst, Register src, int imm8);
void AND_imm8(Register dst, Register src, int imm8);
void LDMFD(Register src, int mask);
// Cheeseball way of doing imm32.
void MOV_imm32(Register dst, int imm32);
// Set if verbose output desired
#ifdef AVMPLUS_VERBOSE
bool verboseFlag;
#endif
PrintWriter *console;
static const char* regNames[];
#define gpregNames regNames
static const char* conditionCodes[];
};
}
#endif /* __avmplus_ArmAssembler__ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
namespace NativeID {
#include "builtin.cpp"
}
}

View File

@@ -1,58 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
ScriptEnv* AbcEnv::getScriptEnv(Stringp name, Namespacep ns)
{
if(ns->isPrivate())
{
return (ScriptEnv*)privateScriptEnvs.get(name, ns);
}
else
{
return (ScriptEnv*)domainEnv->getScriptInit(ns, name);
}
}
ScriptEnv* AbcEnv::getScriptEnv(Multiname *multiname)
{
ScriptEnv *se = (ScriptEnv*)domainEnv->getScriptInit(multiname);
if(!se)
{
// check privates
se = (ScriptEnv*)privateScriptEnvs.getMulti(multiname);
}
return se;
}
}

View File

@@ -1,78 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AbcEnv__
#define __avmplus_AbcEnv__
namespace avmplus
{
// runtime info associated with a pool
class AbcEnv : public MMgc::GCObject
{
public:
PoolObject* const pool;
DomainEnv* const domainEnv;
CodeContext* const codeContext;
MultinameHashtable privateScriptEnvs;
MethodEnv* methods[1]; // actual size will hold pool->methodCount methods
AbcEnv(PoolObject* pool,
DomainEnv* domainEnv,
CodeContext *codeContext)
: pool(pool),
domainEnv(domainEnv),
codeContext(codeContext)
{
}
void setMethod(int i, MethodEnv* env)
{
WB(pool->core->gc, this, &methods[i], env);
}
static size_t calcExtra(PoolObject* pool)
{
if (pool->methodCount <= 1)
return 0;
else
return sizeof(MethodEnv*)*(pool->methodCount-1);
}
ScriptEnv* getScriptEnv(Stringp name, Namespacep ns);
ScriptEnv* getScriptEnv(Multiname *m);
};
}
#endif // __avmplus_AbcEnv__

View File

@@ -1,84 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
void AbcGen::writeInt(unsigned int v)
{
if( v < 128 )
{
bytes.add((byte)v);
}
else if ( v < 16384 )
{
byte first = (byte)((v & 0x7F) | 0x80);
byte second = (byte)(v>>7);
bytes.add(first);
bytes.add(second);
}
else if ( v < 2097152 )
{
byte first = (byte)((v & 0x7F) | 0x80);
byte second = (byte)(v>>7 | 0x80);
byte third = (byte)(v>>14);
bytes.add(first);
bytes.add(second);
bytes.add(third);
}
else if ( v < 268435456 )
{
byte first = (byte)((v & 0x7F) | 0x80);
byte second = (byte)(v>>7 | 0x80);
byte third = (byte)(v>>14 | 0x80);
byte fourth = (byte) ( v >>21 );
bytes.add(first);
bytes.add(second);
bytes.add(third);
bytes.add(fourth);
}
else
{
byte first = (byte)((v & 0x7F) | 0x80);
byte second = (byte)(v>>7 | 0x80);
byte third = (byte)(v>>14 | 0x80);
byte fourth = (byte) (v >>21 | 0x80);
byte fifth = (byte) (v >> 28);
bytes.add(first);
bytes.add(second);
bytes.add(third);
bytes.add(fourth);
bytes.add(fifth);
}
}
}

View File

@@ -1,74 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AbcGen__
#define __avmplus_AbcGen__
namespace avmplus
{
class AbcGen
{
public:
/**
* construct an abc code gen buffer with the given initial capacity
*/
AbcGen(MMgc::GC *gc, int initCapacity=128) : bytes(gc, initCapacity) {}
List<byte,LIST_NonGCObjects>& getBytes() { return bytes; }
void construct_super() { bytes.add(OP_constructsuper); }
void pushnan() { bytes.add(OP_pushnan); }
void pushundefined() { bytes.add(OP_pushundefined); }
void pushnull() { bytes.add(OP_pushnull); }
void pushtrue() { bytes.add(OP_pushtrue); }
void pushconstant(CPoolKind kind, int index)
{
// AbcParser should already ensure kind is legal value.
AvmAssert(kind >=0 && kind <= CONSTANT_StaticProtectedNs && kindToPushOp[kind] != 0);
int op = kindToPushOp[kind];
bytes.add((byte)op);
if(opOperandCount[op] > 0)
writeInt(index);
}
void getlocalN(int N) { bytes.add((byte)(OP_getlocal0+N)); }
void setslot(int slot) { bytes.add(OP_setslot); writeInt(slot+1); }
void abs_jump(const byte *pc, int code_length) { bytes.add(OP_abs_jump); writeInt((unsigned int)pc); writeInt(code_length); }
void returnvoid() { bytes.add(OP_returnvoid); }
void writeBytes(List<byte,LIST_NonGCObjects>& b) { bytes.add(b); }
void writeInt(unsigned int n);
size_t size() { return bytes.size(); }
private:
List<byte, LIST_NonGCObjects> bytes;
};
}
#endif // __avmplus_MethodEnv__

File diff suppressed because it is too large Load Diff

View File

@@ -1,219 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AbcParser__
#define __avmplus_AbcParser__
namespace avmplus
{
/**
* Parser for reading .abc (Actionscript Byte Code) files.
*/
class AbcParser
{
public:
AbcParser(AvmCore* core, ScriptBuffer code,
Toplevel* toplevel,
Domain* domain,
AbstractFunction *nativeMethods[],
NativeClassInfo *nativeClasses[],
NativeScriptInfo *nativeScripts[]);
~AbcParser();
/**
* parse an .abc file
* @param code
* @return
*/
static PoolObject* decodeAbc(AvmCore* core, ScriptBuffer code,
Toplevel* toplevel,
Domain* domain,
AbstractFunction *nativeMethods[],
NativeClassInfo *nativeClasses[],
NativeScriptInfo *nativeScripts[]);
protected:
PoolObject* parse();
AbstractFunction* resolveMethodInfo(uint32 index) const;
#ifdef AVMPLUS_VERBOSE
void parseTypeName(const byte* &p, Multiname& m) const;
#endif
Namespace* parseNsRef(const byte* &pc) const;
Stringp resolveUtf8(uint32 index) const;
Stringp parseName(const byte* &pc) const;
Atom resolveQName(const byte* &pc, Multiname &m) const;
int computeInstanceSize(int class_id, Traits* base) const;
void parseMethodInfos();
void parseMetadataInfos();
bool parseInstanceInfos();
void parseClassInfos();
bool parseScriptInfos();
void parseMethodBodies();
void parseCpool();
Traits* parseTraits(Traits* base, Namespace* ns, Stringp name, AbstractFunction* script, int interfaceDelta, Namespace* protectedNamespace = NULL);
/**
* add script to VM-wide table
*/
void addNamedScript(Namespace* ns, Stringp name, AbstractFunction* script);
/**
* Adds traits to the VM-wide traits table, for types
* that can be accessed from multiple abc's.
* @param name The name of the class
* @param ns The namespace of the class
* @param itraits The instance traits of the class
*/
void addNamedTraits(Namespace* ns, Stringp name, Traits* itraits);
sint64 readS64(const byte* &p) const
{
#ifdef SAFE_PARSE
// check to see if we are trying to read past the file end.
if (p < abcStart || p+7 >= abcEnd )
toplevel->verifyErrorClass()->throwError(kCorruptABCError);
#endif //SAFE_PARSE
unsigned first = p[0] | p[1]<<8 | p[2]<<16 | p[3]<<24;
unsigned second = p[4] | p[5]<<8 | p[6]<<16 | p[7]<<24;
p += 8;
return first | ((sint64)second)<<32;
}
/**
* Reads in 2 bytes and turns them into a 16 bit number. Always reads in 2 bytes. Currently
* only used for version number of the ABC file and for version 11 support.
*/
int readU16(const byte* p) const
{
#ifdef SAFE_PARSE
if (p < abcStart || p+1 >= abcEnd)
toplevel->verifyErrorClass()->throwError(kCorruptABCError);
#endif //SAFE_PARSE
return p[0] | p[1]<<8;
}
/**
* Read in a 32 bit number that is encoded with a variable number of bytes. The value can
* take up 1-5 bytes depending on its value. 0-127 takes 1 byte, 128-16383 takes 2 bytes, etc.
* The scheme is that if the current byte has the high bit set, then the following byte is also
* part of the value.
*
* Returns the value, and the 2nd argument is set to the number of bytes that were read to get that
* value.
*/
int readS32(const byte *&p) const
{
#ifdef SAFE_PARSE
// We have added kBufferPadding bytes to the end of the main swf buffer.
// Why? Here we can read from 1 to 5 bytes. If we were to
// put the required safety checks at each byte read, we would slow
// parsing of the file down. With this buffer, only one check at the
// top of this function is necessary. (we will read on into our own memory)
if ( p < abcStart || p >= abcEnd )
toplevel->verifyErrorClass()->throwError(kCorruptABCError);
#endif //SAFE_PARSE
int result = p[0];
if (!(result & 0x00000080))
{
p++;
return result;
}
result = (result & 0x0000007f) | p[1]<<7;
if (!(result & 0x00004000))
{
p += 2;
return result;
}
result = (result & 0x00003fff) | p[2]<<14;
if (!(result & 0x00200000))
{
p += 3;
return result;
}
result = (result & 0x001fffff) | p[3]<<21;
if (!(result & 0x10000000))
{
p += 4;
return result;
}
result = (result & 0x0fffffff) | p[4]<<28;
p += 5;
return result;
}
unsigned int readU30(const byte *&p) const
{
#ifdef SAFE_PARSE
// We have added kBufferPadding bytes to the end of the main swf buffer.
// Why? Here we can read from 1 to 5 bytes. If we were to
// put the required safety checks at each byte read, we would slow
// parsing of the file down. With this buffer, only one check at the
// top of this function is necessary. (we will read on into our own memory)
if ( p < abcStart || p >= abcEnd )
toplevel->verifyErrorClass()->throwError(kCorruptABCError);
#endif //SAFE_PARSE
return toplevel->readU30(p);
}
private:
Toplevel* const toplevel;
Domain* const domain;
AvmCore* core;
ScriptBuffer code;
int version;
PoolObject* pool;
const byte* pos;
AbstractFunction **nativeMethods;
NativeClassInfo **nativeClasses;
NativeScriptInfo **nativeScripts;
int classCount;
List<Traits*, LIST_GCObjects> instances;
byte* abcStart;
byte* abcEnd; // one past the end, actually
Stringp* metaNames;
Stringp kNeedsDxns;
#ifdef AVMPLUS_VERBOSE
Stringp kVerboseVerify;
#endif
#ifdef FEATURE_BUFFER_GUARD // no Carbon
BufferGuard *guard;
#endif
};
}
#endif // __avmplus_AbcParser__

View File

@@ -1,433 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
using namespace MMgc;
AbstractFunction::AbstractFunction()
{
this->flags = 0;
this->method_id = -1;
}
void AbstractFunction::initParamTypes(int count)
{
MMGC_MEM_TYPE(this);
m_types = (Traits**)core()->gc->Calloc(count, sizeof(Traits*), GC::kContainsPointers|GC::kZero);
}
void AbstractFunction::initDefaultValues(int count)
{
MMGC_MEM_TYPE(this);
m_values = (Atom*)core()->gc->Calloc(count, sizeof(Atom), GC::kContainsPointers|GC::kZero);
}
void AbstractFunction::setParamType(int index, Traits* t)
{
AvmAssert(index >= 0 && index <= param_count);
WB(core()->gc, m_types, &m_types[index], t);
}
void AbstractFunction::setDefaultValue(int index, Atom value)
{
AvmAssert(index > (param_count-optional_count) && index <= param_count);
int i = index-(param_count-optional_count)-1;
AvmAssert(i >= 0 && i < optional_count);
WBATOM(core()->gc, m_values, &m_values[i], value);
}
#ifdef AVMPLUS_VERBOSE
Stringp AbstractFunction::format(AvmCore* core) const
{
return core->concatStrings(name ? (Stringp)name : core->newString("?"),
core->newString("()"));
}
#endif //AVMPLUS_VERBOSE
bool AbstractFunction::makeMethodOf(Traits* traits)
{
if (!m_types[0])
{
declaringTraits = traits;
setParamType(0, traits);
flags |= NEED_CLOSURE;
if (traits->final)
{
// all methods of a final class are final
flags |= FINAL;
}
return true;
}
else
{
#ifdef AVMPLUS_VERBOSE
if (pool->verbose)
core()->console << "WARNING: method " << this << " was already bound to " << declaringTraits << "\n";
#endif
return false;
}
}
void AbstractFunction::makeIntoPrototypeFunction(const Toplevel* toplevel)
{
if (declaringTraits == NULL)
{
// make sure param & return types are fully resolved.
// this does not set the verified flag, so real verification will
// still happen before the function runs the first time.
resolveSignature(toplevel);
// ftraits = new traits, extends function
// this->declaringTraits = ftraits
// ftraits->call = this
// ftraits->construct = create object, call this(), return obj or result
AvmCore* core = this->core();
int functionSlotCount = core->traits.function_itraits->slotCount;
int functionMethodCount = core->traits.function_itraits->methodCount;
// type of F is synthetic subclass of Function, with a unique
// [[call]] property and a unique scope
Traits* ftraits = core->newTraits(core->traits.function_itraits, 1, 1,
sizeof(ClassClosure));
ftraits->slotCount = functionSlotCount;
ftraits->methodCount = functionMethodCount;
ftraits->pool = pool;
ftraits->final = true;
ftraits->needsHashtable = true;
ftraits->itraits = core->traits.object_itraits;
this->declaringTraits = ftraits;
ftraits->ns = core->publicNamespace;
#ifdef AVMPLUS_VERBOSE
ftraits->name = core->internString(
core->concatStrings(core->newString("Function-"), core->intToString(method_id))
);
#endif
ftraits->hashTableOffset = ftraits->sizeofInstance;
ftraits->setTotalSize(ftraits->hashTableOffset + sizeof(Hashtable));
ftraits->initTables();
AvmAssert(core->traits.function_itraits->linked);
ftraits->linked = true;
#ifdef AVMPLUS_UNCHECKED_HACK
// HACK - compiler should do this, and only to toplevel functions
// that meet the E4 criteria for being an "unchecked function"
// the tests below are too loose
// if all params and return types are Object then make all params optional=undefined
if (param_count == 0)
flags |= IGNORE_REST;
if (!(flags & HAS_OPTIONAL) && param_count > 0)
{
if (m_returnType == NULL)
{
for (int i=1; i <= param_count; i++)
{
if (m_types[i] != NULL)
return;
}
// make this an unchecked function
flags |= HAS_OPTIONAL | IGNORE_REST;
optional_count = param_count;
initDefaultValues(optional_count);
for (int i=1; i <= optional_count; i++)
{
// since the type is object the default value is undefined.
setDefaultValue(i, undefinedAtom);
}
}
}
#endif
}
}
/**
* convert native args to atoms. argc is the number of
* args, not counting the instance which is arg[0]. the
* layout is [instance][arg1..argN]
*/
void AbstractFunction::boxArgs(int argc, va_list ap, Atom* out)
{
// box the typed args, up to param_count
AvmCore* core = this->core();
for (int i=0; i <= argc; i++)
{
if (i <= param_count)
{
Traits* t = paramTraits(i);
AvmAssert(t != VOID_TYPE);
if (t == NUMBER_TYPE)
{
out[i] = core->doubleToAtom(va_arg(ap, double));
}
else if (t == INT_TYPE)
{
out[i] = core->intToAtom(va_arg(ap, int));
}
else if (t == UINT_TYPE)
{
out[i] = core->uintToAtom(va_arg(ap, uint32));
}
else if (t == BOOLEAN_TYPE)
{
out[i] = va_arg(ap, int) ? trueAtom : falseAtom;
}
else if (!t || t == OBJECT_TYPE)
{
out[i] = va_arg(ap, Atom);
}
else
{
// it's a pointer type, possibly null
void* p = va_arg(ap, void*); // unknown pointer
if (t == STRING_TYPE)
{
out[i] = ((Stringp)p)->atom();
}
else if (t == NAMESPACE_TYPE)
{
out[i] = ((Namespace*)p)->atom();
}
else
{
out[i] = ((ScriptObject*)p)->atom();
}
}
}
else
{
out[i] = va_arg(ap, Atom);
}
}
}
void AbstractFunction::resolveSignature(const Toplevel* toplevel)
{
if (!(flags & LINKED))
{
AvmCore* core = this->core();
AvmAssert(info_pos != NULL);
const byte* pos = info_pos;
Traits* t = pool->resolveTypeName(pos, toplevel, /*allowVoid=*/true);
m_returnType = t;
// use va_arg macro to compute the size of the typed argument list.
// va_arg adds padding according to platform calling conventions.
va_list apstart = 0;
va_list ap = apstart;
// param 0 is contextual
t = m_types[0];
if (!t)
{
setParamType(0, OBJECT_TYPE);
va_arg(ap, Atom);
}
else
{
if (t == NUMBER_TYPE)
va_arg(ap, double);
else
va_arg(ap, int);
if (t->isInterface)
flags |= ABSTRACT_METHOD;
}
// param types 1..N come from abc stream
for (int i=1, n=param_count; i <= n; i++)
{
t = pool->resolveTypeName(pos, toplevel);
setParamType(i, t);
if (t == NUMBER_TYPE)
va_arg(ap, double);
else
va_arg(ap, int);
}
restOffset = ((int)ap)-((int)apstart);
AvmCore::readU30(pos); // name_index;
pos++; // skip flags
if (flags & HAS_OPTIONAL)
{
AvmCore::readU30(pos); // optional_count
initDefaultValues(optional_count);
for (int j=0,n=optional_count; j < n; j++)
{
int param = param_count-optional_count+1+j;
int index = AvmCore::readU30(pos);
CPoolKind kind = (CPoolKind)*(pos++);
// check that the default value is legal for the param type
Traits* t = this->paramTraits(param);
AvmAssert(t != VOID_TYPE);
Atom value;
if (t == NULL)
{
value = !index ? undefinedAtom : pool->getDefaultValue(toplevel, index, kind, t);
}
else if (t == OBJECT_TYPE)
{
value = !index ? nullObjectAtom : pool->getDefaultValue(toplevel, index, kind, t);
if (value == undefinedAtom)
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == NUMBER_TYPE)
{
value = !index ? core->kNaN : pool->getDefaultValue(toplevel, index, kind, t);
if (!(AvmCore::isInteger(value)||AvmCore::isDouble(value)))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == BOOLEAN_TYPE)
{
value = !index ? falseAtom : pool->getDefaultValue(toplevel, index, kind, t);
if (!AvmCore::isBoolean(value))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == UINT_TYPE)
{
value = !index ? 0|kIntegerType : pool->getDefaultValue(toplevel, index, kind, t);
if (!AvmCore::isInteger(value) && !AvmCore::isDouble(value))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
double d = AvmCore::number_d(value);
if (d != (uint32)d)
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == INT_TYPE)
{
value = !index ? 0|kIntegerType : pool->getDefaultValue(toplevel, index, kind, t);
if (!AvmCore::isInteger(value) && !AvmCore::isDouble(value))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
double d = AvmCore::number_d(value);
if (d != (int)d)
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == STRING_TYPE)
{
value = !index ? nullStringAtom : pool->getDefaultValue(toplevel, index, kind, t);
if (!(AvmCore::isNull(value) || AvmCore::isString(value)))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else if (t == NAMESPACE_TYPE)
{
value = !index ? nullNsAtom : pool->getDefaultValue(toplevel, index, kind, t);
if (!(AvmCore::isNull(value) || AvmCore::isNamespace(value)))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
else
{
// any other type: only allow null default value
value = !index ? nullObjectAtom : pool->getDefaultValue(toplevel, index, kind, t);
if (!AvmCore::isNull(value))
{
Multiname qname(t->ns, t->name);
toplevel->verifyErrorClass()->throwError(kIllegalDefaultValue, core->toErrorString(&qname));
}
}
setDefaultValue(param, value);
}
}
/*
// Don't need this for anything yet, so no point in wasting time parsing it. Here just so we don't
// forget about it if we add any sections after this one, and need to skip past it.
if( flags & AbstractFunction::HAS_PARAM_NAMES)
{
// AVMPlus doesn't care about the param names, just skip past them
for( int j = 0; j < param_count; ++j )
{
readU30(pos);
}
}
*/
flags |= LINKED;
}
}
#ifdef DEBUGGER
uint32 AbstractFunction::size() const
{
uint32 size = sizeof(AbstractFunction);
size += param_count * 2 * sizeof(Atom);
return size;
}
#endif
}

View File

@@ -1,297 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AbstractFunction__
#define __avmplus_AbstractFunction__
#ifdef verify
#undef verify
#endif
namespace avmplus
{
/**
* AbstractFunction is the base class for all functions that
* can be executed by the VM: Actionscript functions,
* native functions, etc.
*/
class AbstractFunction : public MMgc::GCObject
{
public:
/** @name flags from .abc - limited to a BYTE */
/*@{*/
/** need arguments[0..argc] */
static const int NEED_ARGUMENTS = 0x00000001;
/** need activation object */
static const int NEED_ACTIVATION = 0x00000002;
/** need arguments[param_count+1..argc] */
static const int NEED_REST = 0x00000004;
/** has optional parameters */
static const int HAS_OPTIONAL = 0x00000008;
/** allow extra args, but dont capture them */
static const int IGNORE_REST = 0x00000010;
/** method is native */
static const int NATIVE = 0x00000020;
/** method sets default namespace */
static const int SETS_DXNS = 0x00000040;
/** method has table for parameter names */
static const int HAS_PARAM_NAMES = 0x00000080;
/*@}*/
/** @name internal flags - upper 3 BYTES available */
/*@{*/
static const int OVERRIDE = 0x00010000;
static const int NON_INTERRUPTABLE = 0x00020000;
static const int UNBOX_THIS = 0x00040000;
static const int NEEDS_CODECONTEXT = 0x00080000;
static const int HAS_EXCEPTIONS = 0x00100000;
#ifdef AVMPLUS_VERBOSE
static const int VERBOSE_VERIFY = 0x00200000;
#endif
static const int NEEDS_DXNS = 0x00400000;
static const int VERIFIED = 0x00800000;
#ifdef AVMPLUS_VERIFYALL
static const int VERIFY_PENDING = 0x01000000;
#endif
/** indicates method is final, no overrides allowed */
static const int FINAL = 0x02000000;
/** indicates the function is a method, that pushes the
receiver object onto the scope chain at method entry */
static const int NEED_CLOSURE = 0x04000000;
/** set to indicate that a function has no bytecode body. */
static const int ABSTRACT_METHOD = 0x08000000;
#ifdef AVMPLUS_INTERP
/**
* set to indicate that a function has been compiled
* to native code. In release mode we always compile
* so we don't need the flag.
*/
static const int TURBO = 0x80000000;
/**
* set to indictate that a function has been
* recommended to be interpreted.
*/
static const int SUGGEST_INTERP = 0x40000000;
#endif /* AVMPLUS_INTERP */
/**
* set once the signature types have been resolved and
* override signatures have been checked.
*/
static const int LINKED = 0x20000000;
/*@}*/
/**
* @name NativeMethod flags
* These are used in the NativeMethod subclass
*/
/*@{*/
/** cookie int passed into C++ code */
static const int NATIVE_COOKIE = 0x10000000;
/*@}*/
DWB(Traits*) declaringTraits;
DWB(Traits*) activationTraits;
DWB(PoolObject*) pool;
AvmCore* core() const
{
return pool->core;
}
int iid() const
{
return ((unsigned)this)>>3;
}
bool usesCallerContext() const
{
return pool->isBuiltin && (!(flags & NATIVE) || (flags & NEEDS_CODECONTEXT));
}
// Builtin + non-native functions always need the dxns code emitted
// Builtin + native functions have flags to specify if they need the dxns code
bool usesDefaultXmlNamespace() const
{
return pool->isBuiltin && (!(flags & NATIVE) || (flags & NEEDS_DXNS));
}
/** number of declared parameters including optionals */
int param_count;
/** last optional_count params are optional */
int optional_count;
// offset to first rest arg in native va_list,
// including the instance parameter.
// this is sum(sizeof(paramType(0..N)))
int restOffset;
/** see bitmask defs above */
int flags;
int method_id;
/** pointer to abc MethodInfo record */
const byte* info_pos;
void initParamTypes(int count);
void initDefaultValues(int count);
void resolveSignature(const Toplevel* toplevel);
bool argcOk(int argc)
{
return argc >= param_count-optional_count &&
(argc <= param_count || allowExtraArgs());
}
/**
* invoke this method. args are already coerced. argc
* is the number of arguments AFTER the instance, which
* is arg 0. ap will always have at least the instance.
*/
union {
int (*impl32)(MethodEnv*, int, va_list);
double (*implN)(MethodEnv*, int, va_list);
};
protected:
AbstractFunction();
public:
void setParamType(int index, Traits* t);
void setDefaultValue(int index, Atom defaultValue);
void makeIntoPrototypeFunction(const Toplevel* toplevel);
Traits* paramTraits(int index) const {
AvmAssert(index >= 0 && index <= param_count);
return m_types[index];
}
const Atom* getDefaultValues() const {
return m_values;
}
Atom getDefaultValue(int i) const {
return m_values[i];
}
void setReturnType(Traits* t) {
m_returnType = t;
}
Traits* returnTraits() const {
return m_returnType;
}
int requiredParamCount() const {
return param_count-optional_count;
}
int allowExtraArgs() const {
return isFlagSet(NEED_REST|NEED_ARGUMENTS|IGNORE_REST);
}
int hasMethodBody() const {
return !isFlagSet(ABSTRACT_METHOD);
}
int isFlagSet(int f) const {
return (flags & f);
}
int hasExceptions() const {
return flags & HAS_EXCEPTIONS;
}
int setsDxns() const {
return flags & SETS_DXNS;
}
bool makeMethodOf(Traits* type);
#ifdef AVMPLUS_VERIFYALL
int isVerified() const {
return flags & VERIFIED;
}
virtual void verify(Toplevel* toplevel) = 0;
#endif
void boxArgs(int argc, va_list ap, Atom* out);
protected:
DWB(Traits*) m_returnType;
DWB(Traits**) m_types; // actual length will be 1+param_count
DWB(Atom*) m_values; // default values for any optional params. size = optional_count
#ifdef AVMPLUS_VERBOSE
/** Dummy destructor to avoid warnings */
virtual ~AbstractFunction() {}
public:
virtual Stringp format(AvmCore* core) const;
#endif
#if defined(AVMPLUS_VERBOSE) || defined(DEBUGGER)
public:
DRCWB(Stringp) name;
#endif
#ifdef DEBUGGER
virtual uint32 size() const;
#endif
};
}
#endif /* __avmplus_AbstractFunction__ */

View File

@@ -1,37 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
}

View File

@@ -1,52 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
namespace avmplus
{
/**
* immutable wrapper for a Binding, used for specifying the
* bindings for a property or method.
* Since it's immutable, we can copy by reference.
*/
class Accessor : public MMgc::GCObject
{
public:
Binding get;
Binding set;
Accessor()
{
AvmAssert(get == BIND_NONE && set == BIND_NONE); // make sure memory was cleared
}
};
}

View File

@@ -1,116 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
namespace ActionBlockConstants
{
const unsigned char kindToPushOp[] = {
0,
OP_pushstring, // CONSTANT_Utf8=1
0,
OP_pushint, // CONSTANT_Int=3
OP_pushint, // CONSTANT_UInt=4
OP_pushnamespace, // CONSTANT_PrivateNs=5
OP_pushdouble, // CONSTANT_Double=6
0,
OP_pushnamespace, // CONSTANT_Namespace=8
0,
OP_pushfalse, // CONSTANT_False=10
OP_pushtrue, // CONSTANT_True=11
OP_pushnull, // CONSTANT_Null=12
0,
0,
0,
0,
0,
0,
0,
0,
0,
OP_pushnamespace, //CONSTANT_PackageNamespace=22
OP_pushnamespace, //CONSTANT_PackageInternalNs=23
OP_pushnamespace, //CONSTANT_ProtectedNamespace=24
OP_pushnamespace, //CONSTANT_ExplicitNamespace=25
OP_pushnamespace, //CONSTANT_StaticProtectedNs=26
};
#ifdef AVMPLUS_VERBOSE
const char *constantNames[] = {
"const-0",
"utf8",//const int CONSTANT_Utf8 = 0x01;
"const-2",
"int",//const int CONSTANT_Int = 0x03;
"uint",//const int CONSTANT_UInt = 0x04;
"private",//const int CONSTANT_PrivateNS = 0x05;
"double",//const int CONSTANT_Double = 0x06;
"qname",//const int CONSTANT_Qname = 0x07;
"namespace",//const int CONSTANT_Namespace = 0x08;
"multiname",//const int CONSTANT_Multiname = 0x09;
"false",//const inst CONSTANT_False = 0x0A;
"true",//const int CONSTANT_True = 0x0B;
"null",//const int CONSTANT_Null = 0x0C;
"@qname",//const int CONSTANT_QnameAttr = 0x0D;
"@multiname",//const int CONSTANT_MultinameAttr= 0x0E;
"rtqname",//const int CONSTANT_RTQname = 0x0F; // ns::name, var qname, const name
"@rtqname",//const int CONSTANT_RTQnameA = 0x10; // @ns::name, var qname, const name
"rtqnamelate",//const int CONSTANT_RTQnameL = 0x11; // ns::[], var qname
"@rtqnamelate",//const int CONSTANT_RTQnameLA = 0x12; // @ns::[], var qname
"", //const int CONSTANT_NameL = 0x13, // o.[], ns=public implied, rt name
"", //CONSTANT_NameLA = 0x14, // o.@[], ns=public implied, rt attr-name
"namespaceset", //CONSTANT_NamespaceSet = 0x15
"namespace", //PackageNamespace and Namespace are the same as far as the VM is concerned
"internal",//const int CONSTANT_PackageInternalNS = 0x17
"protected",//const int CONSTANT_ProtectedNamespace = 0x18
"explicit",//const int CONSTANT_ExplicitNamespace = 0x19
"staticprotected",//const int CONSTANT_StaticProtectedNs = 0x1A,
"multinamelate", //const int CONSTANT_MultinameL = 0x1B, // o.[], ns, rt name
"@multinamelate" //CONSTANT_MultinameLA = 0x1C, // o.@[], ns, rt attr-name
};
const char *traitNames[] = {
"slot",//const int TRAIT_Slot = 0x00;
"method",//const int TRAIT_Method = 0x01;
"getter",//const int TRAIT_Getter = 0x02;
"setter",//const int TRAIT_Setter = 0x03;
"class",//const int TRAIT_Class = 0x04;
"function",//const int TRAIT_Function = 0x05;
"const",//const int TRAIT_Const = 0x06;
};
#endif // AVMPLUS_VERBOSE
#include "opcodes.cpp"
}
}

View File

@@ -1,131 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_ActionBlockConstants__
#define __avmplus_ActionBlockConstants__
namespace avmplus
{
/**
* Constants for all of the opcodes in the AVM+ instruction set.
*/
namespace ActionBlockConstants
{
/** @name cpool tags */
/*@{*/
enum CPoolKind {
CONSTANT_Utf8 = 0x01,
CONSTANT_Int = 0x03,
CONSTANT_UInt = 0x04,
CONSTANT_PrivateNs = 0x05, // non-shared namespace
CONSTANT_Double = 0x06,
CONSTANT_Qname = 0x07, // o.ns::name, ct ns, ct name
CONSTANT_Namespace = 0x08,
CONSTANT_Multiname = 0x09, // o.name, ct nsset, ct name
CONSTANT_False = 0x0A,
CONSTANT_True = 0x0B,
CONSTANT_Null = 0x0C,
CONSTANT_QnameA = 0x0D, // o.@ns::name, ct ns, ct attr-name
CONSTANT_MultinameA = 0x0E, // o.@name, ct attr-name
CONSTANT_RTQname = 0x0F, // o.ns::name, rt ns, ct name
CONSTANT_RTQnameA = 0x10, // o.@ns::name, rt ns, ct attr-name
CONSTANT_RTQnameL = 0x11, // o.ns::[name], rt ns, rt name
CONSTANT_RTQnameLA = 0x12, // o.@ns::[name], rt ns, rt attr-name
CONSTANT_NamespaceSet = 0x15,
CONSTANT_PackageNamespace = 0x16,
CONSTANT_PackageInternalNs = 0x17,
CONSTANT_ProtectedNamespace = 0x18,
CONSTANT_ExplicitNamespace = 0x19,
CONSTANT_StaticProtectedNs = 0x1A,
CONSTANT_MultinameL = 0x1B,
CONSTANT_MultinameLA = 0x1C,
};
/*@}*/
/** @name traits kinds */
/*@{*/
enum TraitKind {
TRAIT_Slot = 0x00,
TRAIT_Method = 0x01,
TRAIT_Getter = 0x02,
TRAIT_Setter = 0x03,
TRAIT_Class = 0x04,
TRAIT_Function = 0x05,
TRAIT_Const = 0x06,
};
/*@}*/
/** @name attributes */
/*@{*/
const int ATTR_final = 0x10; // 1=final, 0=virtual
const int ATTR_override = 0x20; // 1=override, 0=new
const int ATTR_metadata = 0x40; // 1=has metadata, 0=no metadata
/*@}*/
/** @name opcodes */
/*@{*/
#include "opcodes.h"
/*@}*/
/**
* The opOperandCount array specifies the number of operands in
* each opcode. It is used by the VM to advance through
* bytecode streams. -1 means invalid opcode.
*/
extern signed char opOperandCount[];
/**
* The opCanThrow array specifies whether an opcode can throw
* exceptions or not.
*/
extern unsigned char opCanThrow[];
#if defined(AVMPLUS_PROFILE) || defined(AVMPLUS_VERBOSE) || defined(DEBUGGER)
extern const char *opNames[];
#endif
extern const unsigned char kindToPushOp[];
#ifdef AVMPLUS_VERBOSE
/** @name debugger string names */
/*@{*/
extern const char *constantNames[];
extern const char *traitNames[];
/*@}*/
#endif
}
}
#endif /* __avmplus_ActionBlockConstants__ */

View File

@@ -1,427 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
package
{
public dynamic class Array extends Object
{
// option flags for sort and sortOn
public static const CASEINSENSITIVE:uint = 1;
public static const DESCENDING:uint = 2;
public static const UNIQUESORT:uint = 4;
public static const RETURNINDEXEDARRAY:uint = 8;
public static const NUMERIC:uint = 16;
// E262 {DontEnum, DontDelete}
public native function get length():uint
public native function set length(newLength:uint)
// Array.length = 1 per ES3
public static const length:int = 1
// ECMA 15.4.2.2
public function Array(...args)
{
var n:uint = args.length
if (n == 1 && (args[0] is Number))
{
var dlen:Number = args[0];
var ulen:uint = dlen
if (ulen != dlen)
Error.throwError( RangeError, 1005 /*kArrayIndexNotIntegerError*/, dlen );
length = ulen;
}
else
{
length = n
for (var i:uint=0; i < n; i++)
this[i] = args[i]
}
}
/**
15.4.4.5 Array.prototype.join (separator)
The elements of the array are converted to strings, and these strings are then concatenated, separated by
occurrences of the separator. If no separator is provided, a single comma is used as the separator.
The join method takes one argument, separator, and performs the following steps:
1. Call the [[Get]] method of this object with argument "length".
2. Call ToUint32(Result(1)).
3. If separator is undefined, let separator be the single-character string ",".
4. Call ToString(separator).
5. If Result(2) is zero, return the empty string.
6. Call the [[Get]] method of this object with argument "0".
7. If Result(6) is undefined or null, use the empty string; otherwise, call ToString(Result(6)).
8. Let R be Result(7).
9. Let k be 1.
10. If k equals Result(2), return R.
11. Let S be a string value produced by concatenating R and Result(4).
12. Call the [[Get]] method of this object with argument ToString(k).
13. If Result(12) is undefined or null, use the empty string; otherwise, call ToString(Result(12)).
14. Let R be a string value produced by concatenating S and Result(13).
15. Increase k by 1.
16. Go to step 10.
*/
private static function _join(o, sep):String
{
var s:String = (sep === undefined) ? "," : String(sep)
var out:String = ""
for (var i:uint = 0, n:uint=uint(o.length); i < n; i++)
{
var x = o[i]
if (x != null)
out += x
if (i+1 < n)
out += s
}
return out
}
AS3 function join(sep=void 0):String
{
return _join(this, sep)
}
prototype.join = function(sep=void 0):String
{
return _join(this, sep)
}
private static native function _pop(o)
AS3 native function pop()
prototype.pop = function()
{
return _pop(this)
}
/**
15.4.4.2 Array.prototype.toString ( )
The result of calling this function is the same as if the built-in join method were invoked for this object with no
argument.
The toString function is not generic; it throws a TypeError exception if its this value is not an Array object.
Therefore, it cannot be transferred to other kinds of objects for use as a method.
*/
prototype.toString = function():String
{
var a:Array = this // TypeError if not compatible
return _join(a, ",");
}
/**
15.4.4.3 Array.prototype.toLocaleString ( )
The elements of the array are converted to strings using their toLocaleString methods, and these strings are
then concatenated, separated by occurrences of a separator string that has been derived in an implementationdefined
locale-specific way. The result of calling this function is intended to be analogous to the result of
toString, except that the result of this function is intended to be locale-specific.
The result is calculated as follows:
1. Call the [[Get]] method of this object with argument "length".
2. Call ToUint32(Result(1)).
3. Let separator be the list-separator string appropriate for the host environments current locale (this is derived in
an implementation-defined way).
4. Call ToString(separator).
5. If Result(2) is zero, return the empty string.
6. Call the [[Get]] method of this object with argument "0".
7. If Result(6) is undefined or null, use the empty string; otherwise, call ToObject(Result(6)).toLocaleString().
8. Let R be Result(7).
9. Let k be 1.
10. If k equals Result(2), return R.
11. Let S be a string value produced by concatenating R and Result(4).
12. Call the [[Get]] method of this object with argument ToString(k).
13. If Result(12) is undefined or null, use the empty string; otherwise, call ToObject(Result(12)).toLocaleString().
14. Let R be a string value produced by concatenating S and Result(13).
15. Increase k by 1.
16. Go to step 10.
The toLocaleString function is not generic; it throws a TypeError exception if its this value is not an Array
object. Therefore, it cannot be transferred to other kinds of objects for use as a method.
*/
prototype.toLocaleString = function():String
{
var a:Array = this // TypeError if not compatible
var out:String = ""
for (var i:uint = 0, n:uint=a.length; i < n; i++)
{
var x = a[i]
if (x != null)
out += x.toLocaleString()
if (i+1 < n)
out += ","
}
return out
}
/**
When the push method is called with zero or more arguments item1, item2, etc., the following steps are taken:
1. Call the [[Get]] method of this object with argument "length".
2. Let n be the result of calling ToUint32(Result(1)).
3. Get the next argument in the argument list; if there are no more arguments, go to step 7.
4. Call the [[Put]] method of this object with arguments ToString(n) and Result(3).
5. Increase n by 1.
6. Go to step 3.
7. Call the [[Put]] method of this object with arguments "length" and n.
8. Return n.
The length property of the push method is 1.
NOTE The push function is intentionally generic; it does not require that its this value be an Array object. Therefore it can be
transferred to other kinds of objects for use as a method. Whether the push function can be applied successfully to a host object
is implementation-dependent.
*/
AS3 native function push(...args):uint
prototype.push = function(...args):uint
{
var n:uint = uint(this.length)
for (var i:uint=0, argc:uint=args.length; i < argc; i++)
this[n++] = args[i]
this.length = n
return n
}
private static native function _reverse(o)
AS3 function reverse():Array
{
return _reverse(this) // return will cast to Array
}
prototype.reverse = function()
{
return _reverse(this)
}
private static native function _concat(o, args:Array):Array
AS3 function concat(...args):Array
{
return _concat(this, args)
}
prototype.concat = function(...args):Array
{
return _concat(this, args)
}
private static native function _shift(o)
AS3 function shift()
{
return _shift(this)
}
prototype.shift = function()
{
return _shift(this)
}
private static native function _slice(o, A:Number, B:Number):Array
AS3 function slice(A=0, B=0xffffffff):Array
{
return _slice(this, Number(A), Number(B))
}
prototype.slice = function(A=0, B=0xffffffff):Array
{
return _slice(this, Number(A), Number(B))
}
/**
15.4.4.13 Array.prototype.unshift ( [ item1 [ , item2 [ , … ] ] ] )
The arguments are prepended to the start of the array, such that their order within the array is the same as the
order in which they appear in the argument list.
When the unshift method is called with zero or more arguments item1, item2, etc., the following steps are taken:
1. Call the [[Get]] method of this object with argument "length".
2. Call ToUint32(Result(1)).
3. Compute the number of arguments.
4. Let k be Result(2).
5. If k is zero, go to step 15.
6. Call ToString(k1).
7. Call ToString(k+Result(3)1).
8. If this object has a property named by Result(6), go to step 9; but if this object has no property named by
Result(6), then go to step 12.
9. Call the [[Get]] method of this object with argument Result(6).
10. Call the [[Put]] method of this object with arguments Result(7) and Result(9).
11. Go to step 13.
12. Call the [[Delete]] method of this object with argument Result(7).
13. Decrease k by 1.
14. Go to step 5.
15. Let k be 0.
16. Get the next argument in the part of the argument list that starts with item1; if there are no more arguments, go
to step 21.
17. Call ToString(k).
18. Call the [[Put]] method of this object with arguments Result(17) and Result(16).
19. Increase k by 1.
20. Go to step 16.
21. Call the [[Put]] method of this object with arguments "length" and (Result(2)+Result(3)).
22. Return (Result(2)+Result(3)).
The length property of the unshift method is 1.
NOTE The unshift function is intentionally generic; it does not require that its this value be an Array object. Therefore it can
be transferred to other kinds of objects for use as a method. Whether the unshift function can be applied successfully to a
host object is implementation-dependent.
*/
native AS3 function unshift(...args):uint
prototype.unshift = function(...args):uint
{
var len:uint = uint(this.length)
var argc:uint = args.length
var k:uint
for (k=len; k > 0; )
{
k--
var d:uint = k+argc
if (k in this)
this[d] = this[k]
else
delete this[d]
}
for (var i:uint = 0; i < argc; i++)
this[k++] = args[i]
len += argc
this.length = len
return len
}
private static native function _splice(o, args:Array):Array
// splice with zero args returns undefined. All other cases return Array.
AS3 function splice(...args)
{
if (!args.length)
return undefined;
return _splice(this, args)
}
prototype.splice = function(...args)
{
if (!args.length)
return undefined;
return _splice(this, args)
}
// sort can return an Array or a Number (unique sort option)
private static native function _sort(o, args:Array)
AS3 function sort(...args)
{
return _sort (this, args);
}
prototype.sort = function(...args)
{
return _sort (this, args);
}
private static native function _sortOn(o, names, options)
AS3 function sortOn(names, options=0, ...ignored)
{
// this is our own addition so we don't have to make names be optional
return _sortOn(this, names, options);
}
prototype.sortOn = function(names, options=0, ...ignored)
{
return _sortOn(this, names, options)
}
// Array extensions that are in Mozilla...
// http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Array
//
// These all work on generic objects (array like objects) as well as arrays
private static native function _indexOf (o, searchElement, fromIndex:int):int;
AS3 function indexOf(searchElement, fromIndex=0):int
{
return _indexOf (this, searchElement, int(fromIndex));
}
prototype.indexOf = function(searchElement, fromIndex=0):int
{
return _indexOf (this, searchElement, int(fromIndex));
}
private static native function _lastIndexOf (o, searchElement, fromIndex:int=0):int;
AS3 function lastIndexOf(searchElement, fromIndex=0x7fffffff):int
{
return _lastIndexOf (this, searchElement, int(fromIndex));
}
prototype.lastIndexOf = function(searchElement, fromIndex=0x7fffffff):int
{
return _lastIndexOf (this, searchElement, int(fromIndex));
}
// Returns true if every element in this array satisfies the provided testing function.
private static native function _every(o, callback:Function, thisObject):Boolean;
AS3 function every(callback:Function, thisObject=null):Boolean
{
return _every (this, callback, thisObject);
}
prototype.every = function(callback:Function, thisObject=null):Boolean
{
return _every (this, callback, thisObject);
}
// Creates a new array with all elements that pass the test implemented by the provided function.
private static native function _filter(o, callback:Function, thisObject):Array;
AS3 function filter(callback:Function, thisObject=null):Array
{
return _filter (this, callback, thisObject);
}
prototype.filter = function(callback:Function, thisObject=null):Array
{
return _filter (this, callback, thisObject);
}
// Calls a function for each element in the array.
private static native function _forEach(o, callback:Function, thisObject):void;
AS3 function forEach(callback:Function, thisObject=null):void
{
_forEach (this, callback, thisObject);
}
prototype.forEach = function(callback:Function, thisObject=null):void
{
_forEach (this, callback, thisObject);
}
// Creates a new array with the results of calling a provided function on every element in this array.
private native static function _map(o, callback:Function, thisObject):Array;
AS3 function map(callback:Function, thisObject=null):Array
{
return _map (this, callback, thisObject);
}
prototype.map = function(callback:Function, thisObject=null):Array
{
return _map (this, callback, thisObject);
}
// Returns true if at least one element in this array satisfies the provided testing function.
private static native function _some(o, callback:Function, thisObject):Boolean;
AS3 function some(callback:Function, thisObject=null):Boolean
{
return _some (this, callback, thisObject);
}
prototype.some = function(callback:Function, thisObject=null):Boolean
{
return _some (this, callback, thisObject);
}
_dontEnumPrototype(prototype);
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,98 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_ArrayClass__
#define __avmplus_ArrayClass__
namespace avmplus
{
/**
* class Array
*/
class ArrayClass : public ClassClosure
{
public:
ArrayClass(VTable* cvtable);
// this = argv[0]
// arg1 = argv[1]
// argN = argv[argc]
Atom call(int argc, Atom* argv)
{
return construct(argc, argv);
}
// create a new array, even when argc=1
ArrayObject* newarray(Atom* argv, int argc);
ArrayObject* newArray(uint32 capacity=0);
// override ScriptObject::createInstance
ArrayObject* createInstance(VTable *ivtable, ScriptObject* prototype);
ArrayObject* concat(Atom thisAtom, ArrayObject* args);
Atom pop(Atom thisAtom);
Atom reverse(Atom thisAtom);
Atom shift(Atom thisAtom);
ArrayObject* slice(Atom thisAtom, double A, double B);
Atom sort(Atom thisAtom, ArrayObject *args);
Atom sortOn(Atom thisAtom, Atom namesAtom, Atom optionsAtom);
ArrayObject* splice(Atom thisAtom, ArrayObject* args);
int indexOf (Atom thisAtom, Atom searchElement, int startIndex);
int lastIndexOf (Atom thisAtom, Atom searchElement, int startIndex);
bool every (Atom thisAtom, ScriptObject *callback, Atom thisObject);
ArrayObject *filter (Atom thisAtom, ScriptObject *callback, Atom thisObject);
void forEach (Atom thisAtom, ScriptObject *callback, Atom thisObject);
bool some (Atom thisAtom, ScriptObject *callback, Atom thisObject);
ArrayObject *map (Atom thisAtom, ScriptObject *callback, Atom thisObject);
DECLARE_NATIVE_MAP(ArrayClass)
uint32 getLengthHelper (ScriptObject *d);
private:
void setLengthHelper (ScriptObject *d, uint32 newLen);
ArrayObject* isArray(Atom instance)
{
if (core()->istype(instance, ivtable()->traits))
return (ArrayObject*)AvmCore::atomToScriptObject(instance);
return NULL;
}
const DRCWB(Stringp) kComma;
};
}
#endif /* __avmplus_ArrayClass__ */

View File

@@ -1,504 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
ArrayObject::ArrayObject(VTable *vtable, ScriptObject* proto, uint32 capacity)
: ScriptObject(vtable, proto, 0),
m_denseArr(capacity)
{
AvmAssert(traits()->sizeofInstance >= sizeof(ArrayObject));
m_length = 0;
m_lowHTentry = NO_LOW_HTENTRY;
}
#if 0 // Test code to determine if our array is a pure dense array
bool ArrayObject::getDense()
{
// If are dense part equals are length and we have no
// atoms in our HT, we are a pure dense array. We can't
// call getTable()->GetSize() since we might have deleted
// atoms in our HT and size would be non-zero.
return (isSimpleDense() && !ScriptObject::nextNameIndex(0));
}
#endif
// This routine checks to see if our dense portion is directly next
// to any entries in our HT. If so, the HT entries are deleted and added
// to the dense portion. If the HT is completely emptied, it is cleared.
void ArrayObject::checkForSparseToDenseConversion()
{
// check for lowHTentry being consumed
if (m_lowHTentry == NO_LOW_HTENTRY)
return;
if (getDenseLength() != m_lowHTentry)
return;
AvmCore *core = this->core();
while (getDenseLength() == m_lowHTentry)
{
AvmAssert (ScriptObject::hasUintProperty (m_lowHTentry));
// Move prop from HT to dense Array. No need to update m_length
Atom lowHT = ScriptObject::getUintProperty (m_lowHTentry);
this->m_denseArr.push (lowHT);
// Delete prop from HT
ScriptObject::delUintProperty (m_lowHTentry);
// If our low entry happened to match our length, we're out of HT entries
// and we can just quit.
if ((m_lowHTentry + 1) == m_length)
{
m_lowHTentry = NO_LOW_HTENTRY;
}
else
{
// Find the next integer HT prop and update m_lowHTentry
// This is tricky. Our HT section could be huge but very sparse
// Do we want to linearly walk from index+1 to m_length or do
// we want to walk the entire HT looking for a low integer value?
if (ScriptObject::hasUintProperty (m_lowHTentry + 1))
{
m_lowHTentry++;
}
else
{
// assume we don't find an entry
m_lowHTentry = NO_LOW_HTENTRY;
int index = ScriptObject::nextNameIndex(0);
while (index)
{
Atom name = ScriptObject::nextName (index);
uint32 nameIndex;
if (core->getIndexFromAtom (name, &nameIndex))
{
if ((m_lowHTentry == NO_LOW_HTENTRY) || (nameIndex < m_lowHTentry))
{
m_lowHTentry = nameIndex;
}
}
index = ScriptObject::nextNameIndex(index);
}
}
}
}
// We're done moving our sparse entries over to our dense part of our array.
// This may have left a large HT that is now completely empty. If ScriptObject::nextNameIndex(0)
// returns 0, we know we have no atoms in our HT and we can clear it.
if (ScriptObject::nextNameIndex (0) == 0)
getTable()->reset();
}
void ArrayObject::setProperty(Atom name, Atom value)
{
if (traits()->needsHashtable)
{
AvmCore *core = this->core();
// Update the array length.
uint32 index;
if (core->getIndexFromAtom (name, &index))
{
return setUintProperty (index, value);
}
if (name == core->klength->atom())
return setLength(core->toUInt32(value));
}
ScriptObject::setProperty(name, value);
}
void ArrayObject::setUintProperty(uint32 index, Atom value)
{
if (traits()->needsHashtable)
{
if (hasDense())
{
if (index == getDenseLength())
{
this->m_denseArr.push (value);
if (m_length < getDenseLength())
m_length = getDenseLength();
checkForSparseToDenseConversion ();
return;
}
else if (index < getDenseLength())
{
this->m_denseArr.setAt (index, value);
return;
}
else
{
// fall through and put the new property into our HT
}
}
// If we're NOT dense yet and setting first element, we can create a dense array
else if (index == 0)
{
m_denseArr.push (value);
if (!m_length)
m_length = 1;
else
checkForSparseToDenseConversion ();
return;
}
if (m_length <= index) {
m_length = index+1;
}
if ((m_lowHTentry == NO_LOW_HTENTRY) || (index < m_lowHTentry))
m_lowHTentry = index;
}
// end if (dynamic)
// If our index value is going to overflow our int atom storage and be
// converted to a string, do that here instead of calling the
// SciptObject::setUintProperty which will call ArrayObject::setProperty
// which will call back into this routine in an infinite loop.
if (index & ScriptObject::MAX_INTEGER_MASK)
ScriptObject::setProperty (core()->internUint32(index)->atom(), value);
else
ScriptObject::setUintProperty(index, value);
}
Atom ArrayObject::getProperty(Atom name) const
{
if (traits()->needsHashtable)
{
AvmCore *core = this->core();
if (hasDense())
{
uint32 index;
if (core->getIndexFromAtom (name, &index))
{
// if we get here, we have a valid integer index.
if ((index < getDenseLength()))
return m_denseArr.getAtFast(index);
}
}
if (name == core->klength->atom())
return core->intToAtom (getLength());
}
return ScriptObject::getProperty (name);
}
Atom ArrayObject::getUintProperty(uint32 index) const
{
if (traits()->needsHashtable)
{
if (hasDense())
{
if ((index < getDenseLength()))
return m_denseArr.getAtFast(index);
}
}
return ScriptObject::getUintProperty (index);
}
Atom ArrayObject::getIntProperty(int index) const
{
if (index >= 0)
return getUintProperty(index);
else // integer is negative - we must intern it
return getProperty(core()->internInt(index));
}
void ArrayObject::setIntProperty(int index, Atom value)
{
if (index >= 0)
setUintProperty(index, value);
else // integer is negative - we must intern it
setProperty(core()->internInt(index), value);
}
// This does NOT affect the length of the array
bool ArrayObject::deleteProperty(Atom name)
{
if (traits()->needsHashtable)
{
if (hasDense())
{
uint32 index;
if (core()->getIndexFromAtom (name, &index))
{
return delUintProperty(index);
}
}
}
return ScriptObject::deleteProperty (name);
}
bool ArrayObject::delUintProperty(uint32 index)
{
// if we get here, we have a valid integer index.
if (traits()->needsHashtable)
{
if ((index < getDenseLength()))
{
if (index == (getDenseLength() - 1))
{
m_denseArr.pop();
}
// We're deleting an element in the middle of our array. The lower
// part can be left in the dense array but the upper part needs to
// get moved to the HT.
else
{
for (uint32 i = index + 1; i < getDenseLength(); i++)
{
ScriptObject::setUintProperty (i, m_denseArr.getAtFast(i));
}
m_denseArr.splice (index, 0, (getDenseLength() - index), 0);
}
return true;
}
}
return ScriptObject::delUintProperty(index);
}
bool ArrayObject::propertyIsEnumerable(Atom name) const
{
if (traits()->needsHashtable)
{
if (hasDense())
{
uint32 index;
if (core()->getIndexFromAtom(name, &index))
{
// {DontEnum} is not supported on the dense portion
// of an array. Those properties are always enumerable.
if (index < getDenseLength())
return true;
}
}
}
return ScriptObject::propertyIsEnumerable(name);
}
bool ArrayObject::hasProperty(Atom name) const
{
if (traits()->needsHashtable)
{
if (hasDense())
{
uint32 index;
if (core()->getIndexFromAtom (name, &index))
{
if (index < getDenseLength())
return true;
}
}
}
return ScriptObject::hasProperty (name);
}
bool ArrayObject::hasUintProperty(uint32 index) const
{
if (traits()->needsHashtable)
{
if (hasDense())
{
if (index < getDenseLength())
return true;
}
}
return ScriptObject::hasUintProperty (index);
}
// Iterator support - for in, for each
Atom ArrayObject::nextName(int index)
{
AvmAssert(index > 0);
int denseLength = (int)getDenseLength();
if (index <= denseLength)
{
AvmCore *core = this->core();
return core->intToAtom(index-1);
}
else
{
return ScriptObject::nextName (index - denseLength);
}
}
Atom ArrayObject::nextValue(int index)
{
AvmAssert(index > 0);
int denseLength = (int) getDenseLength();
if (index <= denseLength)
{
return m_denseArr.getAtFast (index-1);
}
else
{
return ScriptObject::nextValue (index - denseLength);
}
}
int ArrayObject::nextNameIndex(int index)
{
int denseLength = (int) getDenseLength();
if (index < denseLength)
{
return index + 1;
}
else
{
index = ScriptObject::nextNameIndex (index - denseLength);
if (!index)
return index;
return denseLength + index;
}
}
#ifdef AVMPLUS_VERBOSE
Stringp ArrayObject::format(AvmCore* core) const
{
Stringp prefix = core->newString("[]@");
return core->concatStrings(prefix, core->formatAtomPtr(atom()));
}
#endif
void ArrayObject::setLength(uint32 newLength)
{
if (traits()->needsHashtable)
{
// Delete all items between size and newLength
uint32 oldLength = getLength();
if (newLength < oldLength)
{
uint32 deleteStart = newLength;
uint32 denseLength = getDenseLength();
if (newLength < denseLength)
{
this->m_denseArr.splice (deleteStart, 0, (denseLength - deleteStart), 0);
deleteStart = denseLength;
}
for (uint32 i = deleteStart; i < oldLength; i++) {
delUintProperty(i);
}
}
m_length = newLength;
}
// else, if !dynamic ignore set.
}
// public native function pop(...rest):Object
Atom ArrayObject::pop()
{
if (isSimpleDense())
{
if (!m_length)
return undefinedAtom;
m_length--;
return m_denseArr.pop ();
}
if (getLength() != 0)
{
Atom outAtom = getUintProperty(getLength()-1);
setLength(getLength()-1);
return outAtom;
}
else
{
return undefinedAtom;
}
}
uint32 ArrayObject::push(Atom* argv, int argc)
{
if (isSimpleDense())
{
m_denseArr.push (argv, argc);
m_length += argc;
}
else
{
for (int i=0; i < argc; i++) {
setUintProperty(getLength(), argv[i]);
}
}
return m_length;
}
uint32 ArrayObject::unshift(Atom* argv, int argc)
{
if (argc != 0)
{
if (isSimpleDense())
{
m_denseArr.unshift (argv, argc);
m_length += argc;
}
else
{
uint32 i;
// First, move all the elements up
uint32 len = getLength();
for (i=len; i > 0; ) { // note: i is unsigned, can't check if --i >=0.
i--;
setUintProperty(i+argc, getUintProperty(i));
}
for (i=0; i < ((uint32)argc); i++) {
setUintProperty(i, argv[i]);
}
setLength(len+argc);
}
}
return getLength();
}
}

View File

@@ -1,137 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_ArrayObject__
#define __avmplus_ArrayObject__
namespace avmplus
{
/**
* an instance of class Array. constructed with "new Array" or
* an array literal [...]. We need this class to support Array's
* special "get" and "put" semantics and to maintain the virtual
* "length" property.
*/
class ArrayObject : public ScriptObject
{
private:
friend class ArrayClass;
AtomArray m_denseArr;
// We can NOT use 0xFFFFFFFF for this since x[0xFFFFFFFE] is a valid prop
// which would make our length 0xFFFFFFFF
static const uint32 NO_LOW_HTENTRY = 0;
uint32 m_lowHTentry; // lowest numeric entry in our hash table
uint32 m_length;
public:
ArrayObject(VTable* ivtable, ScriptObject *delegate, uint32 capacity);
~ArrayObject()
{
m_lowHTentry = 0;
m_length = 0;
}
bool hasDense() const { return (m_denseArr.getLength() != 0); };
bool isSimpleDense() const { return (m_denseArr.getLength() == m_length); };
uint32 getDenseLength() const { return m_denseArr.getLength(); }
uint32 getLength() const { return (m_length); }
void setLength(uint32 newLength);
Atom getProperty(Stringp name) const { return getProperty(name->atom()); }
void setProperty(Stringp name, Atom value) { setProperty(name->atom(), value); }
bool deleteProperty(Stringp name) { return deleteProperty(name->atom()); }
bool hasProperty(Stringp name) const { return hasProperty(name->atom()); }
Atom getProperty(Atom name) const;
void setProperty(Atom name, Atom value);
bool deleteProperty(Atom name);
bool hasProperty(Atom name) const;
// Faster versions that takes direct indices
Atom getUintProperty(uint32 index) const;
void setUintProperty(uint32 index, Atom value);
bool delUintProperty(uint32 index);
bool hasUintProperty(uint32 i) const;
Atom getIntProperty(int index) const;
void setIntProperty(int index, Atom value);
bool propertyIsEnumerable(Atom name) const;
#ifdef AVMPLUS_MAC
// Hack for Mac; can't take addr of virtual function
Atom _getUintProperty(uint32 index) const
{
return getUintProperty(index);
}
void _setUintProperty(uint32 index, Atom value)
{
setUintProperty(index, value);
}
Atom _getIntProperty(int index) const
{
return getIntProperty(index);
}
void _setIntProperty(int index, Atom value)
{
setIntProperty(index, value);
}
#endif
// Iterator support - for in, for each
Atom nextName(int index);
Atom nextValue(int index);
int nextNameIndex(int index);
// native methods
Atom pop(); // pop(...rest)
uint32 push(Atom *args, int argc); // push(...args):uint
uint32 unshift(Atom *args, int argc); // unshift(...args):
void checkForSparseToDenseConversion();
#ifdef DEBUGGER
uint32 size() const;
#endif
#ifdef AVMPLUS_VERBOSE
public:
Stringp format(AvmCore* core) const;
#endif
};
}
#endif /* __avmplus_ArrayObject__ */

View File

@@ -1,304 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
/////////////////////////////////////////////////////////
// AtomArray object
/////////////////////////////////////////////////////////
#include "avmplus.h"
namespace avmplus
{
using namespace MMgc;
AtomArray::AtomArray (int initialCapacity)
{
m_length = 0;
if (!initialCapacity)
{
m_atoms = 0;
}
else
{
if (initialCapacity < kMinCapacity)
initialCapacity = kMinCapacity;
GC *gc = GC::GetGC(this);
setAtoms(gc, (Atom*) gc->Calloc(initialCapacity, sizeof(Atom), GC::kContainsPointers|GC::kZero));
}
}
AtomArray::~AtomArray()
{
clear();
}
/////////////////////////////////////////////////////
// Array AS API
/////////////////////////////////////////////////////
// Pop last element off the end of the array and shrink length
Atom AtomArray::pop()
{
if (!m_length)
return undefinedAtom;
Atom retAtom = m_atoms[m_length - 1];
setAtInternal(m_length - 1, 0); // so GC collects this item
m_length--;
return retAtom;
}
using namespace MMgc;
// n arguments are pushed on the array
uint32 AtomArray::push(Atom *args, int argc)
{
checkCapacity (m_length + argc);
// slow path to trigger write barrier
for(int i=0; i < argc; i++) {
push(args[i]);
}
return argc;
}
// Reverse array elements
void AtomArray::reverse()
{
if (m_length > 1)
{
for (uint32 k = 0; k < (m_length >> 1); k++)
{
Atom temp = m_atoms[k];
m_atoms[k] = m_atoms[m_length - k - 1];
m_atoms[m_length - k - 1] = temp;
}
}
}
// return 0th element, shift rest down
Atom AtomArray::shift()
{
if (!m_length)
return undefinedAtom;
Atom *arr = m_atoms;
Atom retAtom = arr[0];
setAtInternal(0, 0);
memmove (arr, arr + 1, (m_length - 1) * sizeof(Atom));
arr[m_length - 1] = 0; // clear item so GC can collect it.
m_length--;
return retAtom;
}
// insertPoint arg - place to insert
// insertCount arg - number to insert
// deleteCount - number to delete
// args - #insertCount args to insert
void AtomArray::splice(uint32 insertPoint, uint32 insertCount, uint32 deleteCount, AtomArray *args, int offset)
{
long l_shiftAmount = (long)insertCount - (long) deleteCount; // long because result could be negative
// Must be BEFORE arr = m_atoms since m_atoms might change
checkCapacity (m_length + l_shiftAmount);
Atom *arr = m_atoms;
Atom *argsArr = args ? args->m_atoms : 0;
if (l_shiftAmount < 0)
{
int numberBeingDeleted = -l_shiftAmount;
// whack deleted items so they're ref count goes down
AvmCore::decrementAtomRegion(arr + insertPoint + insertCount, numberBeingDeleted);
// shift elements down
int toMove = m_length - insertPoint - deleteCount;
memmove (arr + insertPoint + insertCount, arr + insertPoint + deleteCount, toMove * sizeof(Atom));
// clear top part for RC purposes
memset (arr + m_length - numberBeingDeleted, 0, numberBeingDeleted * sizeof(Atom));
}
else if (l_shiftAmount > 0)
{
memmove (arr + insertPoint + l_shiftAmount, arr + insertPoint, (m_length - insertPoint) * sizeof(Atom));
// clear for RC purposes
memset (arr + insertPoint, 0, l_shiftAmount * sizeof(Atom));
}
// Add the items to insert
if (insertCount)
{
AvmAssert(args != 0);
for (uint32 i=0; i<insertCount; i++)
{
setAtInternal(insertPoint+i, argsArr[i+offset]);
}
}
m_length += l_shiftAmount;
return;
}
// insert array of arguments at front of array
Atom AtomArray::unshift(Atom *args, int argc)
{
// shift elements up by argc
// inserts args into initial spots
checkCapacity (m_length + argc);
Atom *arr = m_atoms;
memmove (arr + argc, arr, m_length * sizeof(Atom));
// clear moved element for RC purposes
memset (arr, 0, argc * sizeof(Atom));
for(int i=0; i<argc; i++) {
setAtInternal(i, args[i]);
}
m_length += argc;
return nullObjectAtom;
}
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
void AtomArray::checkCapacity (int newLength)
{
AvmAssert(newLength >= 0);
// !!@ handle case where capacity shrinks by 50% (resize buffer smaller)
if (!m_atoms || newLength > int(capacity()))
{
// We oversize our buffer by 50% (is that the best algorithm?)
int capacity = newLength + (newLength >> 2);
if (capacity < kMinCapacity) capacity = kMinCapacity;
GC* gc = GC::GetGC(this);
Atom* newAtoms = (Atom*) gc->Calloc(capacity, sizeof(Atom), GC::kContainsPointers|GC::kZero);
Atom* oldAtoms = m_atoms;
setAtoms(gc, newAtoms);
if(oldAtoms) {
// use a memcpy to skip ref counting
memcpy(m_atoms, oldAtoms, m_length*sizeof(Atom));
memset(oldAtoms, 0, m_length*sizeof(Atom));
gc->Free(oldAtoms);
}
}
}
void AtomArray::push (Atom a)
{
checkCapacity (m_length + 1);
setAtInternal(m_length++, a);
}
void AtomArray::push (const AtomArray *a)
{
if (!a)
return;
push (a->m_atoms, a->getLength());
}
void AtomArray::removeAt (uint32 index)
{
AvmAssert (m_length > 0);
AvmAssert (index >= 0);
AvmAssert (index < uint32(m_length));
if (!m_length)
return;
checkCapacity (m_length - 1);
m_length--;
// use setAt instead of direct access for proper ref count maintenance
setAtInternal(index, 0);
Atom *arr = m_atoms;
if (m_length)
{
// shift down entries
memmove (arr + index, arr + index + 1, (this->m_length - index) * sizeof(Atom));
}
arr[m_length] = 0; // clear our entry so GC can collect it
}
void AtomArray::insert (uint32 index, Atom a)
{
AvmAssert(index <= m_length);
checkCapacity (m_length + 1);
m_length++;
Atom *arr = m_atoms;
// shift entries up by one to make room
memmove (arr + index + 1, arr + index, (m_length - index - 1) * sizeof(Atom));
// this element is still in the array so don't let setAtInternal decrement its count
m_atoms[index] = 0;
setAtInternal(index, a);
}
void AtomArray::setAt (uint32 index, Atom a)
{
if (index > m_length)
{
AvmAssert(0);
return;
}
setAtInternal(index, a);
}
Atom AtomArray::getAt (uint32 index) const
{
if (index > m_length)
{
AvmAssert(0);
return nullObjectAtom;
}
return m_atoms[index];
}
void AtomArray::clear()
{
#ifdef MMGC_DRC
AvmCore::decrementAtomRegion(m_atoms, m_length);
#endif
m_length = 0;
if(m_atoms) {
GC::GetGC(m_atoms)->Free(m_atoms);
m_atoms = 0;
}
}
}

View File

@@ -1,128 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AtomArray__
#define __avmplus_AtomArray__
namespace avmplus
{
class AtomArray
{
public:
AtomArray(int initialCapacity = 0);
~AtomArray();
/////////////////////////////////////////////////////
// Array AS API support
/////////////////////////////////////////////////////
// Pop last element off the end of the array and shrink length
Atom pop();
// n arguments are pushed on the array (argc is returned)
uint32 push(Atom *args, int argc);
// Reverse array elements
void reverse();
// return 0th element, shift rest down
Atom shift();
// insertPoint arg - place to insert
// insertCount arg - number to insert
// deleteCount - number to delete
// args - #insertCount args to insert
// offset - offset in args to start the insertion from.
void splice(uint32 insertPoint, uint32 insertCount, uint32 deleteCount, AtomArray *args, int offset=0);
// insert array of arguments at front of array
Atom unshift(Atom *args, int argc);
/////////////////////////////////////////////////////
uint32 getLength() const { return m_length; };
void setLength(uint32 len) { m_length = len; }
uint32 capacity() const
{
return MMgc::GC::Size(m_atoms)/sizeof(Atom);
}
void push (Atom a);
void push (const AtomArray *a);
void removeAt (uint32 index);
void insert (uint32 index, Atom a);
void setAt (uint32 index, Atom a);
void clear();
Atom operator[](uint32 index) const { return getAt(index); };
Atom getAt(uint32 index) const;
// ONLY USE THIS IF YOU PRE-CHECK THE LENGTH
Atom getAtFast(uint32 index) const
{
AvmAssert(index < m_length);
return m_atoms[index];
};
/**
* Compacts the AtomArray so it is exactly large enough
* to hold the contents of the array.
*
* This is useful for conserving memory.
*/
void pack();
void checkCapacity (int newLength);
private:
uint32 m_length;
Atom* m_atoms;
const static uint32 kMinCapacity = 4;
void setAtInternal(uint32 index, Atom a)
{
// m_arr[index] = a;
WBATOM( MMgc::GC::GetGC(m_atoms), m_atoms, m_atoms + index, a);
}
void setAtoms(MMgc::GC *gc, Atom *atoms)
{
WB(gc, gc->FindBeginning(this), &m_atoms, atoms);
}
};
}
#endif /* __avmplus_AtomArray__ */

View File

@@ -1,38 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
}

View File

@@ -1,142 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AtomConstants__
#define __avmplus_AtomConstants__
namespace avmplus
{
/**
* The AtomConstants namespace defines constants for
* manipulating atoms.
*
* The atom is a primitive value in ActionScript. Since
* ActionScript is a dynamically typed language, an atom can
* belong to one of several types: null, undefined, number,
* integer, string, boolean, object reference.
*
* Atoms are encoded with care to take up the minimum
* possible space. An atom is represented by a 32-bit
* integer, with the bottom 3 bits indicating the type.
*
* 32 bit atom
*
* 31 16 15 8 7 3 210
* dddddddd dddddddd dddddddd ddddd TTT
*
* TTT
* 000 - untagged
* 001 object
* 010 string
* 011 namespace
* 100 undefined
* 101 boolean
* 110 integer
* 111 double
*
* - using last 3 bits means allocations must be 8-byte aligned.
* - related types are 1 bit apart, e.g. int/double
*
* kInteger atoms are used to represent integer values from -2^28..2^28-1,
* regardless of whether the context implies int, uint, or Number.
* If a number doesn't fit into that range it is stored as a kDoubleType
*
*/
namespace AtomConstants
{
/**
* @name Atom types
* These are the type values that appear in the bottom
* 3 bits of an atom.
*/
/*@{*/
// cannot use 0 as tag, breaks atomWriteBarrier
const Atom kObjectType = 1; // null=1
const Atom kStringType = 2; // null=2
const Atom kNamespaceType = 3; // null=3
const Atom kSpecialType = 4; // undefined=4
const Atom kBooleanType = 5; // false=5 true=13
const Atom kIntegerType = 6;
const Atom kDoubleType = 7;
/*@}*/
#define ISNULL(a) (((unsigned)a) < kSpecialType)
/*
other things you can do with math on atoms
isNull (unsigned)a < 4
isUndefined a == undefinedAtom
isSpecial (unsigned)a <= 4
isNumber a & 6 == 6
^8 jlt(a<8) ^2 jle(a<=4)
true 1110 0110 t 1100 f
false 0110 1110 f 0100 t
undefined 0100 1100 f 0110 f
*/
/**
* @name Special atom values
* These are the atoms for undefined, null, true
* and false.
*/
/*@{*/
// there is no single null atom. use isNull() to test, or
// one of the following typed null atoms. if you must, use NULL (0).
const Atom nullObjectAtom = kObjectType|0;
const Atom nullStringAtom = kStringType|0;
const Atom nullNsAtom = kNamespaceType|0;
const Atom undefinedAtom = kSpecialType|0; // 0x03
const Atom trueAtom = kBooleanType|0x08; // 0x0D
const Atom falseAtom = kBooleanType|0x00; // 0x05
/*@}*/
/**
* @name BIND constants
* These BIND constants are used similarly to atom kinds. Since we
* have a conservative collector, the codes aren't important.
*/
/*@{*/
const Binding BIND_NONE = 0; // no such binding
const Binding BIND_AMBIGUOUS = -1;
const Binding BIND_METHOD = 1; // int disp_id local method number
const Binding BIND_VAR = 2; // int local slot number (r/w var)
const Binding BIND_CONST = 3; // int local slot number (r/o const)
const Binding BIND_ACCESSOR = 4; // Accessor* pair of get/set bindings
const Binding BIND_ITRAMP = 5; // interface trampoline in imt table
/*@}*/
}
}
#endif /* __avmplus_AtomConstants__ */

View File

@@ -1,89 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AtomWriteBarrier__
#define __avmplus_AtomWriteBarrier__
namespace avmplus
{
#ifndef WRITE_BARRIERS
#define ATOM_WB Atom
#define WBATOM(gc, c, a, v) *(a) = v
#else
// Optimized Atom write barrier
class AtomWB
{
public:
AtomWB() {}
AtomWB(Atom t)
{
set(t);
}
AtomWB(const AtomWB& toCopy)
{
set(toCopy.atom);
}
~AtomWB() { set(0); }
const Atom& operator=(const AtomWB& wb)
{
return set(wb.atom);
}
const Atom& operator=(const Atom& tNew)
{
return set(tNew);
}
operator const Atom&() const { return atom; }
private:
Atom& set(const Atom& atomNew)
{
if(atom == atomNew)
return atom;
MMgc::GC *gc = MMgc::GC::GetGC(this);
AvmCore::atomWriteBarrier(gc, gc->FindBeginning(this), (Atom*)this, atomNew);
return atom;
}
Atom atom;
};
#define ATOM_WB AtomWB
#define WBATOM(gc, c, a, v) AvmCore::atomWriteBarrier(gc, c, a, v)
#endif // WRITE_BARRIERS
}
#endif /* __avmplus_AtomWriteBarrier__ */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,109 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __AvmDebug__
#define __AvmDebug__
#include "avmplusTypes.h"
#ifdef WIN32
#include <windows.h>
#endif
#ifdef _MAC
#if !TARGET_RT_MAC_MACHO
typedef const unsigned char* ConstStr255Param;
extern "C"
{
#ifdef powerc
extern pascal void DebugStr(ConstStr255Param aStr);
#else
// extern pascal void DebugStr(ConstStr255Param aStr) = 0xABFF;
extern pascal void SysBreakStr(ConstStr255Param aStr) = {0x303C, 0xFE15, 0xA9C9};
#endif
}
#endif
#endif
namespace avmplus
{
void AvmDebugMsg(bool debuggerBreak, const char* format, ...);
void AvmDebugMsg(const char* msg, bool debuggerBreak);
void AvmDebugMsg(const wchar* msg, bool debuggerBreak);
#ifdef _DEBUG
inline void _AvmAssertMsg(int32 assertion, const char* msg)
{
if (assertion == 0)
AvmDebugMsg(msg, true);
}
#define AvmAssertMsg(x,y) do { _AvmAssertMsg((x), (y)); } while (0) /* no semi */
#define AvmAssert(x) _AvmAssert((x), __LINE__,__FILE__)
#define _AvmAssert(x, line_, file_) __AvmAssert((x), line_, file_)
#define __AvmAssert(x, line_, file_) do { AvmAssertMsg((x), "Assertion failed: \"" #x "\" (" #file_ ":" #line_ ")"); } while (0) /* no semi */
#else
#define AvmAssertMsg(x,y) do { } while (0) /* no semi */
#define AvmAssert(x) do { } while (0) /* no semi */
#endif
/*************************************************************************/
/******************************* Debugging *******************************/
/*************************************************************************/
/* This mess serves to define the DebugMsg function on each platform.
* DebugMsg is only defined when the Debug flag is turned on; it halts
* program execution and drops into the debugger with the given message.
* We define it as in inline so that when you fall into the debugger,
* you're in the function that issued the call and not in a "DebugMsg"
* subroutine.
*/
#if defined(_MAC) && !defined(DARWIN)
// WARNING: this function is NOT THREAD SAFE
/*plugin_export*/ ConstStr255Param MakePascalMsg(const char* theString);
#if SOFT_ASSERTS
inline void DebugMsg_(const char* msg) { }
#else
#ifdef powerc
inline void DebugMsg_(const char* msg) { DebugStr(MakePascalMsg(msg)); }
#else
inline void DebugMsg_(const char* msg) { SysBreakStr(MakePascalMsg(msg)); }
#endif
#endif // SOFT_ASSERTS
#endif
}
#endif /* __AvmDebug__ */

View File

@@ -1,98 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#ifdef _DEBUG
#include <malloc.h>
#include <DbgHelp.h>
#include <strsafe.h>
#endif
/*************************************************************************/
/******************************* Debugging *******************************/
/*************************************************************************/
#ifndef MB_SERVICE_NOTIFICATION
#define MB_SERVICE_NOTIFICATION 0x00200000L
#endif
namespace avmplus
{
const static bool logToStdErr=true;
void AvmDebugMsg(bool debuggerBreak, const char *format, ...)
{
// [ggrossman 09.24.04]
// Changed this to _DEBUG only because we don't link to
// CRT in Release builds, so vsprintf is unavailable!!
#ifdef _DEBUG
va_list argptr;
va_start(argptr, format);
int bufferSize = _vscprintf(format, argptr);
char *buffer = (char*)alloca(bufferSize+1);
if (buffer) {
StringCbVPrintf(buffer, bufferSize, format, argptr);
AvmDebugMsg(buffer, debuggerBreak);
}
#else
(void)format;
(void)debuggerBreak;
#endif
}
void AvmDebugMsg(const char* msg, bool debugBreak)
{
OutputDebugString(msg);
if(logToStdErr) {
fprintf( stderr, "%s", msg );
}
if (debugBreak) {
DebugBreak();
}
}
void AvmDebugMsg(const wchar* msg, bool debugBreak)
{
OutputDebugStringW((LPCWSTR)msg);
if (debugBreak) {
DebugBreak();
}
}
}

View File

@@ -1,44 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AvmError__
#define __avmplus_AvmError__
#ifdef DEBUGGER
struct AvmError
{
int id;
const char *message;
};
#endif
#endif /* __avmplus_AvmError__ */

View File

@@ -1,39 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
using namespace MMgc;
namespace avmplus
{
}

View File

@@ -1,47 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_AvmPlusScriptableObject__
#define __avmplus_AvmPlusScriptableObject__
namespace avmplus
{
class AvmPlusScriptableObject : public MMgc::RCFinalizedObject
{
public:
// used by WeakValueHashtable to correctly atom'ize a pointer to one of these
virtual Atom toAtom() const { return undefinedAtom; }
};
}
#endif //__avmplus_AvmPlusScriptableObject__

View File

@@ -1,636 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include <math.h>
#include "avmplus.h"
#include "BigInteger.h"
#define X86_MATH
namespace avmplus
{
void BigInteger::setFromDouble(double value)
{
int e;
uint64 mantissa = MathUtils::frexp(value,&e); // value = mantissa*2^e, mantissa and e are integers.
numWords = (2 + ((e > 0 ? e : -e) /32));
AvmAssert(numWords <= kMaxBigIntegerBufferSize);
wordBuffer[1] = (uint32)(mantissa >> 32);
wordBuffer[0] = (uint32)(mantissa & 0xffffffff);
numWords = (wordBuffer[1] == 0 ? 1 : 2);
if(e < 0)
rshiftBy(-e);
else
lshiftBy(e);
}
void BigInteger::setFromBigInteger(const BigInteger* from, int32 offset, int32 amount)
{
numWords = amount;
AvmAssert(numWords <= kMaxBigIntegerBufferSize);
memcpy( (byte*)wordBuffer,
(byte*)&(from->wordBuffer[offset]),
amount*sizeof(uint32));
}
double BigInteger::doubleValueOf() const
{
// todo: there's got to be a quicker/smaller code alg for this.
if (numWords == 1)
return (double)wordBuffer[0];
// determine how many of bits are used by the top word
int bitsInTopWord=1;
for(uint32 topWord = wordBuffer[numWords-1]; topWord > 1; topWord >>= 1)
bitsInTopWord++;
// start result with top word. We will accumulate the most significant 53 bits of data into it.
int nextWord = numWords-1;
// used for rounding:
bool bit53 = false;
bool bit54 = false;
bool rest = false;
const uint64 ONEL = 1UL;
uint64 resultMantissa = 0;
uint64 w = 0;
int pos = 53;
int bits = bitsInTopWord;
int wshift = 0;
while(pos > 0)
{
// extract word and | it in
w = wordBuffer[nextWord--];
resultMantissa |= (w >> wshift);
pos -= bits;
if (pos > 0)
{
if (nextWord > -1)
{
// ready for next word
bits = (pos > 31) ? 32 : pos;
wshift = (pos > 31) ? 0 : 32-bits;
resultMantissa <<= bits;
}
else
{
break; // not enough data for full 53 bits
}
}
}
// rounding
if (pos > 0)
{
; // insufficient data for rounding
}
else
{
bit53 = ( resultMantissa & 0x1 ) ? true : false;
if (bits == 32)
{
// last extract was exactly 32 bits, so rest of bits are in next word if there is one
if (nextWord > -1)
{
w = wordBuffer[nextWord--];
bit54 = ( w & (ONEL<<31) ) ? true : false;
rest = ( w & ((ONEL<<31)-1) ) ? true : false;
}
}
else
{
// we know bit54 is in this word but the rest of the data may be in the next
AvmAssert(bits < 32 && wshift > 0);
bit54 = ( w & (ONEL<<(wshift-1)) ) ? true : false;
if (wshift > 1)
rest = ( w & ((ONEL<<(wshift-1))-1) ) ? true : false;
// pick up any residual bits
if (nextWord > -1)
rest = rest || (wordBuffer[nextWord--] != 0);
}
}
/**
* ieee rounding is to nearest even value (bit54 is 2^-1)
* x...1 1.. -> round up since odd (but53 set)
* x...0 1...1.. -> round up since value > 1/2
*/
if (bit54 && (bit53 || rest))
resultMantissa += 1;
double result=0;
int32 expBase2 = lg2() + 1 - 53; // if negative, then we've already captured all the data in the mantissaResult and we can ignore.
result = (double)resultMantissa;
if (expBase2 > 0)
{
if (expBase2 < 64)
{
uint64 uint64_1 = 1;
result *= (double)(uint64_1 << expBase2);
}
else
{
result *= MathUtils::pow(2,expBase2);
}
}
return result;
}
// Compare this vs other, return -1 if this < other, 0 if this == other, or 1 if this > other.
// (todo: optimization for D2A would be to check if comparison was larger than an argument value
// currently, we add the argument to this and compare the result with other).
int32 BigInteger::compare(const BigInteger *other) const
{
// if a is bigger than other, subtract has to be positive (assuming unsigned value)
int result = 0;
if (numWords > other->numWords)
result = 1;
else if (numWords < other->numWords)
result = -1;
else
{
// otherwise, they are they same number of uint32 words. need to check numWords by numWords
for(int x = numWords-1; x > -1 ; x--)
{
if (wordBuffer[x] != other->wordBuffer[x])
{
result = (wordBuffer[x] < other->wordBuffer[x]) ? -1 : 1;
break;
}
}
}
return result;
}
// Multiply by an integer factor and add an integer increment. The addition is essentially free,
// use this with a zero second argument for basic multiplication.
void BigInteger::multAndIncrementBy(int32 factor, int32 addition)
{
uint64 opResult;
// perform mult op, moving carry forward.
uint64 carry = addition; // init cary with first addition
int x;
for(x=0; x < numWords; x++)
{
opResult = (uint64)wordBuffer[x] * (uint64)factor + carry;
carry = opResult >> 32;
wordBuffer[x] = (uint32)(opResult & 0xffffffff);
}
// if carry goes over the existing top, may need to expand wordBuffer
if (carry)
{
setNumWords(numWords+1);
wordBuffer[x] = (uint32)carry;
}
}
// Multiply by another BigInteger. If optional arg result is not null, reuse it for
// result, else allocate a new result.
// (note, despite the name "smallerNum", argument does not need to be smaller than this).
BigInteger* BigInteger::mult(const BigInteger* smallerNum, BigInteger* result) const
{
// Need to know which is the bigger number in terms of number of words.
const BigInteger *biggerNum = this;
if (biggerNum->numWords < smallerNum->numWords)
{
const BigInteger *temp = biggerNum;
biggerNum = smallerNum;
smallerNum = temp;
}
// Make sure result is big enough, initialize with zeros
int maxNewNumWords = biggerNum->numWords + smallerNum->numWords;
result->setNumWords(maxNewNumWords); // we'll trim the excess at the end.
// wipe entire buffer (initToZero flag in setNumWords only sets new elements to zero)
for(int x = 0; x < maxNewNumWords; x++)
result->wordBuffer[x] = 0;
// do the math like gradeschool. To optimize, use an FFT (http://numbers.computation.free.fr/Constants/Algorithms/fft.html)
for(int x = 0; x < smallerNum->numWords; x++)
{
uint64 factor = (uint64) smallerNum->wordBuffer[x];
if (factor) // if 0, nothing to do.
{
uint32* pResult = result->wordBuffer+x; // each pass we rewrite elements of result offset by the pass iteration
uint64 product;
uint64 carry = 0;
for(int y = 0; y < biggerNum->numWords; y++)
{
product = (biggerNum->wordBuffer[y] * factor) + *pResult + carry;
carry = product >> 32;
*pResult++ = (uint32)(product & 0xffffffff);
}
*pResult = (uint32)carry;
}
}
// remove leading zeros
result->trimLeadingZeros();
return result;
}
// Divide this by divisor, put the remainder (i.e. this % divisor) into residual. If optional third argument result
// is not null, use it to store the result of the div, else allocate a new BigInteger for the result.
// Note: this has been hard to get right. If bugs do show up, use divideByReciprocalMethod instead
// Note2: this is optimized for the types of numerator/denominators generated by D2A. It will not work when
// the result would be a value bigger than 9. For general purpose BigInteger division, use divideByReciprocalMethod.
BigInteger* BigInteger::quickDivMod(const BigInteger* divisor, BigInteger* residual, BigInteger* result)
{
// handle easy cases where divisor is >= this
int compareTo = this->compare(divisor);
if (compareTo == -1)
{
residual->copyFrom(this);
result->setValue(0);
return result;
}
else if (compareTo == 0)
{
residual->setValue(0);
result->setValue(1);
return result;
}
int dWords = divisor->numWords;
/* this section only necessary for true division instead of special case division needed by D2A. We are
assuming the result is a single digit value < 10 and > -1
int next = this->numWords - dWords;
residual->copyFrom(this, next, dWords); // residual holds a divisor->numWords sized chunk of this.
*/
residual->copyFrom(this,0,numWords);
BigInteger decrement;
decrement.setFromInteger(0);
result->setNumWords(divisor->numWords, true);
uint64 factor;
//do // need to loop over dword chunks of residual to make this handle division of any arbitrary bigIntegers
{
// guess largest factor that * divisor will fit into residual
factor = (uint64)(residual->wordBuffer[residual->numWords-1]) / divisor->wordBuffer[dWords-1];
if ( ((factor <= 0) || (factor > 10)) // over estimate of 9 could be 10
&& residual->numWords > 1 && dWords > 1)
{
uint64 bigR = ( ((uint64)residual->wordBuffer[residual->numWords-1]) << 32)
+ (residual->wordBuffer[residual->numWords-2]);
factor = bigR / divisor->wordBuffer[dWords-1];
if (factor > 9)
{ // Note: This only works because of the relative size of the two operands
// which the D2A class produces. todo: try generating a numerator out of the
// the top 32 significant bits of residual (may have to get bits from two seperate words)
// and a denominator out of the top 24 significant bits of divisor and use them for
// the factor guess. Same principal as above applied to 8 bit units.
factor = 9;
/*
BigInteger::free(decrement);
return divideByReciprocalMethod(divisor, residual, result);
*/
}
}
if (factor)
{
decrement.copyFrom(divisor);
decrement.multAndIncrementBy( (uint32)factor,0);
// check for overestimate
// fix bug 121952: must check for larger overestimate, which
// can occur despite the checks above in some rare cases.
// To see this case, use:
// this=4398046146304000200000000
// divisor=439804651110400000000000
while (decrement.compare(residual) == 1 && factor > 0)
{
decrement.decrementBy(divisor);
factor--;
}
// reduce dividend (aka residual) by factor*divisor, leave remainder in residual
residual->decrementBy(&decrement);
}
// check for factor 0 underestimate
int comparedTo = residual->compare(divisor);
if (comparedTo == 1) // correct guess if its an off by one estimate
{
residual->decrementBy(divisor);
factor++;
}
result->wordBuffer[0] = (uint32)factor;
/* The above works for the division requirements of D2A, where divisor is always around 10 larger
than the dividend and the result is always a digit 1-9.
To make this routine work for general division, the following would need to be fleshed out /debugged.
residual->trimLeadingZeros();
// While we have more words to divide by and the residual has less words than the
// divisor,
if (--next >= 0)
{
do
{
result->lshiftBy(32); // shift current result over by a word
residual->lshiftBy(32);// shift remainder over by a word
residual->wordBuffer[0] = this->wordBuffer[next]; // drop next word of "this" into bottom word of remainder
}
while(residual->numWords < dWords);
}
} while(next >= 0);
*/
}
// trim zeros off top of residual
result->trimLeadingZeros();
return result;
}
/* Was hoping dividing via a Newton's approximation of the reciprocal would be faster, but
its not (makes D2A about twice as slow!). Its not the 32bit divide above that's slow,
its how many times you have to iterate over entire BigIntegers. Below uses a shift,
and three multiplies:
*/
BigInteger* BigInteger::divideByReciprocalMethod(const BigInteger* divisor, BigInteger* residual, BigInteger* result)
{
// handle easy cases where divisor is >= this
int compareTo = this->compare(divisor);
if (compareTo == -1)
{
residual->copyFrom(this);
result->setValue(0);
return result;
}
else if (compareTo == 0)
{
residual->setValue(0);
result->setValue(1);
return result;
}
uint32 d2Prec = divisor->lg2();
uint32 e = 1 + d2Prec;
uint32 ag = 1;
uint32 ar = 31 + this->lg2() - d2Prec;
BigInteger u;
u.setFromInteger(1);
BigInteger ush;
ush.setFromInteger(1);
BigInteger usq;
usq.setFromInteger(0);
while (1)
{
u.lshift(e + 1,&ush);
divisor->mult(&u,&usq); // usq = divisor*u^2
usq.multBy(&u);
ush.subtract(&usq, &u); // u = ush - usq;
int32 ush2 = u.lg2(); // ilg2(u);
e *= 2;
ag *= 2;
int32 usq2 = 4 + ag;
ush2 -= usq2; // BigInteger* diff = ush->subtract(usq); // ush -= usq; ush > 0
if (ush2 > 0) // (ush->compare(usq) == 1)
{
u.rshiftBy(ush2); // u >>= ush;
e -= ush2;
}
if (ag > ar)
break;
}
result = this->mult(&u,result); // mult by reciprocal (scaled by e)
result->rshiftBy(e); // remove scaling
BigInteger temp;
temp.setFromInteger(0);
divisor->mult(result, &temp); // compute residual as this - divisor*result
this->subtract(&temp,residual); // todo: should be a more optimal way of doing this
// ... doesn't work, e is the wrong scale for this (too large)....
// residual = this->lshift(e,residual); // residual = (this*2^e - result) / 2^e
// residual->decrementBy(result);
// residual->rshiftBy(e); // remove scaling
return(result);
}
// q = this->divBy(divisor) is equilvalent to: q = this->quickDivMod(divisor,remainderResult); this = remainderResult;
BigInteger* BigInteger::divBy(const BigInteger* divisor, BigInteger* divResult)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
quickDivMod(divisor, &tempInt, divResult); // this has been hard to get right. If bugs do show up,
//divResult = divideByReciprocalMethod(divisor,tempInt,divResult); // try this version instead Its slower, but less likely to be buggy
this->copyFrom(&tempInt);
return divResult;
}
uint32 BigInteger::lg2() const
{
uint32 powersOf2 = (numWords-1)*32;
for(uint32 topWord = wordBuffer[numWords-1]; topWord > 1; topWord >>= 1)
powersOf2++;
return powersOf2;
}
// Shift a BigInteger by <shiftBy> bits to left. If
// result is not NULL, write result into it, else allocate a new BigInteger.
BigInteger* BigInteger::lshift(uint32 shiftBy, BigInteger* result) const
{
// calculate how much larger the result will be
int numNewWords = shiftBy >> 5; // i.e. div by 32
int totalWords = numNewWords + numWords + 1; // overallocate by 1, trim if necessary at end.
result->setNumWords(totalWords,true);
// make sure we don't create more words for 0
if ( numWords == 1 && wordBuffer[0] == 0 )
{
result->setValue(0); // 0 << num is still 0
return result;
}
const uint32* pSourceBuff = wordBuffer;
uint32* pResultBuff = result->wordBuffer;
for(int x = 0; x < numNewWords; x++)
*pResultBuff++ = 0;
// move bits from wordBuffer into result's wordBuffer shifted by (shiftBy % 32)
shiftBy &= 0x1f;
if (shiftBy) {
uint32 carry = 0;
int shiftCarry = 32 - shiftBy;
for(int x=0; x < numWords; x++)
{
*pResultBuff++ = *pSourceBuff << shiftBy | carry;
carry = *pSourceBuff++ >> shiftCarry;
}
*pResultBuff = carry; // final carry may add a word
if (*pResultBuff)
++totalWords; // prevent trim of overallocated extra word
}
else for(int x=0; x < numWords; x++) // shift was by a clean multiple of 32, just move words
{
*pResultBuff++ = *pSourceBuff++;
}
result->numWords = totalWords - 1; // trim over allocated extra word
return result;
}
// Shift a BigInteger by <shiftBy> bits to right. If
// result is not NULL, write result into it, else allocate a new BigInteger.
// (todo: might be possible to combine rshift and lshift into a single function
// with argument specifying which direction to shift, but result might be messy/harder to get right)
BigInteger* BigInteger::rshift(uint32 shiftBy, BigInteger* result) const
{
int numRemovedWords = shiftBy >> 5; // i.e. div by 32
// calculate how much larger the result will be
int totalWords = numWords - numRemovedWords;
result->setNumWords(totalWords,true);
// check for underflow
if (numRemovedWords > numWords)
{
result->setValue(0);
return result;
}
// move bits from wordBuffer into result's wordBuffer shifted by (shiftBy % 32)
uint32* pResultBuff = &(result->wordBuffer[totalWords-1]);
const uint32* pSourceBuff = &(wordBuffer[numWords-1]);
shiftBy &= 0x1f;
if (shiftBy)
{
int shiftCarry = 32 - shiftBy;
uint32 carry = 0;
for(int x=totalWords-1; x > -1; x--)
{
*pResultBuff-- = *pSourceBuff >> shiftBy | carry;
carry = *pSourceBuff-- << shiftCarry;
}
}
else for(int x=totalWords-1; x > -1; x--) // shift was by a clean multiple of 32, just move words
{
*pResultBuff-- = *pSourceBuff--;
}
result->numWords = totalWords;
result->trimLeadingZeros(); // shrink numWords down to correct value
return result;
}
// Add or subtract two BigIntegers. If subtract, we assume the argument is smaller than this since we
// don't support negative numbers. If optional third argument result is not null, reuse it for result
// else allocate a new BigInteger for the result.
BigInteger *BigInteger::addOrSubtract(const BigInteger* smallerNum, bool isAdd, BigInteger* result) const
{
// figure out which operand is the biggest in terms of number of words.
int comparedTo = compare(smallerNum);
const BigInteger* biggerNum = this;
if (comparedTo < 0)
{
const BigInteger* temp = biggerNum;
biggerNum = smallerNum;
smallerNum = temp;
AvmAssert(isAdd || comparedTo >= 0); // the d2a/a2d code should never subtract a larger from a smaller.
// all of the BigInteger code assumes positive numbers. Proper
// handling would be to create a negative result here (and check for
// negative results everywhere).
}
result->setNumWords(biggerNum->numWords+1, true);
if (!isAdd && !comparedTo) // i.e. this - smallerNum == 0
{
result->setValue(0);
return result;
}
// do the math: loop over common words of both numbers, performing - or + and carrying the
// overflow/borrow forward to next word.
uint64 borrow = 0;
uint64 x;
int index;
for( index = 0; index < smallerNum->numWords; index++)
{
if (isAdd)
x = ((uint64)biggerNum->wordBuffer[index]) + smallerNum->wordBuffer[index] + borrow;
else
x = ((uint64)biggerNum->wordBuffer[index]) - smallerNum->wordBuffer[index] - borrow; // note x is unsigned. Ok even if result would be negative however
borrow = x >> 32 & (uint32)1;
result->wordBuffer[index] = (uint32)(x & 0xffffffff);
}
// loop over remaining words of the larger number, carying borrow/overflow forward
for( ; index < biggerNum->numWords; index++)
{
if (isAdd)
x = ((uint64)biggerNum->wordBuffer[index]) + borrow;
else
x = ((uint64)biggerNum->wordBuffer[index]) - borrow;
borrow = x >> 32 & (uint32)1;
result->wordBuffer[index] = (uint32)(x & 0xffffffff);
}
// handle final overflow if this is add
if (isAdd && borrow)
{
result->wordBuffer[index] = (uint32)(borrow & 0xffffffff);
index++;
}
// loop backwards over result, removing leading zeros from our numWords count
while( !(result->wordBuffer[--index]) )
{
}
result->numWords = index+1;
return result;
}
}

View File

@@ -1,256 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_BigInteger__
#define __avmplus_BigInteger__
//
// BigInteger is an implementation of arbitrary precision integers. This class is used by the
// D2A class in mathutils.h to print doubles to greater than 15 digits of precision. It has
// been implemented with that use in mind, so if you want to use it for some other purpose
// be aware that certain basic features have not been implemented: divide() assumes the result
// is a single digit, there is no support for negative values, and subtract() assumes that the
// term being subtracted from is larger than the operand.
//
// By far, memory allocation is the gating speed factor. D2A never uses more than 8 or so values
// during a given run, so a simple memoryCache is used to keep 8 temporaries around for quick reuse.
// This would likely have to be adjusted for more general use.
namespace avmplus
{
class BigInteger
{
public:
// Memory management
// --------------------------------------------------------
BigInteger()
{
numWords = 0;
}
~BigInteger()
{
}
inline void setFromInteger(int32 initVal)
{
wordBuffer[0] = initVal;
numWords = 1;
}
void setFromDouble(double value);
void setFromBigInteger(const BigInteger* from, int32 offset, int32 amount);
double doubleValueOf() const; // returns double approximation of this integer
// operations
// --------------------------------------------------------
// Compare (sum = this+offset) vs other. if sum > other, return 1. if sum < other,
// return -1, else return 0. Note that all terms are assumed to be positive.
int32 compare(const BigInteger *other) const;
// same as above, but compare this+offset with other.
int32 compareOffset(const BigInteger *other, const BigInteger *offset)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
add(offset,&tempInt);
return tempInt.compare(other);
}
// Add or subtract one BigInteger from another. isAdd determines if + or - is performed.
// If result is specified, write result into it (allows for reuse of temporaries), else
// allocate a new BigInteger for the result.
BigInteger* addOrSubtract(const BigInteger* other, bool isAdd, BigInteger* result) const;
// syntactic sugar for simple case of adding two BigIntegers
inline BigInteger* add(const BigInteger* other, BigInteger* result) const
{
return addOrSubtract(other, true, result);
}
// syntactic sugar for simple case of subtracting two BigIntegers
inline BigInteger* subtract(const BigInteger* other, BigInteger* result) const
{
return addOrSubtract(other, false, result);
}
// Increment this by other. other is assumed to be positive
inline void incrementBy(const BigInteger* other)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
addOrSubtract(other,true,&tempInt);
copyFrom(&tempInt);
}
// Decrement this by other. other is assumed to be positive and smaller than this.
inline void decrementBy(const BigInteger* other)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
addOrSubtract(other,false,&tempInt);
copyFrom(&tempInt);
}
// Shift a BigInteger by <shiftBy> bits to right or left. If
// result is not NULL, write result into it, else allocate a new BigInteger.
BigInteger* rshift(uint32 shiftBy, BigInteger* result) const;
BigInteger* lshift(uint32 shiftBy, BigInteger* result) const;
// Same as above but store result back into "this"
void lshiftBy(uint32 shiftBy)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
lshift(shiftBy,&tempInt);
copyFrom(&tempInt);
}
void rshiftBy(uint32 shiftBy)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
rshift(shiftBy,&tempInt);
copyFrom(&tempInt);
}
// Multiply this by an integer factor and add an integer increment. Store result back in this.
// Note, the addition is essentially free
void multAndIncrementBy( int32 factor, int32 addition);
inline void multBy( int32 factor)
{
multAndIncrementBy(factor,0);
}
// Shorthand for multiplying this by a double valued factor (and storing result back in this).
inline void multBy(double factor)
{
BigInteger bigFactor;
bigFactor.setFromDouble(factor);
multBy(&bigFactor);
}
// Multiply by another BigInteger. If optional arg result is not null, reuse it for
// result, else allocate a new result.
// (note, despite the name "smallerNum", argument does not need to be smaller than this).
BigInteger* mult(const BigInteger* other, BigInteger* result) const;
void multBy(const BigInteger *other)
{
BigInteger tempInt;
tempInt.setFromInteger(0);
mult(other,&tempInt);
copyFrom(&tempInt);
}
// divide this by divisor, put the remainder (i.e. this % divisor) into residual. If optional third argument result
// is not null, use it to store the result of the div, else allocate a new BigInteger for the result.
// Note: this has been hard to get right. If bugs do show up, use divideByReciprocalMethod instead
// Note2: this is optimized for the types of numerator/denominators generated by D2A. It will not work when
// the result would be a value bigger than 9. For general purpose BigInteger division, use divideByReciprocalMethod.
BigInteger* quickDivMod(const BigInteger* divisor, BigInteger* modResult, BigInteger* divResult);
/* Thought this would be faster than the above, but its not */
BigInteger* divideByReciprocalMethod(const BigInteger* divisor, BigInteger* modResult, BigInteger* divResult);
uint32 lg2() const;
// q = this->divBy(divisor) is equilvalent to: q = this->divMod(divisor,remainderResult); this = remainderResult;
BigInteger* divBy(const BigInteger* divisor, BigInteger* divResult);
// copy words from another BigInteger. By default, copy all words into this. If copyOffsetWords
// is not -1, then copy numCopyWords starting at word copyOffsetWords.
void copyFrom(const BigInteger *other, int32 copyOffsetWords=-1, int32 numCopyWords=-1)
{
int32 numCopy = (numCopyWords == -1) ? other->numWords : numCopyWords;
int32 copyOffset = (copyOffsetWords == -1) ? 0 : copyOffsetWords;
copyBuffer(other->wordBuffer+copyOffset, numCopy);
}
// Data members
// --------------------------------------------------------
static const int kMaxBigIntegerBufferSize=128;
uint32 wordBuffer[kMaxBigIntegerBufferSize];
int32 numWords;
private:
// sign; Simplifications are made assuming all numbers are positive
// Utility methods
// --------------------------------------------------------
// set value to a simple integer
inline void setValue(uint32 val)
{
this->numWords = 1;
this->wordBuffer[0] = val;
}
// copy wordBuffer from another BigInteger
inline void copyBuffer(const uint32 *newBuff, int32 size)
{
numWords = size;
AvmAssert(newBuff != wordBuffer);
AvmAssert(numWords <= kMaxBigIntegerBufferSize);
memcpy(wordBuffer, newBuff, numWords*sizeof(uint32));
}
inline void setNumWords( int32 newNumWords,bool initToZero=false)
{
int32 oldNumWords = numWords;
numWords = newNumWords;
AvmAssert(numWords <= kMaxBigIntegerBufferSize);
if (initToZero && oldNumWords < numWords)
{
for( int32 x = oldNumWords-1; x < numWords; x++)
wordBuffer[x] = 0;
}
}
// remove leading zero words from number.
inline void trimLeadingZeros()
{
int32 x;
for( x = numWords-1; x >= 0 && wordBuffer[x] == 0; x--)
;
this->numWords = (x == -1) ? 1 : x+1; // make sure a zero value has numWords = 1
}
};
}
#endif // __avmplus_BigInteger__

View File

@@ -1,157 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_BitSet__
#define __avmplus_BitSet__
namespace avmplus
{
/**
* Bit vectors are an efficent method of keeping True/False information
* on a set of items or conditions. Class BitSet provides functions
* to manipulate individual bits in the vector.
*
* Since most vectors are rather small an array of longs is used by
* default to house the value of the bits. If more bits are needed
* then an array is allocated dynamically outside of this object.
*
* This object is not optimized for a fixed sized bit vector
* it instead allows for dynamically growing the bit vector.
*/
class BitSet: public MMgc::GCFinalizedObject
{
public:
enum { kUnit = 8*sizeof(long),
kDefaultCapacity = 4 };
BitSet()
{
capacity = kDefaultCapacity;
for(int i=0; i<capacity; i++)
bits.ar[i] = 0;
}
~BitSet()
{
if (capacity > kDefaultCapacity)
delete [] bits.ptr;
capacity = 0;
}
void set(int bitNbr)
{
int index = bitNbr / kUnit;
int bit = bitNbr % kUnit;
if (index >= capacity)
grow(index+1);
if (capacity > kDefaultCapacity)
bits.ptr[index] |= (1<<bit);
else
bits.ar[index] |= (1<<bit);
}
void clear(int bitNbr)
{
int index = bitNbr / kUnit;
int bit = bitNbr % kUnit;
if (index < capacity)
{
if (capacity > kDefaultCapacity)
bits.ptr[index] &= ~(1<<bit);
else
bits.ar[index] &= ~(1<<bit);
}
}
bool get(int bitNbr) const
{
int index = bitNbr / kUnit;
int bit = bitNbr % kUnit;
bool value = false;
if (index < capacity)
{
if (capacity > kDefaultCapacity)
value = ( bits.ptr[index] & (1<<bit) ) ? true : false;
else
value = ( bits.ar[index] & (1<<bit) ) ? true : false;
}
return value;
}
private:
// Grow the array until at least newCapacity big
void grow(int newCapacity)
{
// create vector that is 2x bigger than requested
newCapacity *= 2;
//MEMTAG("BitVector::Grow - long[]");
long* newBits = new long[newCapacity];
// copy the old one
for(int i=0; i<capacity; i++)
{
if (capacity > kDefaultCapacity)
newBits[i] = bits.ptr[i];
else
newBits[i] = bits.ar[i];
}
// clear out the rest
for(int i=capacity; i<newCapacity; i++)
newBits[i] = 0;
// in with the new out with the old
if (capacity > kDefaultCapacity)
delete [] bits.ptr;
bits.ptr = newBits;
capacity = newCapacity;
}
// by default we use the array, but if the vector
// size grows beyond kDefaultCapacity we allocate
// space dynamically.
int capacity;
union
{
long ar[kDefaultCapacity];
long* ptr;
}
bits;
};
}
#endif /* __avmplus_BitSet__ */

View File

@@ -1,82 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
package
{
public final class Boolean extends Object
{
// Boolean.length = 1 per ES3
// E262 {ReadOnly, DontDelete, DontEnum }
public static const length:int = 1
AS3 function toString():String {
return this ? "true" : "false"
}
AS3 function valueOf():Boolean { return this }
prototype.toString = function():String
{
if (this === prototype)
return "false"
if (!(this is Boolean)) {
// cause TypeError if this is not a Boolean value
// kInvokeOnIncompatibleObjectError
Error.throwError( TypeError, 1004, "Boolean.prototype.toString" );
}
return this ? "true" : "false"
}
prototype.valueOf = function()
{
if (this === prototype)
return false
if (!(this is Boolean)) {
// cause TypeError if this is not a Boolean value
// kInvokeOnIncompatibleObjectError
Error.throwError( TypeError, 1004, "Boolean.prototype.valueOf" );
}
return this;
}
// Dummy constructor function - This is neccessary so the compiler can do arg # checking for the ctor in strict mode
// The code for the actual ctor is in BooleanClass::construct in the avmplus
public function Boolean(value = void 0)
{}
_dontEnumPrototype(prototype);
}
}

View File

@@ -1,55 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
BEGIN_NATIVE_MAP(BooleanClass)
END_NATIVE_MAP()
BooleanClass::BooleanClass(VTable* cvtable)
: ClassClosure(cvtable)
{
toplevel()->booleanClass = this;
createVanillaPrototype();
}
Atom BooleanClass::construct(int argc, Atom* argv)
{
// TODO throw arg error if argc > 1
if (argc == 0)
return falseAtom;
else
return core()->booleanAtom(argv[1]);
}
}

View File

@@ -1,64 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 2004-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#ifndef __avmplus_BooleanClass__
#define __avmplus_BooleanClass__
namespace avmplus
{
/**
* class Boolean
*/
class BooleanClass : public ClassClosure
{
public:
BooleanClass(VTable* vtable);
// this = argv[0] (ignored)
// arg1 = argv[1]
// argN = argv[argc]
Atom construct(int argc, Atom* argv);
// this = argv[0]
// arg1 = argv[1]
// argN = argv[argc]
Atom call(int argc, Atom* argv)
{
return construct(argc, argv);
}
DECLARE_NATIVE_MAP(BooleanClass)
};
}
#endif /* __avmplus_BooleanClass__ */

View File

@@ -1,150 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version 1.1 (the
* "License"); you may not use this file except in compliance with the License. You may obtain
* a copy of the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
* WARRANTY OF ANY KIND, either express or implied. See the License for the specific
* language governing rights and limitations under the License.
*
* The Original Code is [Open Source Virtual Machine.]
*
* The Initial Developer of the Original Code is Adobe System Incorporated. Portions created
* by the Initial Developer are Copyright (C)[ 1993-2006 ] Adobe Systems Incorporated. All Rights
* Reserved.
*
* Contributor(s): Adobe AS3 Team
*
* Alternatively, the contents of this file may be used under the terms of either the GNU
* General Public License Version 2 or later (the "GPL"), or the GNU Lesser General Public
* License Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the
* LGPL are applicable instead of those above. If you wish to allow use of your version of this
* file only under the terms of either the GPL or the LGPL, and not to allow others to use your
* version of this file under the terms of the MPL, indicate your decision by deleting provisions
* above and replace them with the notice and other provisions required by the GPL or the
* LGPL. If you do not delete the provisions above, a recipient may use your version of this file
* under the terms of any one of the MPL, the GPL or the LGPL.
*
***** END LICENSE BLOCK ***** */
#include "avmplus.h"
namespace avmplus
{
BuiltinTraits::BuiltinTraits()
{
memset(this, 0, sizeof(BuiltinTraits));
}
// this is called after core types are defined. we don't want to do
// it earlier because we need Void and int
void BuiltinTraits::initInstanceTypes(PoolObject* pool)
{
AvmCore* core = pool->core;
class_itraits = pool->getBuiltinTraits(core->constantString("Class"));
namespace_itraits = pool->getBuiltinTraits(core->constantString("Namespace"));
function_itraits = pool->getBuiltinTraits(core->constantString("Function"));
boolean_itraits = pool->getBuiltinTraits(core->constantString("Boolean"));
number_itraits = pool->getBuiltinTraits(core->constantString("Number"));
int_itraits = pool->getBuiltinTraits(core->constantString("int"));
uint_itraits = pool->getBuiltinTraits(core->constantString("uint"));
string_itraits = pool->getBuiltinTraits(core->constantString("String"));
array_itraits = pool->getBuiltinTraits(core->constantString("Array"));
regexp_itraits = pool->getBuiltinTraits(core->constantString("RegExp"));
date_itraits = pool->getBuiltinTraits(core->constantString("Date"));
error_itraits = pool->getBuiltinTraits(core->constantString("Error"));
qName_itraits = pool->getBuiltinTraits(core->constantString("QName"));
xml_itraits = pool->getBuiltinTraits(core->constantString("XML"));
xmlList_itraits = pool->getBuiltinTraits(core->constantString("XMLList"));
null_itraits = core->newTraits(NULL, 0, 0, 0);
null_itraits->pool = pool;
null_itraits->ns = core->publicNamespace;
null_itraits->name = core->constantString("null");
null_itraits->final = true;
null_itraits->linked = true;
void_itraits = core->newTraits(NULL, 0, 0, 0);
void_itraits->pool = pool;
void_itraits->ns = core->publicNamespace;
void_itraits->name = core->constantString("void");
void_itraits->final = true;
void_itraits->linked = true;
// we have fast equality checks in the core that only work
// because these two classes are final. If they become non-final
// then these checks need to be updated to account for possible
// subclassing.
AvmAssert(xml_itraits->final);
AvmAssert(xmlList_itraits->final);
object_itraits->isMachineType = true;
void_itraits->isMachineType = true;
int_itraits->isMachineType = true;
uint_itraits->isMachineType = true;
boolean_itraits->isMachineType = true;
number_itraits->isMachineType = true;
int_itraits->isNumeric = true;
uint_itraits->isNumeric = true;
number_itraits->isNumeric = true;
// XML and XMLList are dynamic but do not need the
// standard dynamic hash table
xml_itraits->needsHashtable = false;
xmlList_itraits->needsHashtable = false;
// All these types including XML, XMLList and QName
// are marked as not derived objects.
//array_itraits->notDerivedObjectOrXML = true;
boolean_itraits->notDerivedObjectOrXML = true;
class_itraits->notDerivedObjectOrXML = true;
//date_itraits->notDerivedObjectOrXML = true;
function_itraits->notDerivedObjectOrXML = true;
namespace_itraits->notDerivedObjectOrXML= true;
null_itraits->notDerivedObjectOrXML = true;
number_itraits->notDerivedObjectOrXML = true;
int_itraits->notDerivedObjectOrXML = true;
uint_itraits->notDerivedObjectOrXML = true;
object_itraits->notDerivedObjectOrXML = true;
//regexp_itraits->notDerivedObjectOrXML = true;
string_itraits->notDerivedObjectOrXML = true;
//toplevel_itraits->notDerivedObjectOrXML = true;
void_itraits->notDerivedObjectOrXML = true;
xml_itraits->notDerivedObjectOrXML = true;
xmlList_itraits->notDerivedObjectOrXML = true;
qName_itraits->notDerivedObjectOrXML = true;
Traits* methodClosure_itraits;
methodClosure_itraits = pool->getBuiltinTraits(core->constantString("MethodClosure"));
methodClosure_itraits->notDerivedObjectOrXML = true;
}
void BuiltinTraits::initClassTypes(PoolObject* pool)
{
math_ctraits = findCTraits("Math$", pool);
number_ctraits = findCTraits("Number$", pool);
int_ctraits = findCTraits("int$", pool);
uint_ctraits = findCTraits("uint$", pool);
boolean_ctraits = findCTraits("Boolean$", pool);
string_ctraits = findCTraits("String$", pool);
}
Traits* BuiltinTraits::findCTraits(const char* cname, PoolObject* pool)
{
Stringp name = pool->core->constantString(cname);
for (int i=0, n=pool->cinits.capacity(); i < n; i++)
{
AbstractFunction* cinit = pool->cinits[i];
if (cinit && cinit->declaringTraits->name == name)
{
return cinit->declaringTraits;
}
}
return NULL;
}
}

Some files were not shown because too many files have changed in this diff Show More