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

Unified Diff: src/deoptimizer.cc

Issue 12314152: Miscellaneous profile-driven Isolate plumbing. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/deoptimizer.cc
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc
index 98c4ac2c89141a4b0c3e54193166a72a65880b31..71e4f45d30e82841ac941ee07ea9672e36fc361d 100644
--- a/src/deoptimizer.cc
+++ b/src/deoptimizer.cc
@@ -634,18 +634,19 @@ void Deoptimizer::DeleteFrameDescriptions() {
}
-Address Deoptimizer::GetDeoptimizationEntry(int id,
+Address Deoptimizer::GetDeoptimizationEntry(Isolate* isolate,
+ int id,
BailoutType type,
GetEntryMode mode) {
ASSERT(id >= 0);
if (id >= kMaxNumberOfEntries) return NULL;
MemoryChunk* base = NULL;
if (mode == ENSURE_ENTRY_CODE) {
- EnsureCodeForDeoptimizationEntry(type, id);
+ EnsureCodeForDeoptimizationEntry(isolate, type, id);
} else {
ASSERT(mode == CALCULATE_ENTRY_ADDRESS);
}
- DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
+ DeoptimizerData* data = isolate->deoptimizer_data();
if (type == EAGER) {
base = data->eager_deoptimization_entry_code_;
} else {
@@ -1568,14 +1569,15 @@ void Deoptimizer::AddDoubleValue(intptr_t slot_address, double value) {
}
-void Deoptimizer::EnsureCodeForDeoptimizationEntry(BailoutType type,
+void Deoptimizer::EnsureCodeForDeoptimizationEntry(Isolate* isolate,
+ BailoutType type,
int max_entry_id) {
// We cannot run this if the serializer is enabled because this will
// cause us to emit relocation information for the external
// references. This is fine because the deoptimizer's code section
// isn't meant to be serialized at all.
ASSERT(type == EAGER || type == LAZY);
- DeoptimizerData* data = Isolate::Current()->deoptimizer_data();
+ DeoptimizerData* data = isolate->deoptimizer_data();
int entry_count = (type == EAGER)
? data->eager_deoptimization_entry_code_entries_
: data->lazy_deoptimization_entry_code_entries_;
@@ -1584,7 +1586,7 @@ void Deoptimizer::EnsureCodeForDeoptimizationEntry(BailoutType type,
while (max_entry_id >= entry_count) entry_count *= 2;
ASSERT(entry_count <= Deoptimizer::kMaxNumberOfEntries);
- MacroAssembler masm(Isolate::Current(), NULL, 16 * KB);
+ MacroAssembler masm(isolate, NULL, 16 * KB);
masm.set_emit_debug_code(false);
GenerateDeoptimizationEntries(&masm, entry_count, type);
CodeDesc desc;
« no previous file with comments | « src/deoptimizer.h ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698