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

Side by Side Diff: src/deoptimizer.cc

Issue 9179012: Reduce boot-up memory use of V8. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 11 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 | « src/d8.cc ('k') | src/heap.cc » ('j') | src/spaces.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/heap.cc » ('j') | src/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698