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

Unified Diff: src/disassembler.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 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/disasm.h ('k') | src/execution.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disassembler.cc
===================================================================
--- src/disassembler.cc (revision 7267)
+++ src/disassembler.cc (working copy)
@@ -65,24 +65,24 @@
Code* code() const { return code_; }
private:
Code* code_;
+
+ EmbeddedVector<char, 128> v8_buffer_;
};
const char* V8NameConverter::NameOfAddress(byte* pc) const {
- static v8::internal::EmbeddedVector<char, 128> buffer;
-
- const char* name = Builtins::Lookup(pc);
+ const char* name = Isolate::Current()->builtins()->Lookup(pc);
if (name != NULL) {
- OS::SNPrintF(buffer, "%s (%p)", name, pc);
- return buffer.start();
+ OS::SNPrintF(v8_buffer_, "%s (%p)", name, pc);
+ return v8_buffer_.start();
}
if (code_ != NULL) {
int offs = static_cast<int>(pc - code_->instruction_start());
// print as code offset, if it seems reasonable
if (0 <= offs && offs < code_->instruction_size()) {
- OS::SNPrintF(buffer, "%d (%p)", offs, pc);
- return buffer.start();
+ OS::SNPrintF(v8_buffer_, "%d (%p)", offs, pc);
+ return v8_buffer_.start();
}
}
@@ -115,6 +115,7 @@
NoHandleAllocation ha;
AssertNoAllocation no_alloc;
ExternalReferenceEncoder ref_encoder;
+ Heap* heap = HEAP;
v8::internal::EmbeddedVector<char, 128> decode_buffer;
v8::internal::EmbeddedVector<char, kOutBufferSize> out_buffer;
@@ -256,8 +257,8 @@
} else if (kind == Code::STUB) {
// Reverse lookup required as the minor key cannot be retrieved
// from the code object.
- Object* obj = Heap::code_stubs()->SlowReverseLookup(code);
- if (obj != Heap::undefined_value()) {
+ Object* obj = heap->code_stubs()->SlowReverseLookup(code);
+ if (obj != heap->undefined_value()) {
ASSERT(obj->IsSmi());
// Get the STUB key and extract major and minor key.
uint32_t key = Smi::cast(obj)->value();
« no previous file with comments | « src/disasm.h ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698