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

Side by Side Diff: src/arm/code-stubs-arm.cc

Issue 683913008: Turn ToNumberStub into a PlatformCodeStub again. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Use branches on ARM as well (better prediction). Created 6 years, 1 month 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 | « no previous file | src/arm64/code-stubs-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3169 matching lines...) Expand 10 before | Expand all | Expand 10 after
3180 __ SmiTag(r3, r3); 3180 __ SmiTag(r3, r3);
3181 StringCharAtGenerator generator(r0, r3, r2, r0, &runtime, &runtime, &runtime, 3181 StringCharAtGenerator generator(r0, r3, r2, r0, &runtime, &runtime, &runtime,
3182 STRING_INDEX_IS_NUMBER, RECEIVER_IS_STRING); 3182 STRING_INDEX_IS_NUMBER, RECEIVER_IS_STRING);
3183 generator.GenerateFast(masm); 3183 generator.GenerateFast(masm);
3184 __ Drop(3); 3184 __ Drop(3);
3185 __ Ret(); 3185 __ Ret();
3186 generator.SkipSlow(masm, &runtime); 3186 generator.SkipSlow(masm, &runtime);
3187 } 3187 }
3188 3188
3189 3189
3190 void ToNumberStub::Generate(MacroAssembler* masm) {
3191 // The ToNumber stub takes one argument in r0.
3192 Label check_heap_number, call_builtin;
3193 __ JumpIfNotSmi(r0, &check_heap_number);
3194 __ Ret();
3195
3196 __ bind(&check_heap_number);
3197 __ ldr(r1, FieldMemOperand(r0, HeapObject::kMapOffset));
3198 __ CompareRoot(r1, Heap::kHeapNumberMapRootIndex);
3199 __ b(ne, &call_builtin);
3200 __ Ret();
3201
3202 __ bind(&call_builtin);
3203 __ push(r0);
3204 __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION);
3205 }
3206
3207
3190 void StringHelper::GenerateFlatOneByteStringEquals( 3208 void StringHelper::GenerateFlatOneByteStringEquals(
3191 MacroAssembler* masm, Register left, Register right, Register scratch1, 3209 MacroAssembler* masm, Register left, Register right, Register scratch1,
3192 Register scratch2, Register scratch3) { 3210 Register scratch2, Register scratch3) {
3193 Register length = scratch1; 3211 Register length = scratch1;
3194 3212
3195 // Compare lengths. 3213 // Compare lengths.
3196 Label strings_not_equal, check_zero_length; 3214 Label strings_not_equal, check_zero_length;
3197 __ ldr(length, FieldMemOperand(left, String::kLengthOffset)); 3215 __ ldr(length, FieldMemOperand(left, String::kLengthOffset));
3198 __ ldr(scratch2, FieldMemOperand(right, String::kLengthOffset)); 3216 __ ldr(scratch2, FieldMemOperand(right, String::kLengthOffset));
3199 __ cmp(length, scratch2); 3217 __ cmp(length, scratch2);
(...skipping 1519 matching lines...) Expand 10 before | Expand all | Expand 10 after
4719 MemOperand(fp, 6 * kPointerSize), 4737 MemOperand(fp, 6 * kPointerSize),
4720 NULL); 4738 NULL);
4721 } 4739 }
4722 4740
4723 4741
4724 #undef __ 4742 #undef __
4725 4743
4726 } } // namespace v8::internal 4744 } } // namespace v8::internal
4727 4745
4728 #endif // V8_TARGET_ARCH_ARM 4746 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/code-stubs-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698