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 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 TO_NAME = function TO_NAME() { | 753 TO_NAME = function TO_NAME() { |
754 return %$toName(this); | 754 return %$toName(this); |
755 } | 755 } |
756 | 756 |
757 | 757 |
758 /* ----------------------------------------------- | 758 /* ----------------------------------------------- |
759 - - - J a v a S c r i p t S t u b s - - - | 759 - - - J a v a S c r i p t S t u b s - - - |
760 ----------------------------------------------- | 760 ----------------------------------------------- |
761 */ | 761 */ |
762 | 762 |
763 StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name) { | 763 StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name, i, v) { |
| 764 // i and v are dummy parameters mandated by the InterfaceDescriptor, |
| 765 // (LoadWithVectorDescriptor). |
764 return %_StringGetLength(%_JSValueGetValue(receiver)); | 766 return %_StringGetLength(%_JSValueGetValue(receiver)); |
765 } | 767 } |
766 | 768 |
767 MathFloor_STUB = function MathFloor_STUB(f, i, v) { | 769 MathFloor_STUB = function MathFloor_STUB(f, i, v) { |
768 // |f| is calling function's JSFunction | 770 // |f| is calling function's JSFunction |
769 // |i| is TypeFeedbackVector slot # of callee's CallIC for Math.floor call | 771 // |i| is TypeFeedbackVector slot # of callee's CallIC for Math.floor call |
770 // |v| is the value to floor | 772 // |v| is the value to floor |
771 var r = %_MathFloor(+v); | 773 var r = %_MathFloor(+v); |
772 if (%_IsMinusZero(r)) { | 774 if (%_IsMinusZero(r)) { |
773 // Collect type feedback when the result of the floor is -0. This is | 775 // Collect type feedback when the result of the floor is -0. This is |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1021 $toLength = ToLength; | 1023 $toLength = ToLength; |
1022 $toName = ToName; | 1024 $toName = ToName; |
1023 $toNumber = ToNumber; | 1025 $toNumber = ToNumber; |
1024 $toObject = ToObject; | 1026 $toObject = ToObject; |
1025 $toPositiveInteger = ToPositiveInteger; | 1027 $toPositiveInteger = ToPositiveInteger; |
1026 $toPrimitive = ToPrimitive; | 1028 $toPrimitive = ToPrimitive; |
1027 $toString = ToString; | 1029 $toString = ToString; |
1028 $toUint32 = ToUint32; | 1030 $toUint32 = ToUint32; |
1029 | 1031 |
1030 }) | 1032 }) |
OLD | NEW |