OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 5590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5601 | 5601 |
5602 static Object* Runtime_NumberUnaryMinus(Arguments args) { | 5602 static Object* Runtime_NumberUnaryMinus(Arguments args) { |
5603 NoHandleAllocation ha; | 5603 NoHandleAllocation ha; |
5604 ASSERT(args.length() == 1); | 5604 ASSERT(args.length() == 1); |
5605 | 5605 |
5606 CONVERT_DOUBLE_CHECKED(x, args[0]); | 5606 CONVERT_DOUBLE_CHECKED(x, args[0]); |
5607 return Heap::NumberFromDouble(-x); | 5607 return Heap::NumberFromDouble(-x); |
5608 } | 5608 } |
5609 | 5609 |
5610 | 5610 |
| 5611 static Object* Runtime_NumberAlloc(Arguments args) { |
| 5612 NoHandleAllocation ha; |
| 5613 ASSERT(args.length() == 0); |
| 5614 |
| 5615 return Heap::NumberFromDouble(9876543210.0); |
| 5616 } |
| 5617 |
| 5618 |
5611 static Object* Runtime_NumberDiv(Arguments args) { | 5619 static Object* Runtime_NumberDiv(Arguments args) { |
5612 NoHandleAllocation ha; | 5620 NoHandleAllocation ha; |
5613 ASSERT(args.length() == 2); | 5621 ASSERT(args.length() == 2); |
5614 | 5622 |
5615 CONVERT_DOUBLE_CHECKED(x, args[0]); | 5623 CONVERT_DOUBLE_CHECKED(x, args[0]); |
5616 CONVERT_DOUBLE_CHECKED(y, args[1]); | 5624 CONVERT_DOUBLE_CHECKED(y, args[1]); |
5617 return Heap::NumberFromDouble(x / y); | 5625 return Heap::NumberFromDouble(x / y); |
5618 } | 5626 } |
5619 | 5627 |
5620 | 5628 |
(...skipping 4915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10536 } else { | 10544 } else { |
10537 // Handle last resort GC and make sure to allow future allocations | 10545 // Handle last resort GC and make sure to allow future allocations |
10538 // to grow the heap without causing GCs (if possible). | 10546 // to grow the heap without causing GCs (if possible). |
10539 Counters::gc_last_resort_from_js.Increment(); | 10547 Counters::gc_last_resort_from_js.Increment(); |
10540 Heap::CollectAllGarbage(false); | 10548 Heap::CollectAllGarbage(false); |
10541 } | 10549 } |
10542 } | 10550 } |
10543 | 10551 |
10544 | 10552 |
10545 } } // namespace v8::internal | 10553 } } // namespace v8::internal |
OLD | NEW |