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

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

Issue 23440064: Revert "Turn the NumberToStringStub into a hydrogen stub." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/ia32/code-stubs-ia32.h ('k') | src/ia32/full-codegen-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void ToNumberStub::InitializeInterfaceDescriptor( 57 void ToNumberStub::InitializeInterfaceDescriptor(
58 Isolate* isolate, 58 Isolate* isolate,
59 CodeStubInterfaceDescriptor* descriptor) { 59 CodeStubInterfaceDescriptor* descriptor) {
60 static Register registers[] = { eax }; 60 static Register registers[] = { eax };
61 descriptor->register_param_count_ = 1; 61 descriptor->register_param_count_ = 1;
62 descriptor->register_params_ = registers; 62 descriptor->register_params_ = registers;
63 descriptor->deoptimization_handler_ = NULL; 63 descriptor->deoptimization_handler_ = NULL;
64 } 64 }
65 65
66 66
67 void NumberToStringStub::InitializeInterfaceDescriptor(
68 Isolate* isolate,
69 CodeStubInterfaceDescriptor* descriptor) {
70 static Register registers[] = { eax };
71 descriptor->register_param_count_ = 1;
72 descriptor->register_params_ = registers;
73 descriptor->deoptimization_handler_ = NULL;
74 }
75
76
77 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor( 67 void FastCloneShallowArrayStub::InitializeInterfaceDescriptor(
78 Isolate* isolate, 68 Isolate* isolate,
79 CodeStubInterfaceDescriptor* descriptor) { 69 CodeStubInterfaceDescriptor* descriptor) {
80 static Register registers[] = { eax, ebx, ecx }; 70 static Register registers[] = { eax, ebx, ecx };
81 descriptor->register_param_count_ = 3; 71 descriptor->register_param_count_ = 3;
82 descriptor->register_params_ = registers; 72 descriptor->register_params_ = registers;
83 descriptor->deoptimization_handler_ = 73 descriptor->deoptimization_handler_ =
84 Runtime::FunctionForId(Runtime::kCreateArrayLiteralShallow)->entry; 74 Runtime::FunctionForId(Runtime::kCreateArrayLiteralShallow)->entry;
85 } 75 }
86 76
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after
3770 __ jmp(&loop); 3760 __ jmp(&loop);
3771 3761
3772 __ bind(&done); 3762 __ bind(&done);
3773 __ ret(3 * kPointerSize); 3763 __ ret(3 * kPointerSize);
3774 3764
3775 __ bind(&slowcase); 3765 __ bind(&slowcase);
3776 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1); 3766 __ TailCallRuntime(Runtime::kRegExpConstructResult, 3, 1);
3777 } 3767 }
3778 3768
3779 3769
3770 void NumberToStringStub::Generate(MacroAssembler* masm) {
3771 Label runtime;
3772
3773 __ mov(ebx, Operand(esp, kPointerSize));
3774
3775 // Generate code to lookup number in the number string cache.
3776 __ LookupNumberStringCache(ebx, eax, ecx, edx, &runtime);
3777 __ ret(1 * kPointerSize);
3778
3779 __ bind(&runtime);
3780 // Handle number to string in the runtime system if not found in the cache.
3781 __ TailCallRuntime(Runtime::kNumberToStringSkipCache, 1, 1);
3782 }
3783
3784
3780 static int NegativeComparisonResult(Condition cc) { 3785 static int NegativeComparisonResult(Condition cc) {
3781 ASSERT(cc != equal); 3786 ASSERT(cc != equal);
3782 ASSERT((cc == less) || (cc == less_equal) 3787 ASSERT((cc == less) || (cc == less_equal)
3783 || (cc == greater) || (cc == greater_equal)); 3788 || (cc == greater) || (cc == greater_equal));
3784 return (cc == greater || cc == greater_equal) ? LESS : GREATER; 3789 return (cc == greater || cc == greater_equal) ? LESS : GREATER;
3785 } 3790 }
3786 3791
3787 3792
3788 static void CheckInputType(MacroAssembler* masm, 3793 static void CheckInputType(MacroAssembler* masm,
3789 Register input, 3794 Register input,
(...skipping 3662 matching lines...) Expand 10 before | Expand all | Expand 10 after
7452 __ bind(&fast_elements_case); 7457 __ bind(&fast_elements_case);
7453 GenerateCase(masm, FAST_ELEMENTS); 7458 GenerateCase(masm, FAST_ELEMENTS);
7454 } 7459 }
7455 7460
7456 7461
7457 #undef __ 7462 #undef __
7458 7463
7459 } } // namespace v8::internal 7464 } } // namespace v8::internal
7460 7465
7461 #endif // V8_TARGET_ARCH_IA32 7466 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698