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 1132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 | 1143 |
1144 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); | 1144 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); |
1145 masm.set_emit_debug_code(false); | 1145 masm.set_emit_debug_code(false); |
1146 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); | 1146 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); |
1147 CodeDesc desc; | 1147 CodeDesc desc; |
1148 masm.GetCode(&desc); | 1148 masm.GetCode(&desc); |
1149 ASSERT(desc.reloc_size == 0); | 1149 ASSERT(desc.reloc_size == 0); |
1150 | 1150 |
1151 MemoryChunk* chunk = | 1151 MemoryChunk* chunk = |
1152 Isolate::Current()->memory_allocator()->AllocateChunk(desc.instr_size, | 1152 Isolate::Current()->memory_allocator()->AllocateChunk(desc.instr_size, |
1153 desc.instr_size, | |
1154 EXECUTABLE, | 1153 EXECUTABLE, |
1155 NULL); | 1154 NULL); |
1156 if (chunk == NULL) { | 1155 if (chunk == NULL) { |
1157 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table"); | 1156 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table"); |
1158 } | 1157 } |
1159 memcpy(chunk->body(), desc.buffer, desc.instr_size); | 1158 memcpy(chunk->body(), desc.buffer, desc.instr_size); |
1160 CPU::FlushICache(chunk->body(), desc.instr_size); | 1159 CPU::FlushICache(chunk->body(), desc.instr_size); |
1161 return chunk; | 1160 return chunk; |
1162 } | 1161 } |
1163 | 1162 |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1634 | 1633 |
1635 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 1634 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
1636 v->VisitPointer(BitCast<Object**>(&function_)); | 1635 v->VisitPointer(BitCast<Object**>(&function_)); |
1637 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 1636 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
1638 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 1637 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
1639 } | 1638 } |
1640 | 1639 |
1641 #endif // ENABLE_DEBUGGER_SUPPORT | 1640 #endif // ENABLE_DEBUGGER_SUPPORT |
1642 | 1641 |
1643 } } // namespace v8::internal | 1642 } } // namespace v8::internal |
OLD | NEW |