| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 } | 926 } |
| 927 | 927 |
| 928 | 928 |
| 929 LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) { | 929 LargeObjectChunk* Deoptimizer::CreateCode(BailoutType type) { |
| 930 // We cannot run this if the serializer is enabled because this will | 930 // We cannot run this if the serializer is enabled because this will |
| 931 // cause us to emit relocation information for the external | 931 // cause us to emit relocation information for the external |
| 932 // references. This is fine because the deoptimizer's code section | 932 // references. This is fine because the deoptimizer's code section |
| 933 // isn't meant to be serialized at all. | 933 // isn't meant to be serialized at all. |
| 934 ASSERT(!Serializer::enabled()); | 934 ASSERT(!Serializer::enabled()); |
| 935 | 935 |
| 936 MacroAssembler masm(NULL, 16 * KB); | 936 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); |
| 937 masm.set_emit_debug_code(false); | 937 masm.set_emit_debug_code(false); |
| 938 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); | 938 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); |
| 939 CodeDesc desc; | 939 CodeDesc desc; |
| 940 masm.GetCode(&desc); | 940 masm.GetCode(&desc); |
| 941 ASSERT(desc.reloc_size == 0); | 941 ASSERT(desc.reloc_size == 0); |
| 942 | 942 |
| 943 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE); | 943 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE); |
| 944 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); | 944 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); |
| 945 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); | 945 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); |
| 946 return chunk; | 946 return chunk; |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1287 } | 1287 } |
| 1288 frames_to_skip--; | 1288 frames_to_skip--; |
| 1289 } | 1289 } |
| 1290 } | 1290 } |
| 1291 | 1291 |
| 1292 UNREACHABLE(); | 1292 UNREACHABLE(); |
| 1293 } | 1293 } |
| 1294 | 1294 |
| 1295 | 1295 |
| 1296 } } // namespace v8::internal | 1296 } } // namespace v8::internal |
| OLD | NEW |