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

Side by Side Diff: src/deoptimizer.cc

Issue 6993022: Report out of memory if we cannot allocate memory for the deoptimization table. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 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
11 // with the distribution. 11 // with the distribution.
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
894 ASSERT(!Serializer::enabled()); 894 ASSERT(!Serializer::enabled());
895 895
896 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); 896 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB);
897 masm.set_emit_debug_code(false); 897 masm.set_emit_debug_code(false);
898 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type); 898 GenerateDeoptimizationEntries(&masm, kNumberOfEntries, type);
899 CodeDesc desc; 899 CodeDesc desc;
900 masm.GetCode(&desc); 900 masm.GetCode(&desc);
901 ASSERT(desc.reloc_size == 0); 901 ASSERT(desc.reloc_size == 0);
902 902
903 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE); 903 LargeObjectChunk* chunk = LargeObjectChunk::New(desc.instr_size, EXECUTABLE);
904 if (chunk == NULL) {
905 V8::FatalProcessOutOfMemory("Not enough memory for deoptimization table");
906 }
904 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size); 907 memcpy(chunk->GetStartAddress(), desc.buffer, desc.instr_size);
905 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size); 908 CPU::FlushICache(chunk->GetStartAddress(), desc.instr_size);
906 return chunk; 909 return chunk;
907 } 910 }
908 911
909 912
910 Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) { 913 Code* Deoptimizer::FindDeoptimizingCodeFromAddress(Address addr) {
911 DeoptimizingCodeListNode* node = 914 DeoptimizingCodeListNode* node =
912 Isolate::Current()->deoptimizer_data()->deoptimizing_code_list_; 915 Isolate::Current()->deoptimizer_data()->deoptimizing_code_list_;
913 while (node != NULL) { 916 while (node != NULL) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1247 } 1250 }
1248 frames_to_skip--; 1251 frames_to_skip--;
1249 } 1252 }
1250 } 1253 }
1251 1254
1252 UNREACHABLE(); 1255 UNREACHABLE();
1253 } 1256 }
1254 1257
1255 1258
1256 } } // namespace v8::internal 1259 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698