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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 11818021: Allocation Info Tracking, continued. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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 | « no previous file | src/arm/macro-assembler-arm.h » ('j') | src/heap.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 3f5660a914120b3b4e728bfc0869d3ffe83ece33..a20610754006737b00b7312c11bef17a260dc885 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -63,6 +63,10 @@ void TransitionElementsKindStub::InitializeInterfaceDescriptor(
static void InitializeArrayConstructorDescriptor(Isolate* isolate,
CodeStubInterfaceDescriptor* descriptor) {
+ // register state
+ // r1 -- constructor function
+ // r2 -- type info cell with elements kind
+ // r0 -- number of arguments to the constructor function
static Register registers[] = { r1, r2 };
descriptor->register_param_count_ = 2;
// stack param count needs (constructor pointer, and single argument)
@@ -5639,20 +5643,12 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
TypeFeedbackCells::MonomorphicArraySentinel(LAST_FAST_ELEMENTS_KIND);
__ cmp(r3, Operand(terminal_kind_sentinel));
__ b(ne, &miss);
- // Load the global or builtins object from the current context
- __ ldr(r3, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ ldr(r3, FieldMemOperand(r3, GlobalObject::kGlobalContextOffset));
// Make sure the function is the Array() function
- __ ldr(r3,
- MemOperand(r3, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
+ __ LoadArrayFunction(r3);
__ cmp(r1, r3);
- Label megamorphic_pre;
- __ b(ne, &megamorphic_pre);
+ __ b(ne, &megamorphic);
__ jmp(&done);
- __ bind(&megamorphic_pre);
- __ jmp(&megamorphic);
-
__ bind(&miss);
// A monomorphic miss (i.e, here the cache is not uninitialized) goes
@@ -5668,11 +5664,8 @@ static void GenerateRecordCallTarget(MacroAssembler* masm) {
// An uninitialized cache is patched with the function or sentinel to
// indicate the ElementsKind if function is the Array constructor.
__ bind(&initialize);
- __ ldr(r3, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
- __ ldr(r3, FieldMemOperand(r3, GlobalObject::kGlobalContextOffset));
- __ ldr(r3,
- MemOperand(r3, Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX)));
// Make sure the function is the Array() function
+ __ LoadArrayFunction(r3);
__ cmp(r1, r3);
__ b(ne, &not_array_function);
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | src/heap.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698