| 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 5879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6006 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 6006 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 6007 __ ldr(result, FieldMemOperand(scratch, | 6007 __ ldr(result, FieldMemOperand(scratch, |
| 6008 FixedArray::kHeaderSize - kPointerSize)); | 6008 FixedArray::kHeaderSize - kPointerSize)); |
| 6009 __ bind(&done); | 6009 __ bind(&done); |
| 6010 } | 6010 } |
| 6011 | 6011 |
| 6012 | 6012 |
| 6013 #undef __ | 6013 #undef __ |
| 6014 | 6014 |
| 6015 } } // namespace v8::internal | 6015 } } // namespace v8::internal |
| OLD | NEW |