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

Side by Side Diff: src/ia32/code-stubs-ia32.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 | « src/arm/stub-cache-arm.cc ('k') | src/ia32/ic-ia32.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 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 4652 matching lines...) Expand 10 before | Expand all | Expand 10 after
4663 void StringCharCodeAtGenerator::GenerateSlow( 4663 void StringCharCodeAtGenerator::GenerateSlow(
4664 MacroAssembler* masm, const RuntimeCallHelper& call_helper) { 4664 MacroAssembler* masm, const RuntimeCallHelper& call_helper) {
4665 __ Abort("Unexpected fallthrough to CharCodeAt slow case"); 4665 __ Abort("Unexpected fallthrough to CharCodeAt slow case");
4666 4666
4667 // Index is not a smi. 4667 // Index is not a smi.
4668 __ bind(&index_not_smi_); 4668 __ bind(&index_not_smi_);
4669 // If index is a heap number, try converting it to an integer. 4669 // If index is a heap number, try converting it to an integer.
4670 __ CheckMap(index_, 4670 __ CheckMap(index_,
4671 masm->isolate()->factory()->heap_number_map(), 4671 masm->isolate()->factory()->heap_number_map(),
4672 index_not_number_, 4672 index_not_number_,
4673 true); 4673 DONT_DO_SMI_CHECK);
4674 call_helper.BeforeCall(masm); 4674 call_helper.BeforeCall(masm);
4675 __ push(object_); 4675 __ push(object_);
4676 __ push(index_); 4676 __ push(index_);
4677 __ push(index_); // Consumed by runtime conversion function. 4677 __ push(index_); // Consumed by runtime conversion function.
4678 if (index_flags_ == STRING_INDEX_IS_NUMBER) { 4678 if (index_flags_ == STRING_INDEX_IS_NUMBER) {
4679 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1); 4679 __ CallRuntime(Runtime::kNumberToIntegerMapMinusZero, 1);
4680 } else { 4680 } else {
4681 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX); 4681 ASSERT(index_flags_ == STRING_INDEX_IS_ARRAY_INDEX);
4682 // NumberToSmi discards numbers that are not exact integers. 4682 // NumberToSmi discards numbers that are not exact integers.
4683 __ CallRuntime(Runtime::kNumberToSmi, 1); 4683 __ CallRuntime(Runtime::kNumberToSmi, 1);
(...skipping 1466 matching lines...) Expand 10 before | Expand all | Expand 10 after
6150 __ Drop(1); 6150 __ Drop(1);
6151 __ ret(2 * kPointerSize); 6151 __ ret(2 * kPointerSize);
6152 } 6152 }
6153 6153
6154 6154
6155 #undef __ 6155 #undef __
6156 6156
6157 } } // namespace v8::internal 6157 } } // namespace v8::internal
6158 6158
6159 #endif // V8_TARGET_ARCH_IA32 6159 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698