| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 var APPLY_PREPARE; | 58 var APPLY_PREPARE; |
| 59 var REFLECT_APPLY_PREPARE; | 59 var REFLECT_APPLY_PREPARE; |
| 60 var REFLECT_CONSTRUCT_PREPARE; | 60 var REFLECT_CONSTRUCT_PREPARE; |
| 61 var STACK_OVERFLOW; | 61 var STACK_OVERFLOW; |
| 62 var TO_OBJECT; | 62 var TO_OBJECT; |
| 63 var TO_NUMBER; | 63 var TO_NUMBER; |
| 64 var TO_STRING; | 64 var TO_STRING; |
| 65 var TO_NAME; | 65 var TO_NAME; |
| 66 | 66 |
| 67 var StringLengthTF_STUB; | 67 var StringLengthTF_STUB; |
| 68 var StringAddTF_STUB; |
| 68 var MathFloor_STUB; | 69 var MathFloor_STUB; |
| 69 | 70 |
| 70 var $defaultNumber; | 71 var $defaultNumber; |
| 71 var $defaultString; | 72 var $defaultString; |
| 72 var $NaN; | 73 var $NaN; |
| 73 var $nonNumberToNumber; | 74 var $nonNumberToNumber; |
| 74 var $nonStringToString; | 75 var $nonStringToString; |
| 75 var $sameValue; | 76 var $sameValue; |
| 76 var $sameValueZero; | 77 var $sameValueZero; |
| 77 var $toBoolean; | 78 var $toBoolean; |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 - - - J a v a S c r i p t S t u b s - - - | 766 - - - J a v a S c r i p t S t u b s - - - |
| 766 ----------------------------------------------- | 767 ----------------------------------------------- |
| 767 */ | 768 */ |
| 768 | 769 |
| 769 StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name, i, v) { | 770 StringLengthTF_STUB = function StringLengthTF_STUB(receiver, name, i, v) { |
| 770 // i and v are dummy parameters mandated by the InterfaceDescriptor, | 771 // i and v are dummy parameters mandated by the InterfaceDescriptor, |
| 771 // (LoadWithVectorDescriptor). | 772 // (LoadWithVectorDescriptor). |
| 772 return %_StringGetLength(%_JSValueGetValue(receiver)); | 773 return %_StringGetLength(%_JSValueGetValue(receiver)); |
| 773 } | 774 } |
| 774 | 775 |
| 776 StringAddTF_STUB = function StringAddTF_STUB(left, right) { |
| 777 return %StringAdd(left, right); |
| 778 } |
| 779 |
| 775 MathFloor_STUB = function MathFloor_STUB(f, i, v) { | 780 MathFloor_STUB = function MathFloor_STUB(f, i, v) { |
| 776 // |f| is calling function's JSFunction | 781 // |f| is calling function's JSFunction |
| 777 // |i| is TypeFeedbackVector slot # of callee's CallIC for Math.floor call | 782 // |i| is TypeFeedbackVector slot # of callee's CallIC for Math.floor call |
| 778 // |v| is the value to floor | 783 // |v| is the value to floor |
| 779 var r = %_MathFloor(+v); | 784 var r = %_MathFloor(+v); |
| 780 if (%_IsMinusZero(r)) { | 785 if (%_IsMinusZero(r)) { |
| 781 // Collect type feedback when the result of the floor is -0. This is | 786 // Collect type feedback when the result of the floor is -0. This is |
| 782 // accomplished by storing a sentinel in the second, "extra" | 787 // accomplished by storing a sentinel in the second, "extra" |
| 783 // TypeFeedbackVector slot corresponding to the Math.floor CallIC call in | 788 // TypeFeedbackVector slot corresponding to the Math.floor CallIC call in |
| 784 // the caller's TypeVector. | 789 // the caller's TypeVector. |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 $toLength = ToLength; | 1043 $toLength = ToLength; |
| 1039 $toName = ToName; | 1044 $toName = ToName; |
| 1040 $toNumber = ToNumber; | 1045 $toNumber = ToNumber; |
| 1041 $toObject = ToObject; | 1046 $toObject = ToObject; |
| 1042 $toPositiveInteger = ToPositiveInteger; | 1047 $toPositiveInteger = ToPositiveInteger; |
| 1043 $toPrimitive = ToPrimitive; | 1048 $toPrimitive = ToPrimitive; |
| 1044 $toString = ToString; | 1049 $toString = ToString; |
| 1045 $toUint32 = ToUint32; | 1050 $toUint32 = ToUint32; |
| 1046 | 1051 |
| 1047 }) | 1052 }) |
| OLD | NEW |