| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 char buffer[4 * KB]; | 120 char buffer[4 * KB]; |
| 121 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); | 121 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); |
| 122 va_list arguments; | 122 va_list arguments; |
| 123 va_start(arguments, format); | 123 va_start(arguments, format); |
| 124 builder.AddFormattedList(format, arguments); | 124 builder.AddFormattedList(format, arguments); |
| 125 va_end(arguments); | 125 va_end(arguments); |
| 126 | 126 |
| 127 // Copy the string before recording it in the assembler to avoid | 127 // Copy the string before recording it in the assembler to avoid |
| 128 // issues when the stack allocated buffer goes out of scope. | 128 // issues when the stack allocated buffer goes out of scope. |
| 129 size_t length = builder.position(); | 129 size_t length = builder.position(); |
| 130 Vector<char> copy = Vector<char>::New(length + 1); | 130 Vector<char> copy = Vector<char>::New(static_cast<int>(length) + 1); |
| 131 OS::MemCopy(copy.start(), builder.Finalize(), copy.length()); | 131 OS::MemCopy(copy.start(), builder.Finalize(), copy.length()); |
| 132 masm()->RecordComment(copy.start()); | 132 masm()->RecordComment(copy.start()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 | 135 |
| 136 int LCodeGenBase::GetNextEmittedBlock() const { | 136 int LCodeGenBase::GetNextEmittedBlock() const { |
| 137 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { | 137 for (int i = current_block_ + 1; i < graph()->blocks()->length(); ++i) { |
| 138 if (!chunk_->GetLabel(i)->HasReplacement()) return i; | 138 if (!chunk_->GetLabel(i)->HasReplacement()) return i; |
| 139 } | 139 } |
| 140 return -1; | 140 return -1; |
| 141 } | 141 } |
| 142 | 142 |
| 143 | 143 |
| 144 } } // namespace v8::internal | 144 } } // namespace v8::internal |
| OLD | NEW |