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

Side by Side Diff: src/arm/full-codegen-arm.cc

Issue 2843010: ARM: Load the heap number map into a register and keep it... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2138 matching lines...) Expand 10 before | Expand all | Expand 10 after
2149 Apply(context_, r0); 2149 Apply(context_, r0);
2150 } 2150 }
2151 2151
2152 2152
2153 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) { 2153 void FullCodeGenerator::EmitRandomHeapNumber(ZoneList<Expression*>* args) {
2154 ASSERT(args->length() == 0); 2154 ASSERT(args->length() == 0);
2155 2155
2156 Label slow_allocate_heapnumber; 2156 Label slow_allocate_heapnumber;
2157 Label heapnumber_allocated; 2157 Label heapnumber_allocated;
2158 2158
2159 __ AllocateHeapNumber(r4, r1, r2, &slow_allocate_heapnumber); 2159 __ LoadRoot(r6, Heap::kHeapNumberMapRootIndex);
2160 __ AllocateHeapNumber(r4, r1, r2, r6, &slow_allocate_heapnumber);
2160 __ jmp(&heapnumber_allocated); 2161 __ jmp(&heapnumber_allocated);
2161 2162
2162 __ bind(&slow_allocate_heapnumber); 2163 __ bind(&slow_allocate_heapnumber);
2163 // To allocate a heap number, and ensure that it is not a smi, we 2164 // To allocate a heap number, and ensure that it is not a smi, we
2164 // call the runtime function FUnaryMinus on 0, returning the double 2165 // call the runtime function FUnaryMinus on 0, returning the double
2165 // -0.0. A new, distinct heap number is returned each time. 2166 // -0.0. A new, distinct heap number is returned each time.
2166 __ mov(r0, Operand(Smi::FromInt(0))); 2167 __ mov(r0, Operand(Smi::FromInt(0)));
2167 __ push(r0); 2168 __ push(r0);
2168 __ CallRuntime(Runtime::kNumberUnaryMinus, 1); 2169 __ CallRuntime(Runtime::kNumberUnaryMinus, 1);
2169 __ mov(r4, Operand(r0)); 2170 __ mov(r4, Operand(r0));
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
3150 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. 3151 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value.
3151 __ add(pc, r1, Operand(masm_->CodeObject())); 3152 __ add(pc, r1, Operand(masm_->CodeObject()));
3152 } 3153 }
3153 3154
3154 3155
3155 #undef __ 3156 #undef __
3156 3157
3157 } } // namespace v8::internal 3158 } } // namespace v8::internal
3158 3159
3159 #endif // V8_TARGET_ARCH_ARM 3160 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/codegen-arm.cc ('k') | src/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698