Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/third_party/fdlibm/fdlibm.js

Issue 1421703004: Initialize maths result array in JS. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // The following is adapted from fdlibm (http://www.netlib.org/fdlibm), 1 // The following is adapted from fdlibm (http://www.netlib.org/fdlibm),
2 // 2 //
3 // ==================================================== 3 // ====================================================
4 // Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved. 4 // Copyright (C) 1993-2004 by Sun Microsystems, Inc. All rights reserved.
5 // 5 //
6 // Developed at SunSoft, a Sun Microsystems, Inc. business. 6 // Developed at SunSoft, a Sun Microsystems, Inc. business.
7 // Permission to use, copy, modify, and distribute this 7 // Permission to use, copy, modify, and distribute this
8 // software is freely granted, provided that this notice 8 // software is freely granted, provided that this notice
9 // is preserved. 9 // is preserved.
10 // ==================================================== 10 // ====================================================
(...skipping 10 matching lines...) Expand all
21 21
22 (function(global, utils) { 22 (function(global, utils) {
23 23
24 "use strict"; 24 "use strict";
25 25
26 %CheckIsBootstrapping(); 26 %CheckIsBootstrapping();
27 27
28 // ------------------------------------------------------------------- 28 // -------------------------------------------------------------------
29 // Imports 29 // Imports
30 30
31 var GlobalFloat64Array = global.Float64Array;
31 var GlobalMath = global.Math; 32 var GlobalMath = global.Math;
32 var MathAbs; 33 var MathAbs;
33 var MathExp; 34 var MathExp;
34 var NaN = %GetRootNaN(); 35 var NaN = %GetRootNaN();
35 var rempio2result; 36 var rempio2result;
36 37
37 utils.Import(function(from) { 38 utils.Import(function(from) {
38 MathAbs = from.MathAbs; 39 MathAbs = from.MathAbs;
39 MathExp = from.MathExp; 40 MathExp = from.MathExp;
40 }); 41 });
41 42
42 utils.SetupTypedArray(function(arg) { 43 utils.CreateDoubleResultArray = function(global) {
43 rempio2result = arg; 44 rempio2result = new GlobalFloat64Array(2);
44 }); 45 };
45 46
46 // ------------------------------------------------------------------- 47 // -------------------------------------------------------------------
47 48
48 define INVPIO2 = 6.36619772367581382433e-01; 49 define INVPIO2 = 6.36619772367581382433e-01;
49 define PIO2_1 = 1.57079632673412561417; 50 define PIO2_1 = 1.57079632673412561417;
50 define PIO2_1T = 6.07710050650619224932e-11; 51 define PIO2_1T = 6.07710050650619224932e-11;
51 define PIO2_2 = 6.07710050630396597660e-11; 52 define PIO2_2 = 6.07710050630396597660e-11;
52 define PIO2_2T = 2.02226624879595063154e-21; 53 define PIO2_2T = 2.02226624879595063154e-21;
53 define PIO2_3 = 2.02226624871116645580e-21; 54 define PIO2_3 = 2.02226624871116645580e-21;
54 define PIO2_3T = 8.47842766036889956997e-32; 55 define PIO2_3T = 8.47842766036889956997e-32;
(...skipping 1052 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 "log10", MathLog10, 1108 "log10", MathLog10,
1108 "log2", MathLog2, 1109 "log2", MathLog2,
1109 "log1p", MathLog1p, 1110 "log1p", MathLog1p,
1110 "expm1", MathExpm1 1111 "expm1", MathExpm1
1111 ]); 1112 ]);
1112 1113
1113 %SetForceInlineFlag(MathSin); 1114 %SetForceInlineFlag(MathSin);
1114 %SetForceInlineFlag(MathCos); 1115 %SetForceInlineFlag(MathCos);
1115 1116
1116 }) 1117 })
OLDNEW
« no previous file with comments | « src/runtime/runtime-maths.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698