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

Side by Side Diff: src/runtime.js

Issue 300004: X64 Win64: Reimplement fmod so that it works. (Closed)
Patch Set: And it lints. Created 11 years, 2 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
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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 var x = IS_NUMBER(this) ? this : %ToNumber(this); 211 var x = IS_NUMBER(this) ? this : %ToNumber(this);
212 if (!IS_NUMBER(y)) y = %ToNumber(y); 212 if (!IS_NUMBER(y)) y = %ToNumber(y);
213 return %NumberDiv(x, y); 213 return %NumberDiv(x, y);
214 } 214 }
215 215
216 216
217 // ECMA-262, section 11.5.3, page 49. 217 // ECMA-262, section 11.5.3, page 49.
218 function MOD(y) { 218 function MOD(y) {
219 var x = IS_NUMBER(this) ? this : %ToNumber(this); 219 var x = IS_NUMBER(this) ? this : %ToNumber(this);
220 if (!IS_NUMBER(y)) y = %ToNumber(y); 220 if (!IS_NUMBER(y)) y = %ToNumber(y);
221 return %NumberMod(x, y); 221 return %_NumberMod(x, y);
222 } 222 }
223 223
224 224
225 225
226 /* ------------------------------------------- 226 /* -------------------------------------------
227 - - - B i t o p e r a t i o n s - - - 227 - - - B i t o p e r a t i o n s - - -
228 ------------------------------------------- 228 -------------------------------------------
229 */ 229 */
230 230
231 // ECMA-262, section 11.10, page 57. 231 // ECMA-262, section 11.10, page 57.
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 throw %MakeTypeError('cannot_convert_to_primitive', []); 594 throw %MakeTypeError('cannot_convert_to_primitive', []);
595 } 595 }
596 596
597 597
598 // NOTE: Setting the prototype for Array must take place as early as 598 // NOTE: Setting the prototype for Array must take place as early as
599 // possible due to code generation for array literals. When 599 // possible due to code generation for array literals. When
600 // generating code for a array literal a boilerplate array is created 600 // generating code for a array literal a boilerplate array is created
601 // that is cloned when running the code. It is essiential that the 601 // that is cloned when running the code. It is essiential that the
602 // boilerplate gets the right prototype. 602 // boilerplate gets the right prototype.
603 %FunctionSetPrototype($Array, new $Array(0)); 603 %FunctionSetPrototype($Array, new $Array(0));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698