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 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This files contains runtime support implemented in JavaScript. | 5 // This files contains runtime support implemented in JavaScript. |
6 | 6 |
7 // CAUTION: Some of the functions specified in this file are called | 7 // CAUTION: Some of the functions specified in this file are called |
8 // directly from compiled code. These are the functions with names in | 8 // directly from compiled code. These are the functions with names in |
9 // ALL CAPS. The compiled code passes the first argument in 'this'. | 9 // ALL CAPS. The compiled code passes the first argument in 'this'. |
10 | 10 |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 } | 502 } |
503 | 503 |
504 | 504 |
505 /* ----------------------------- | 505 /* ----------------------------- |
506 - - - H e l p e r s - - - | 506 - - - H e l p e r s - - - |
507 ----------------------------- | 507 ----------------------------- |
508 */ | 508 */ |
509 | 509 |
510 // ECMA-262, section 11.4.1, page 46. | 510 // ECMA-262, section 11.4.1, page 46. |
511 DELETE = function DELETE(key, language_mode) { | 511 DELETE = function DELETE(key, language_mode) { |
512 return %DeleteProperty(%$toObject(this), %$toName(key), language_mode); | 512 return %DeleteProperty(%$toObject(this), key, language_mode); |
513 } | 513 } |
514 | 514 |
515 | 515 |
516 // ECMA-262, section 11.8.7, page 54. | 516 // ECMA-262, section 11.8.7, page 54. |
517 IN = function IN(x) { | 517 IN = function IN(x) { |
518 if (!IS_SPEC_OBJECT(x)) { | 518 if (!IS_SPEC_OBJECT(x)) { |
519 throw %MakeTypeError(kInvalidInOperatorUse, this, x); | 519 throw %MakeTypeError(kInvalidInOperatorUse, this, x); |
520 } | 520 } |
521 if (%_IsNonNegativeSmi(this)) { | 521 if (%_IsNonNegativeSmi(this)) { |
522 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) { | 522 if (IS_ARRAY(x) && %_HasFastPackedElements(x)) { |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 $toLength = ToLength; | 1041 $toLength = ToLength; |
1042 $toName = ToName; | 1042 $toName = ToName; |
1043 $toNumber = ToNumber; | 1043 $toNumber = ToNumber; |
1044 $toObject = ToObject; | 1044 $toObject = ToObject; |
1045 $toPositiveInteger = ToPositiveInteger; | 1045 $toPositiveInteger = ToPositiveInteger; |
1046 $toPrimitive = ToPrimitive; | 1046 $toPrimitive = ToPrimitive; |
1047 $toString = ToString; | 1047 $toString = ToString; |
1048 $toUint32 = ToUint32; | 1048 $toUint32 = ToUint32; |
1049 | 1049 |
1050 }) | 1050 }) |
OLD | NEW |