Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: src/deoptimizer.cc

Issue 9233050: Reduce memory use immediately after boot. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/heap.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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,
1153 EXECUTABLE, 1154 EXECUTABLE,
1154 NULL); 1155 NULL);
1155 if (chunk == NULL) { 1156 if (chunk == NULL) {
1156 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table"); 1157 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table");
1157 } 1158 }
1158 memcpy(chunk->body(), desc.buffer, desc.instr_size); 1159 memcpy(chunk->body(), desc.buffer, desc.instr_size);
1159 CPU::FlushICache(chunk->body(), desc.instr_size); 1160 CPU::FlushICache(chunk->body(), desc.instr_size);
1160 return chunk; 1161 return chunk;
1161 } 1162 }
1162 1163
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 1629
1629 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 1630 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
1630 v->VisitPointer(BitCast<Object**>(&function_)); 1631 v->VisitPointer(BitCast<Object**>(&function_));
1631 v->VisitPointers(parameters_, parameters_ + parameters_count_); 1632 v->VisitPointers(parameters_, parameters_ + parameters_count_);
1632 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 1633 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
1633 } 1634 }
1634 1635
1635 #endif // ENABLE_DEBUGGER_SUPPORT 1636 #endif // ENABLE_DEBUGGER_SUPPORT
1636 1637
1637 } } // namespace v8::internal 1638 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698