| 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 5557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5568 #ifdef DEBUG | 5568 #ifdef DEBUG |
| 5569 for (int i = 0; i < length; ++i) { | 5569 for (int i = 0; i < length; ++i) { |
| 5570 ASSERT(String::cast(elements->get(i))->length() == 1); | 5570 ASSERT(String::cast(elements->get(i))->length() == 1); |
| 5571 } | 5571 } |
| 5572 #endif | 5572 #endif |
| 5573 | 5573 |
| 5574 return *Factory::NewJSArrayWithElements(elements); | 5574 return *Factory::NewJSArrayWithElements(elements); |
| 5575 } | 5575 } |
| 5576 | 5576 |
| 5577 | 5577 |
| 5578 static Object* Runtime_NewStringWrapper(Arguments args) { |
| 5579 NoHandleAllocation ha; |
| 5580 ASSERT(args.length() == 1); |
| 5581 CONVERT_CHECKED(String, value, args[0]); |
| 5582 return value->ToObject(); |
| 5583 } |
| 5584 |
| 5585 |
| 5578 bool Runtime::IsUpperCaseChar(uint16_t ch) { | 5586 bool Runtime::IsUpperCaseChar(uint16_t ch) { |
| 5579 unibrow::uchar chars[unibrow::ToUppercase::kMaxWidth]; | 5587 unibrow::uchar chars[unibrow::ToUppercase::kMaxWidth]; |
| 5580 int char_length = to_upper_mapping.get(ch, 0, chars); | 5588 int char_length = to_upper_mapping.get(ch, 0, chars); |
| 5581 return char_length == 0; | 5589 return char_length == 0; |
| 5582 } | 5590 } |
| 5583 | 5591 |
| 5584 | 5592 |
| 5585 static Object* Runtime_NumberToString(Arguments args) { | 5593 static Object* Runtime_NumberToString(Arguments args) { |
| 5586 NoHandleAllocation ha; | 5594 NoHandleAllocation ha; |
| 5587 ASSERT(args.length() == 1); | 5595 ASSERT(args.length() == 1); |
| (...skipping 5130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10718 } else { | 10726 } else { |
| 10719 // Handle last resort GC and make sure to allow future allocations | 10727 // Handle last resort GC and make sure to allow future allocations |
| 10720 // to grow the heap without causing GCs (if possible). | 10728 // to grow the heap without causing GCs (if possible). |
| 10721 Counters::gc_last_resort_from_js.Increment(); | 10729 Counters::gc_last_resort_from_js.Increment(); |
| 10722 Heap::CollectAllGarbage(false); | 10730 Heap::CollectAllGarbage(false); |
| 10723 } | 10731 } |
| 10724 } | 10732 } |
| 10725 | 10733 |
| 10726 | 10734 |
| 10727 } } // namespace v8::internal | 10735 } } // namespace v8::internal |
| OLD | NEW |