| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 | 1079 |
| 1080 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); | 1080 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); |
| 1081 masm.set_emit_debug_code(false); | 1081 masm.set_emit_debug_code(false); |
| 1082 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); | 1082 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); |
| 1083 CodeDesc desc; | 1083 CodeDesc desc; |
| 1084 masm.GetCode(&desc); | 1084 masm.GetCode(&desc); |
| 1085 ASSERT(desc.reloc_size == 0); | 1085 ASSERT(desc.reloc_size == 0); |
| 1086 | 1086 |
| 1087 MemoryChunk* chunk = | 1087 MemoryChunk* chunk = |
| 1088 Isolate::Current()->memory_allocator()->AllocateChunk(desc.instr_size, | 1088 Isolate::Current()->memory_allocator()->AllocateChunk(desc.instr_size, |
| 1089 desc.instr_size, |
| 1089 EXECUTABLE, | 1090 EXECUTABLE, |
| 1090 NULL); | 1091 NULL); |
| 1091 if (chunk == NULL) { | 1092 if (chunk == NULL) { |
| 1092 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table"); | 1093 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table"); |
| 1093 } | 1094 } |
| 1094 memcpy(chunk->body(), desc.buffer, desc.instr_size); | 1095 memcpy(chunk->body(), desc.buffer, desc.instr_size); |
| 1095 CPU::FlushICache(chunk->body(), desc.instr_size); | 1096 CPU::FlushICache(chunk->body(), desc.instr_size); |
| 1096 return chunk; | 1097 return chunk; |
| 1097 } | 1098 } |
| 1098 | 1099 |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1498 | 1499 |
| 1499 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { | 1500 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |
| 1500 v->VisitPointer(BitCast<Object**>(&function_)); | 1501 v->VisitPointer(BitCast<Object**>(&function_)); |
| 1501 v->VisitPointers(parameters_, parameters_ + parameters_count_); | 1502 v->VisitPointers(parameters_, parameters_ + parameters_count_); |
| 1502 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); | 1503 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); |
| 1503 } | 1504 } |
| 1504 | 1505 |
| 1505 #endif // ENABLE_DEBUGGER_SUPPORT | 1506 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1506 | 1507 |
| 1507 } } // namespace v8::internal | 1508 } } // namespace v8::internal |
| OLD | NEW |