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

Unified Diff: src/code-stubs.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/checks.cc ('k') | src/codegen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
===================================================================
--- src/code-stubs.cc (revision 7267)
+++ src/code-stubs.cc (working copy)
@@ -37,9 +37,9 @@
namespace internal {
bool CodeStub::FindCodeInCache(Code** code_out) {
- int index = Heap::code_stubs()->FindEntry(GetKey());
+ int index = HEAP->code_stubs()->FindEntry(GetKey());
if (index != NumberDictionary::kNotFound) {
- *code_out = Code::cast(Heap::code_stubs()->ValueAt(index));
+ *code_out = Code::cast(HEAP->code_stubs()->ValueAt(index));
return true;
}
return false;
@@ -48,7 +48,7 @@
void CodeStub::GenerateCode(MacroAssembler* masm) {
// Update the static counter each time a new code stub is generated.
- Counters::code_stubs.Increment();
+ COUNTERS->code_stubs()->Increment();
// Nested stubs are not allowed for leafs.
AllowStubCallsScope allow_scope(masm, AllowsStubCalls());
@@ -62,9 +62,9 @@
void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) {
code->set_major_key(MajorKey());
- PROFILE(CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
+ PROFILE(ISOLATE, CodeCreateEvent(Logger::STUB_TAG, code, GetName()));
GDBJIT(AddCode(GDBJITInterface::STUB, GetName(), code));
- Counters::total_stubs_code_size.Increment(code->instruction_size());
+ COUNTERS->total_stubs_code_size()->Increment(code->instruction_size());
#ifdef ENABLE_DISASSEMBLER
if (FLAG_print_code_stubs) {
@@ -101,23 +101,23 @@
static_cast<Code::Kind>(GetCodeKind()),
InLoop(),
GetICState());
- Handle<Code> new_object = Factory::NewCode(
+ Handle<Code> new_object = FACTORY->NewCode(
desc, flags, masm.CodeObject(), NeedsImmovableCode());
RecordCodeGeneration(*new_object, &masm);
FinishCode(*new_object);
// Update the dictionary and the root in Heap.
Handle<NumberDictionary> dict =
- Factory::DictionaryAtNumberPut(
- Handle<NumberDictionary>(Heap::code_stubs()),
+ FACTORY->DictionaryAtNumberPut(
+ Handle<NumberDictionary>(HEAP->code_stubs()),
GetKey(),
new_object);
- Heap::public_set_code_stubs(*dict);
+ HEAP->public_set_code_stubs(*dict);
code = *new_object;
}
- ASSERT(!NeedsImmovableCode() || Heap::lo_space()->Contains(code));
+ ASSERT(!NeedsImmovableCode() || HEAP->lo_space()->Contains(code));
return Handle<Code>(code);
}
@@ -140,7 +140,7 @@
GetICState());
Object* new_object;
{ MaybeObject* maybe_new_object =
- Heap::CreateCode(desc, flags, masm.CodeObject());
+ HEAP->CreateCode(desc, flags, masm.CodeObject());
if (!maybe_new_object->ToObject(&new_object)) return maybe_new_object;
}
code = Code::cast(new_object);
@@ -149,9 +149,9 @@
// Try to update the code cache but do not fail if unable.
MaybeObject* maybe_new_object =
- Heap::code_stubs()->AtNumberPut(GetKey(), code);
+ HEAP->code_stubs()->AtNumberPut(GetKey(), code);
if (maybe_new_object->ToObject(&new_object)) {
- Heap::public_set_code_stubs(NumberDictionary::cast(new_object));
+ HEAP->public_set_code_stubs(NumberDictionary::cast(new_object));
}
}
@@ -202,7 +202,8 @@
const char* InstanceofStub::GetName() {
if (name_ != NULL) return name_;
const int kMaxNameLength = 100;
- name_ = Bootstrapper::AllocateAutoDeletedArray(kMaxNameLength);
+ name_ = Isolate::Current()->bootstrapper()->AllocateAutoDeletedArray(
+ kMaxNameLength);
if (name_ == NULL) return "OOM";
const char* args = "";
« no previous file with comments | « src/checks.cc ('k') | src/codegen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698