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

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

Issue 15806005: fix the compare nil ic (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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/stub-cache.cc ('k') | 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 // 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 164
165 void CompareNilICStub::InitializeInterfaceDescriptor( 165 void CompareNilICStub::InitializeInterfaceDescriptor(
166 Isolate* isolate, 166 Isolate* isolate,
167 CodeStubInterfaceDescriptor* descriptor) { 167 CodeStubInterfaceDescriptor* descriptor) {
168 static Register registers[] = { rax }; 168 static Register registers[] = { rax };
169 descriptor->register_param_count_ = 1; 169 descriptor->register_param_count_ = 1;
170 descriptor->register_params_ = registers; 170 descriptor->register_params_ = registers;
171 descriptor->deoptimization_handler_ = 171 descriptor->deoptimization_handler_ =
172 FUNCTION_ADDR(CompareNilIC_Miss); 172 FUNCTION_ADDR(CompareNilIC_Miss);
173 descriptor->miss_handler_ = 173 descriptor->SetMissHandler(
174 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate); 174 ExternalReference(IC_Utility(IC::kCompareNilIC_Miss), isolate));
175 } 175 }
176 176
177 177
178 #define __ ACCESS_MASM(masm) 178 #define __ ACCESS_MASM(masm)
179 179
180 180
181 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) { 181 void HydrogenCodeStub::GenerateLightweightMiss(MacroAssembler* masm) {
182 // Update the static counter each time a new code stub is generated. 182 // Update the static counter each time a new code stub is generated.
183 Isolate* isolate = masm->isolate(); 183 Isolate* isolate = masm->isolate();
184 isolate->counters()->code_stubs()->Increment(); 184 isolate->counters()->code_stubs()->Increment();
185 185
186 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate); 186 CodeStubInterfaceDescriptor* descriptor = GetInterfaceDescriptor(isolate);
187 int param_count = descriptor->register_param_count_; 187 int param_count = descriptor->register_param_count_;
188 { 188 {
189 // Call the runtime system in a fresh internal frame. 189 // Call the runtime system in a fresh internal frame.
190 FrameScope scope(masm, StackFrame::INTERNAL); 190 FrameScope scope(masm, StackFrame::INTERNAL);
191 ASSERT(descriptor->register_param_count_ == 0 || 191 ASSERT(descriptor->register_param_count_ == 0 ||
192 rax.is(descriptor->register_params_[param_count - 1])); 192 rax.is(descriptor->register_params_[param_count - 1]));
193 // Push arguments 193 // Push arguments
194 for (int i = 0; i < param_count; ++i) { 194 for (int i = 0; i < param_count; ++i) {
195 __ push(descriptor->register_params_[i]); 195 __ push(descriptor->register_params_[i]);
196 } 196 }
197 ExternalReference miss = descriptor->miss_handler_; 197 ExternalReference miss = descriptor->miss_handler();
198 __ CallExternalReference(miss, descriptor->register_param_count_); 198 __ CallExternalReference(miss, descriptor->register_param_count_);
199 } 199 }
200 200
201 __ Ret(); 201 __ Ret();
202 } 202 }
203 203
204 204
205 void ToNumberStub::Generate(MacroAssembler* masm) { 205 void ToNumberStub::Generate(MacroAssembler* masm) {
206 // The ToNumber stub takes one argument in eax. 206 // The ToNumber stub takes one argument in eax.
207 Label check_heap_number, call_builtin; 207 Label check_heap_number, call_builtin;
(...skipping 6846 matching lines...) Expand 10 before | Expand all | Expand 10 after
7054 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET); 7054 __ jmp(generic_construct_stub, RelocInfo::CODE_TARGET);
7055 } 7055 }
7056 } 7056 }
7057 7057
7058 7058
7059 #undef __ 7059 #undef __
7060 7060
7061 } } // namespace v8::internal 7061 } } // namespace v8::internal
7062 7062
7063 #endif // V8_TARGET_ARCH_X64 7063 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/stub-cache.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698