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

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

Issue 7039004: Add enumeration to specify if smi check needed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: move to common header Created 9 years, 7 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 | « no previous file | src/arm/macro-assembler-arm.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 Label is_smi; 1362 Label is_smi;
1363 Label load_result_from_cache; 1363 Label load_result_from_cache;
1364 if (!object_is_smi) { 1364 if (!object_is_smi) {
1365 __ JumpIfSmi(object, &is_smi); 1365 __ JumpIfSmi(object, &is_smi);
1366 if (CpuFeatures::IsSupported(VFP3)) { 1366 if (CpuFeatures::IsSupported(VFP3)) {
1367 CpuFeatures::Scope scope(VFP3); 1367 CpuFeatures::Scope scope(VFP3);
1368 __ CheckMap(object, 1368 __ CheckMap(object,
1369 scratch1, 1369 scratch1,
1370 Heap::kHeapNumberMapRootIndex, 1370 Heap::kHeapNumberMapRootIndex,
1371 not_found, 1371 not_found,
1372 true); 1372 DONT_DO_SMI_CHECK);
1373 1373
1374 STATIC_ASSERT(8 == kDoubleSize); 1374 STATIC_ASSERT(8 == kDoubleSize);
1375 __ add(scratch1, 1375 __ add(scratch1,
1376 object, 1376 object,
1377 Operand(HeapNumber::kValueOffset - kHeapObjectTag)); 1377 Operand(HeapNumber::kValueOffset - kHeapObjectTag));
1378 __ ldm(ia, scratch1, scratch1.bit() | scratch2.bit()); 1378 __ ldm(ia, scratch1, scratch1.bit() | scratch2.bit());
1379 __ eor(scratch1, scratch1, Operand(scratch2)); 1379 __ eor(scratch1, scratch1, Operand(scratch2));
1380 __ and_(scratch1, scratch1, Operand(mask)); 1380 __ and_(scratch1, scratch1, Operand(mask));
1381 1381
1382 // Calculate address of entry in string cache: each entry consists 1382 // Calculate address of entry in string cache: each entry consists
(...skipping 1631 matching lines...) Expand 10 before | Expand all | Expand 10 after
3014 // of the double into r2, r3. 3014 // of the double into r2, r3.
3015 __ IntegerToDoubleConversionWithVFP3(r0, r3, r2); 3015 __ IntegerToDoubleConversionWithVFP3(r0, r3, r2);
3016 __ b(&loaded); 3016 __ b(&loaded);
3017 3017
3018 __ bind(&input_not_smi); 3018 __ bind(&input_not_smi);
3019 // Check if input is a HeapNumber. 3019 // Check if input is a HeapNumber.
3020 __ CheckMap(r0, 3020 __ CheckMap(r0,
3021 r1, 3021 r1,
3022 Heap::kHeapNumberMapRootIndex, 3022 Heap::kHeapNumberMapRootIndex,
3023 &calculate, 3023 &calculate,
3024 true); 3024 DONT_DO_SMI_CHECK);
3025 // Input is a HeapNumber. Load it to a double register and store the 3025 // Input is a HeapNumber. Load it to a double register and store the
3026 // low and high words into r2, r3. 3026 // low and high words into r2, r3.
3027 __ vldr(d0, FieldMemOperand(r0, HeapNumber::kValueOffset)); 3027 __ vldr(d0, FieldMemOperand(r0, HeapNumber::kValueOffset));
3028 __ vmov(r2, r3, d0); 3028 __ vmov(r2, r3, d0);
3029 } else { 3029 } else {
3030 // Input is untagged double in d2. Output goes to d2. 3030 // Input is untagged double in d2. Output goes to d2.
3031 __ vmov(r2, r3, d2); 3031 __ vmov(r2, r3, d2);
3032 } 3032 }
3033 __ bind(&loaded); 3033 __ bind(&loaded);
3034 // r2 = low 32 bits of double value 3034 // r2 = low 32 bits of double value
(...skipping 1647 matching lines...) Expand 10 before | Expand all | Expand 10 after
4682 MacroAssembler* masm, const RuntimeCallHelper& call_helper) { 4682 MacroAssembler* masm, const RuntimeCallHelper& call_helper) {
4683 __ Abort("Unexpected fallthrough to CharCodeAt slow case"); 4683 __ Abort("Unexpected fallthrough to CharCodeAt slow case");
4684 4684
4685 // Index is not a smi. 4685 // Index is not a smi.
4686 __ bind(&index_not_smi_); 4686 __ bind(&index_not_smi_);
4687 // If index is a heap number, try converting it to an integer. 4687 // If index is a heap number, try converting it to an integer.
4688 __ CheckMap(index_, 4688 __ CheckMap(index_,
4689 scratch_, 4689 scratch_,
4690 Heap::kHeapNumberMapRootIndex, 4690 Heap::kHeapNumberMapRootIndex,
4691 index_not_number_, 4691 index_not_number_,
4692 true); 4692 DONT_DO_SMI_CHECK);
4693 call_helper.BeforeCall(masm); 4693 call_helper.BeforeCall(masm);
4694 __ Push(object_, index_); 4694 __ Push(object_, index_);
4695 __ push(index_); // Consumed by runtime conversion function. 4695 __ push(index_); // Consumed by runtime conversion function.
4696 if (index_flags_ == STRING_INDEX_IS_NUMBER) { 4696 if (index_flags_ == STRING_INDEX_IS_NUMBER) {
4697 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); 4697 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
4698 } else { 4698 } else {
4699 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); 4699 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
4700 // NumberToSmi discards numbers that are not exact integers. 4700 // NumberToSmi discards numbers that are not exact integers.
4701 __ CallRuntime(Runtime::kNumberToSmi, 1); 4701 __ CallRuntime(Runtime::kNumberToSmi, 1);
4702 } 4702 }
(...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after
6365 __ mov(result, Operand(0)); 6365 __ mov(result, Operand(0));
6366 __ Ret(); 6366 __ Ret();
6367 } 6367 }
6368 6368
6369 6369
6370 #undef __ 6370 #undef __
6371 6371
6372 } } // namespace v8::internal 6372 } } // namespace v8::internal
6373 6373
6374 #endif // V8_TARGET_ARCH_ARM 6374 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698