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

Side by Side Diff: src/ic/x64/handler-compiler-x64.cc

Issue 530343005: Clean up code stubs and ensure distinct major keys. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/ic/call-optimization.h" 9 #include "src/ic/call-optimization.h"
10 #include "src/ic/handler-compiler.h" 10 #include "src/ic/handler-compiler.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); 269 masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset());
270 } 270 }
271 271
272 // Restore context register. 272 // Restore context register.
273 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); 273 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset));
274 } 274 }
275 __ ret(0); 275 __ ret(0);
276 } 276 }
277 277
278 278
279 void ElementHandlerCompiler::GenerateLoadDictionaryElement(
280 MacroAssembler* masm) {
281 // ----------- S t a t e -------------
282 // -- rcx : key
283 // -- rdx : receiver
284 // -- rsp[0] : return address
285 // -----------------------------------
286 DCHECK(rdx.is(LoadDescriptor::ReceiverRegister()));
287 DCHECK(rcx.is(LoadDescriptor::NameRegister()));
288 Label slow, miss;
289
290 // This stub is meant to be tail-jumped to, the receiver must already
291 // have been verified by the caller to not be a smi.
292
293 __ JumpIfNotSmi(rcx, &miss);
294 __ SmiToInteger32(rbx, rcx);
295 __ movp(rax, FieldOperand(rdx, JSObject::kElementsOffset));
296
297 // Check whether the elements is a number dictionary.
298 // rdx: receiver
299 // rcx: key
300 // rbx: key as untagged int32
301 // rax: elements
302 __ LoadFromNumberDictionary(&slow, rax, rcx, rbx, r9, rdi, rax);
303 __ ret(0);
304
305 __ bind(&slow);
306 // ----------- S t a t e -------------
307 // -- rcx : key
308 // -- rdx : receiver
309 // -- rsp[0] : return address
310 // -----------------------------------
311 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Slow);
312
313 __ bind(&miss);
314 // ----------- S t a t e -------------
315 // -- rcx : key
316 // -- rdx : receiver
317 // -- rsp[0] : return address
318 // -----------------------------------
319 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
320 }
321
322
323 static void StoreIC_PushArgs(MacroAssembler* masm) { 279 static void StoreIC_PushArgs(MacroAssembler* masm) {
324 Register receiver = StoreDescriptor::ReceiverRegister(); 280 Register receiver = StoreDescriptor::ReceiverRegister();
325 Register name = StoreDescriptor::NameRegister(); 281 Register name = StoreDescriptor::NameRegister();
326 Register value = StoreDescriptor::ValueRegister(); 282 Register value = StoreDescriptor::ValueRegister();
327 283
328 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value)); 284 DCHECK(!rbx.is(receiver) && !rbx.is(name) && !rbx.is(value));
329 285
330 __ PopReturnAddressTo(rbx); 286 __ PopReturnAddressTo(rbx);
331 __ Push(receiver); 287 __ Push(receiver);
332 __ Push(name); 288 __ Push(name);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 // Return the generated code. 827 // Return the generated code.
872 return GetCode(kind(), Code::NORMAL, name); 828 return GetCode(kind(), Code::NORMAL, name);
873 } 829 }
874 830
875 831
876 #undef __ 832 #undef __
877 } 833 }
878 } // namespace v8::internal 834 } // namespace v8::internal
879 835
880 #endif // V8_TARGET_ARCH_X64 836 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698