OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1254 if (%IsJSProxy(obj)) { | 1254 if (%IsJSProxy(obj)) { |
1255 return true; | 1255 return true; |
1256 } | 1256 } |
1257 return %IsExtensible(obj); | 1257 return %IsExtensible(obj); |
1258 } | 1258 } |
1259 | 1259 |
1260 | 1260 |
1261 // Harmony egal. | 1261 // Harmony egal. |
1262 function ObjectIs(obj1, obj2) { | 1262 function ObjectIs(obj1, obj2) { |
1263 if (obj1 === obj2) { | 1263 if (obj1 === obj2) { |
1264 return (obj1 !== 0) || (1 / obj1 === 1 / obj2); | 1264 return (obj1 !== 0) || ((1 / obj1) === (1 / obj2)); |
1265 } else { | 1265 } else { |
1266 return (obj1 !== obj1) && (obj2 !== obj2); | 1266 return (obj1 !== obj1) && (obj2 !== obj2); |
1267 } | 1267 } |
1268 } | 1268 } |
1269 | 1269 |
1270 | 1270 |
1271 %SetCode($Object, function(x) { | 1271 %SetCode($Object, function(x) { |
1272 if (%_IsConstructCall()) { | 1272 if (%_IsConstructCall()) { |
1273 if (x == null) return this; | 1273 if (x == null) return this; |
1274 return ToObject(x); | 1274 return ToObject(x); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 | 1665 |
1666 function SetUpFunction() { | 1666 function SetUpFunction() { |
1667 %CheckIsBootstrapping(); | 1667 %CheckIsBootstrapping(); |
1668 InstallFunctions($Function.prototype, DONT_ENUM, $Array( | 1668 InstallFunctions($Function.prototype, DONT_ENUM, $Array( |
1669 "bind", FunctionBind, | 1669 "bind", FunctionBind, |
1670 "toString", FunctionToString | 1670 "toString", FunctionToString |
1671 )); | 1671 )); |
1672 } | 1672 } |
1673 | 1673 |
1674 SetUpFunction(); | 1674 SetUpFunction(); |
OLD | NEW |