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

Unified Diff: src/disassembler.cc

Issue 12300018: Made Isolate a mandatory parameter for everything Handle-related. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed CreateCode calls. Be nicer to MIPS. 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/disassembler.h ('k') | src/elements.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disassembler.cc
diff --git a/src/disassembler.cc b/src/disassembler.cc
index 05d6b9bde29817eae6dc71912dc4c4c69da9e563..5d18d6819c488ef703897842cd831da1448cafe6 100644
--- a/src/disassembler.cc
+++ b/src/disassembler.cc
@@ -111,11 +111,12 @@ static void DumpBuffer(FILE* f, StringBuilder* out) {
static const int kOutBufferSize = 2048 + String::kMaxShortPrintLength;
static const int kRelocInfoPosition = 57;
-static int DecodeIt(FILE* f,
+static int DecodeIt(Isolate* isolate,
+ FILE* f,
const V8NameConverter& converter,
byte* begin,
byte* end) {
- NoHandleAllocation ha;
+ NoHandleAllocation ha(isolate);
AssertNoAllocation no_alloc;
ExternalReferenceEncoder ref_encoder;
Heap* heap = HEAP;
@@ -282,7 +283,7 @@ static int DecodeIt(FILE* f,
out.AddFormatted(" (id = %d)", static_cast<int>(relocinfo.data()));
}
} else if (rmode == RelocInfo::RUNTIME_ENTRY &&
- Isolate::Current()->deoptimizer_data() != NULL) {
+ isolate->deoptimizer_data() != NULL) {
// A runtime entry reloinfo might be a deoptimization bailout.
Address addr = relocinfo.target_address();
int id = Deoptimizer::GetDeoptimizationId(addr, Deoptimizer::EAGER);
@@ -319,14 +320,15 @@ static int DecodeIt(FILE* f,
}
-int Disassembler::Decode(FILE* f, byte* begin, byte* end) {
+int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) {
V8NameConverter defaultConverter(NULL);
- return DecodeIt(f, defaultConverter, begin, end);
+ return DecodeIt(isolate, f, defaultConverter, begin, end);
}
// Called by Code::CodePrint.
void Disassembler::Decode(FILE* f, Code* code) {
+ Isolate* isolate = code->GetIsolate();
int decode_size = (code->kind() == Code::OPTIMIZED_FUNCTION ||
code->kind() == Code::COMPILED_STUB)
? static_cast<int>(code->safepoint_table_offset())
@@ -340,13 +342,15 @@ void Disassembler::Decode(FILE* f, Code* code) {
byte* begin = code->instruction_start();
byte* end = begin + decode_size;
V8NameConverter v8NameConverter(code);
- DecodeIt(f, v8NameConverter, begin, end);
+ DecodeIt(isolate, f, v8NameConverter, begin, end);
}
#else // ENABLE_DISASSEMBLER
void Disassembler::Dump(FILE* f, byte* begin, byte* end) {}
-int Disassembler::Decode(FILE* f, byte* begin, byte* end) { return 0; }
+int Disassembler::Decode(Isolate* isolate, FILE* f, byte* begin, byte* end) {
+ return 0;
+}
void Disassembler::Decode(FILE* f, Code* code) {}
#endif // ENABLE_DISASSEMBLER
« no previous file with comments | « src/disassembler.h ('k') | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698