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

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

Issue 714573003: X87: Turn ToNumberStub into a PlatformCodeStub again. (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@bleeding_edge
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | 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_X87 7 #if V8_TARGET_ARCH_X87
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 2844 matching lines...) Expand 10 before | Expand all | Expand 10 after
2855 // edx: from index (smi) 2855 // edx: from index (smi)
2856 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime, 2856 StringCharAtGenerator generator(eax, edx, ecx, eax, &runtime, &runtime,
2857 &runtime, STRING_INDEX_IS_NUMBER, 2857 &runtime, STRING_INDEX_IS_NUMBER,
2858 RECEIVER_IS_STRING); 2858 RECEIVER_IS_STRING);
2859 generator.GenerateFast(masm); 2859 generator.GenerateFast(masm);
2860 __ ret(3 * kPointerSize); 2860 __ ret(3 * kPointerSize);
2861 generator.SkipSlow(masm, &runtime); 2861 generator.SkipSlow(masm, &runtime);
2862 } 2862 }
2863 2863
2864 2864
2865 void ToNumberStub::Generate(MacroAssembler* masm) {
2866 // The ToNumber stub takes one argument in eax.
2867 Label check_heap_number, call_builtin;
2868 __ JumpIfNotSmi(eax, &check_heap_number, Label::kNear);
2869 __ Ret();
2870
2871 __ bind(&check_heap_number);
2872 __ CompareMap(eax, masm->isolate()->factory()->heap_number_map());
2873 __ j(not_equal, &call_builtin, Label::kNear);
2874 __ Ret();
2875
2876 __ bind(&call_builtin);
2877 __ pop(ecx); // Pop return address.
2878 __ push(eax);
2879 __ push(ecx); // Push return address.
2880 __ InvokeBuiltin(Builtins::TO_NUMBER, JUMP_FUNCTION);
2881 }
2882
2883
2865 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm, 2884 void StringHelper::GenerateFlatOneByteStringEquals(MacroAssembler* masm,
2866 Register left, 2885 Register left,
2867 Register right, 2886 Register right,
2868 Register scratch1, 2887 Register scratch1,
2869 Register scratch2) { 2888 Register scratch2) {
2870 Register length = scratch1; 2889 Register length = scratch1;
2871 2890
2872 // Compare lengths. 2891 // Compare lengths.
2873 Label strings_not_equal, check_zero_length; 2892 Label strings_not_equal, check_zero_length;
2874 __ mov(length, FieldOperand(left, String::kLengthOffset)); 2893 __ mov(length, FieldOperand(left, String::kLengthOffset));
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
4400 Operand(ebp, 7 * kPointerSize), 4419 Operand(ebp, 7 * kPointerSize),
4401 NULL); 4420 NULL);
4402 } 4421 }
4403 4422
4404 4423
4405 #undef __ 4424 #undef __
4406 4425
4407 } } // namespace v8::internal 4426 } } // namespace v8::internal
4408 4427
4409 #endif // V8_TARGET_ARCH_X87 4428 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698