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

Unified Diff: src/ia32/macro-assembler-ia32.cc

Issue 10615002: Track allocation info (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Diff with b_e Created 8 years, 2 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/ia32/macro-assembler-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/macro-assembler-ia32.cc
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc
index 0d0bf037751a8361f785844b9cc21fd198459568..169e440448aa7d8c5bc9bcc62ada3b5f28ad1e1a 100644
--- a/src/ia32/macro-assembler-ia32.cc
+++ b/src/ia32/macro-assembler-ia32.cc
@@ -2328,6 +2328,52 @@ void MacroAssembler::LoadInitialArrayMap(
}
+void test_routine(Object* context, Object* function) {
+ context->Print();
+ function->Print();
+}
+
+void MacroAssembler::LoadInitialArrayMap(Register function_in,
+ Register elements_kind,
+ Register map_out) {
+ Label miss, done;
+ mov(map_out, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
+ mov(map_out, FieldOperand(map_out, GlobalObject::kGlobalContextOffset));
+ mov(map_out, Operand(map_out,
+ Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
+ cmp(function_in, Operand(map_out,
+ Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
+ j(not_equal, &miss);
+ mov(map_out, FieldOperand(map_out, elements_kind,
+ times_half_pointer_size,
+ FixedArrayBase::kHeaderSize));
+ jmp(&done);
+ bind(&miss);
+ mov(map_out, FieldOperand(function_in,
+ JSFunction::kPrototypeOrInitialMapOffset));
+ bind(&done);
+}
+
+void MacroAssembler::LoadInitialArrayMap(Register function_in,
+ ElementsKind elements_kind,
+ Register map_out) {
+ Label miss, done;
+ mov(map_out, Operand(esi, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
+ mov(map_out, FieldOperand(map_out, GlobalObject::kGlobalContextOffset));
+ mov(map_out, Operand(map_out,
+ Context::SlotOffset(Context::JS_ARRAY_MAPS_INDEX)));
+ cmp(function_in, Operand(map_out,
+ Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
+ j(not_equal, &miss);
+ int offset = FixedArray::kHeaderSize + elements_kind * kPointerSize;
+ mov(map_out, FieldOperand(map_out, offset));
+ jmp(&done);
+ bind(&miss);
+ mov(map_out, FieldOperand(function_in,
+ JSFunction::kPrototypeOrInitialMapOffset));
+ bind(&done);
+}
+
void MacroAssembler::LoadGlobalFunction(int index, Register function) {
// Load the global or builtins object from the current context.
mov(function,
« no previous file with comments | « src/ia32/macro-assembler-ia32.h ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698