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 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1401 | 1401 |
1402 CONVERT_CHECKED(String, subject, args[0]); | 1402 CONVERT_CHECKED(String, subject, args[0]); |
1403 Object* index = args[1]; | 1403 Object* index = args[1]; |
1404 return CharCodeAt(subject, index); | 1404 return CharCodeAt(subject, index); |
1405 } | 1405 } |
1406 | 1406 |
1407 | 1407 |
1408 static Object* Runtime_StringCharAt(Arguments args) { | 1408 static Object* Runtime_StringCharAt(Arguments args) { |
1409 NoHandleAllocation ha; | 1409 NoHandleAllocation ha; |
1410 ASSERT(args.length() == 2); | 1410 ASSERT(args.length() == 2); |
1411 return CharFromCode(Runtime_StringCharCodeAt(args)); | 1411 |
| 1412 CONVERT_CHECKED(String, subject, args[0]); |
| 1413 Object* index = args[1]; |
| 1414 return CharFromCode(CharCodeAt(subject, index)); |
1412 } | 1415 } |
1413 | 1416 |
1414 | 1417 |
1415 static Object* Runtime_CharFromCode(Arguments args) { | 1418 static Object* Runtime_CharFromCode(Arguments args) { |
1416 NoHandleAllocation ha; | 1419 NoHandleAllocation ha; |
1417 ASSERT(args.length() == 1); | 1420 ASSERT(args.length() == 1); |
1418 return CharFromCode(args[0]); | 1421 return CharFromCode(args[0]); |
1419 } | 1422 } |
1420 | 1423 |
1421 // Forward declarations. | 1424 // Forward declarations. |
(...skipping 6617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8039 } else { | 8042 } else { |
8040 // Handle last resort GC and make sure to allow future allocations | 8043 // Handle last resort GC and make sure to allow future allocations |
8041 // to grow the heap without causing GCs (if possible). | 8044 // to grow the heap without causing GCs (if possible). |
8042 Counters::gc_last_resort_from_js.Increment(); | 8045 Counters::gc_last_resort_from_js.Increment(); |
8043 Heap::CollectAllGarbage(false); | 8046 Heap::CollectAllGarbage(false); |
8044 } | 8047 } |
8045 } | 8048 } |
8046 | 8049 |
8047 | 8050 |
8048 } } // namespace v8::internal | 8051 } } // namespace v8::internal |
OLD | NEW |