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

Side by Side Diff: src/math.js

Issue 7799027: Lock the prototype of internal classes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 188
189 // ECMA 262 - 15.8.2.18 189 // ECMA 262 - 15.8.2.18
190 function MathTan(x) { 190 function MathTan(x) {
191 if (!IS_NUMBER(x)) x = NonNumberToNumber(x); 191 if (!IS_NUMBER(x)) x = NonNumberToNumber(x);
192 return %Math_tan(x); 192 return %Math_tan(x);
193 } 193 }
194 194
195 195
196 // ------------------------------------------------------------------- 196 // -------------------------------------------------------------------
197 197
198 function SetupMath() { 198 function SetupMath() {
Erik Corry 2011/08/31 05:46:04 SetUpMath
199 %AssertIsBootstrapping();
199 // Setup math constants. 200 // Setup math constants.
200 // ECMA-262, section 15.8.1.1. 201 // ECMA-262, section 15.8.1.1.
201 %OptimizeObjectForAddingMultipleProperties($Math, 8); 202 %OptimizeObjectForAddingMultipleProperties($Math, 8);
202 %SetProperty($Math, 203 %SetProperty($Math,
203 "E", 204 "E",
204 2.7182818284590452354, 205 2.7182818284590452354,
205 DONT_ENUM | DONT_DELETE | READ_ONLY); 206 DONT_ENUM | DONT_DELETE | READ_ONLY);
206 // ECMA-262, section 15.8.1.2. 207 // ECMA-262, section 15.8.1.2.
207 %SetProperty($Math, 208 %SetProperty($Math,
208 "LN10", 209 "LN10",
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 "tan", MathTan, 256 "tan", MathTan,
256 "atan2", MathAtan2, 257 "atan2", MathAtan2,
257 "pow", MathPow, 258 "pow", MathPow,
258 "max", MathMax, 259 "max", MathMax,
259 "min", MathMin 260 "min", MathMin
260 )); 261 ));
261 }; 262 };
262 263
263 264
264 SetupMath(); 265 SetupMath();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698