OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
718 p = &buffer[kBufferSize] - space; | 718 p = &buffer[kBufferSize] - space; |
719 | 719 |
720 for (unsigned i = 0; i < ARRAY_SIZE(args); i++) { | 720 for (unsigned i = 0; i < ARRAY_SIZE(args); i++) { |
721 if (space > 0) { | 721 if (space > 0) { |
722 *p++ = ' '; | 722 *p++ = ' '; |
723 space--; | 723 space--; |
724 if (space > 0) { | 724 if (space > 0) { |
725 MaybeObject* maybe_arg = args->GetElement(i); | 725 MaybeObject* maybe_arg = args->GetElement(i); |
726 Handle<String> arg_str(reinterpret_cast<String*>(maybe_arg)); | 726 Handle<String> arg_str(reinterpret_cast<String*>(maybe_arg)); |
727 const char* arg = *arg_str->ToCString(); | 727 const char* arg = *arg_str->ToCString(); |
728 Vector<char> v2(p, space); | 728 Vector<char> v2(p, static_cast<int>(space)); |
Erik Corry
2012/06/19 12:43:04
LGTM
| |
729 OS::StrNCpy(v2, arg, space); | 729 OS::StrNCpy(v2, arg, space); |
730 space -= Min(space, strlen(arg)); | 730 space -= Min(space, strlen(arg)); |
731 p = &buffer[kBufferSize] - space; | 731 p = &buffer[kBufferSize] - space; |
732 } | 732 } |
733 } | 733 } |
734 } | 734 } |
735 if (space > 0) { | 735 if (space > 0) { |
736 *p = '\0'; | 736 *p = '\0'; |
737 } else { | 737 } else { |
738 buffer[kBufferSize - 1] = '\0'; | 738 buffer[kBufferSize - 1] = '\0'; |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1509 | 1509 |
1510 | 1510 |
1511 Handle<Object> Factory::ToBoolean(bool value) { | 1511 Handle<Object> Factory::ToBoolean(bool value) { |
1512 return Handle<Object>(value | 1512 return Handle<Object>(value |
1513 ? isolate()->heap()->true_value() | 1513 ? isolate()->heap()->true_value() |
1514 : isolate()->heap()->false_value()); | 1514 : isolate()->heap()->false_value()); |
1515 } | 1515 } |
1516 | 1516 |
1517 | 1517 |
1518 } } // namespace v8::internal | 1518 } } // namespace v8::internal |
OLD | NEW |