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

Side by Side Diff: src/deoptimizer.cc

Issue 11864005: Merged r13237 into 3.15 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.15
Patch Set: Created 7 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 | « no previous file | src/version.cc » ('j') | no next file with comments »
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 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 // references. This is fine because the deoptimizer's code section 1404 // references. This is fine because the deoptimizer's code section
1405 // isn't meant to be serialized at all. 1405 // isn't meant to be serialized at all.
1406 ASSERT(!Serializer::enabled()); 1406 ASSERT(!Serializer::enabled());
1407 1407
1408 ASSERT(type == EAGER || type == LAZY); 1408 ASSERT(type == EAGER || type == LAZY);
1409 DeoptimizerData* data = Isolate::Current()->deoptimizer_data(); 1409 DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
1410 int entry_count = (type == EAGER) 1410 int entry_count = (type == EAGER)
1411 ? data->eager_deoptimization_entry_code_entries_ 1411 ? data->eager_deoptimization_entry_code_entries_
1412 : data->lazy_deoptimization_entry_code_entries_; 1412 : data->lazy_deoptimization_entry_code_entries_;
1413 if (max_entry_id < entry_count) return; 1413 if (max_entry_id < entry_count) return;
1414 entry_count = Min(Max(entry_count * 2, Deoptimizer::kMinNumberOfEntries), 1414 entry_count = Max(entry_count, Deoptimizer::kMinNumberOfEntries);
1415 Deoptimizer::kMaxNumberOfEntries); 1415 while (max_entry_id >= entry_count) entry_count *= 2;
1416 ASSERT(entry_count <= Deoptimizer::kMaxNumberOfEntries);
1416 1417
1417 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB); 1418 MacroAssembler masm(Isolate::Current(), NULL, 16 * KB);
1418 masm.set_emit_debug_code(false); 1419 masm.set_emit_debug_code(false);
1419 GenerateDeoptimizationEntries(&masm, entry_count, type); 1420 GenerateDeoptimizationEntries(&masm, entry_count, type);
1420 CodeDesc desc; 1421 CodeDesc desc;
1421 masm.GetCode(&desc); 1422 masm.GetCode(&desc);
1422 ASSERT(desc.reloc_size == 0); 1423 ASSERT(desc.reloc_size == 0);
1423 1424
1424 VirtualMemory* memory = type == EAGER 1425 VirtualMemory* memory = type == EAGER
1425 ? data->eager_deoptimization_entry_code_ 1426 ? data->eager_deoptimization_entry_code_
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 2023
2023 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { 2024 void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) {
2024 v->VisitPointer(BitCast<Object**>(&function_)); 2025 v->VisitPointer(BitCast<Object**>(&function_));
2025 v->VisitPointers(parameters_, parameters_ + parameters_count_); 2026 v->VisitPointers(parameters_, parameters_ + parameters_count_);
2026 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_); 2027 v->VisitPointers(expression_stack_, expression_stack_ + expression_count_);
2027 } 2028 }
2028 2029
2029 #endif // ENABLE_DEBUGGER_SUPPORT 2030 #endif // ENABLE_DEBUGGER_SUPPORT
2030 2031
2031 } } // namespace v8::internal 2032 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/version.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698