| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); | 106 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); |
| 107 va_list arguments; | 107 va_list arguments; |
| 108 va_start(arguments, format); | 108 va_start(arguments, format); |
| 109 builder.AddFormattedList(format, arguments); | 109 builder.AddFormattedList(format, arguments); |
| 110 va_end(arguments); | 110 va_end(arguments); |
| 111 | 111 |
| 112 // Copy the string before recording it in the assembler to avoid | 112 // Copy the string before recording it in the assembler to avoid |
| 113 // issues when the stack allocated buffer goes out of scope. | 113 // issues when the stack allocated buffer goes out of scope. |
| 114 size_t length = builder.position(); | 114 size_t length = builder.position(); |
| 115 Vector<char> copy = Vector<char>::New(length + 1); | 115 Vector<char> copy = Vector<char>::New(length + 1); |
| 116 memcpy(copy.start(), builder.Finalize(), copy.length()); | 116 OS::MemCopy(copy.start(), builder.Finalize(), copy.length()); |
| 117 masm()->RecordComment(copy.start()); | 117 masm()->RecordComment(copy.start()); |
| 118 } | 118 } |
| 119 | 119 |
| 120 | 120 |
| 121 bool LCodeGen::GeneratePrologue() { | 121 bool LCodeGen::GeneratePrologue() { |
| 122 ASSERT(is_generating()); | 122 ASSERT(is_generating()); |
| 123 | 123 |
| 124 if (info()->IsOptimizing()) { | 124 if (info()->IsOptimizing()) { |
| 125 ProfileEntryHookStub::MaybeCallEntryHook(masm_); | 125 ProfileEntryHookStub::MaybeCallEntryHook(masm_); |
| 126 | 126 |
| (...skipping 5773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5900 __ Subu(scratch, result, scratch); | 5900 __ Subu(scratch, result, scratch); |
| 5901 __ lw(result, FieldMemOperand(scratch, | 5901 __ lw(result, FieldMemOperand(scratch, |
| 5902 FixedArray::kHeaderSize - kPointerSize)); | 5902 FixedArray::kHeaderSize - kPointerSize)); |
| 5903 __ bind(&done); | 5903 __ bind(&done); |
| 5904 } | 5904 } |
| 5905 | 5905 |
| 5906 | 5906 |
| 5907 #undef __ | 5907 #undef __ |
| 5908 | 5908 |
| 5909 } } // namespace v8::internal | 5909 } } // namespace v8::internal |
| OLD | NEW |