| OLD | NEW |
| 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 331 } |
| 332 | 332 |
| 333 | 333 |
| 334 | 334 |
| 335 /* ----------------------------- | 335 /* ----------------------------- |
| 336 - - - H e l p e r s - - - | 336 - - - H e l p e r s - - - |
| 337 ----------------------------- | 337 ----------------------------- |
| 338 */ | 338 */ |
| 339 | 339 |
| 340 // ECMA-262, section 11.4.1, page 46. | 340 // ECMA-262, section 11.4.1, page 46. |
| 341 function DELETE(key) { | 341 function DELETE(key, strict) { |
| 342 return %DeleteProperty(%ToObject(this), %ToString(key)); | 342 return %DeleteProperty(%ToObject(this), %ToString(key), strict); |
| 343 } | 343 } |
| 344 | 344 |
| 345 | 345 |
| 346 // ECMA-262, section 11.8.7, page 54. | 346 // ECMA-262, section 11.8.7, page 54. |
| 347 function IN(x) { | 347 function IN(x) { |
| 348 if (!IS_SPEC_OBJECT(x)) { | 348 if (!IS_SPEC_OBJECT(x)) { |
| 349 throw %MakeTypeError('invalid_in_operator_use', [this, x]); | 349 throw %MakeTypeError('invalid_in_operator_use', [this, x]); |
| 350 } | 350 } |
| 351 return %_IsNonNegativeSmi(this) ? %HasElement(x, this) : %HasProperty(x, %ToSt
ring(this)); | 351 return %_IsNonNegativeSmi(this) ? %HasElement(x, this) : %HasProperty(x, %ToSt
ring(this)); |
| 352 } | 352 } |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 throw %MakeTypeError('cannot_convert_to_primitive', []); | 634 throw %MakeTypeError('cannot_convert_to_primitive', []); |
| 635 } | 635 } |
| 636 | 636 |
| 637 | 637 |
| 638 // NOTE: Setting the prototype for Array must take place as early as | 638 // NOTE: Setting the prototype for Array must take place as early as |
| 639 // possible due to code generation for array literals. When | 639 // possible due to code generation for array literals. When |
| 640 // generating code for a array literal a boilerplate array is created | 640 // generating code for a array literal a boilerplate array is created |
| 641 // that is cloned when running the code. It is essiential that the | 641 // that is cloned when running the code. It is essiential that the |
| 642 // boilerplate gets the right prototype. | 642 // boilerplate gets the right prototype. |
| 643 %FunctionSetPrototype($Array, new $Array(0)); | 643 %FunctionSetPrototype($Array, new $Array(0)); |
| OLD | NEW |