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

Side by Side Diff: src/arm/ic-arm.cc

Issue 7891042: Add asserts to ensure that we: (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 if (id == IC::kCallIC_Miss) { 498 if (id == IC::kCallIC_Miss) {
499 __ IncrementCounter(isolate->counters()->call_miss(), 1, r3, r4); 499 __ IncrementCounter(isolate->counters()->call_miss(), 1, r3, r4);
500 } else { 500 } else {
501 __ IncrementCounter(isolate->counters()->keyed_call_miss(), 1, r3, r4); 501 __ IncrementCounter(isolate->counters()->keyed_call_miss(), 1, r3, r4);
502 } 502 }
503 503
504 // Get the receiver of the function from the stack. 504 // Get the receiver of the function from the stack.
505 __ ldr(r3, MemOperand(sp, argc * kPointerSize)); 505 __ ldr(r3, MemOperand(sp, argc * kPointerSize));
506 506
507 __ EnterInternalFrame(); 507 {
508 FrameScope scope(masm, StackFrame::INTERNAL);
508 509
509 // Push the receiver and the name of the function. 510 // Push the receiver and the name of the function.
510 __ Push(r3, r2); 511 __ Push(r3, r2);
511 512
512 // Call the entry. 513 // Call the entry.
513 __ mov(r0, Operand(2)); 514 __ mov(r0, Operand(2));
514 __ mov(r1, Operand(ExternalReference(IC_Utility(id), isolate))); 515 __ mov(r1, Operand(ExternalReference(IC_Utility(id), isolate)));
515 516
516 CEntryStub stub(1); 517 CEntryStub stub(1);
517 __ CallStub(&stub); 518 __ CallStub(&stub);
518 519
519 // Move result to r1 and leave the internal frame. 520 // Move result to r1 and leave the internal frame.
520 __ mov(r1, Operand(r0)); 521 __ mov(r1, Operand(r0));
521 __ LeaveInternalFrame(); 522 }
522 523
523 // Check if the receiver is a global object of some sort. 524 // Check if the receiver is a global object of some sort.
524 // This can happen only for regular CallIC but not KeyedCallIC. 525 // This can happen only for regular CallIC but not KeyedCallIC.
525 if (id == IC::kCallIC_Miss) { 526 if (id == IC::kCallIC_Miss) {
526 Label invoke, global; 527 Label invoke, global;
527 __ ldr(r2, MemOperand(sp, argc * kPointerSize)); // receiver 528 __ ldr(r2, MemOperand(sp, argc * kPointerSize)); // receiver
528 __ JumpIfSmi(r2, &invoke); 529 __ JumpIfSmi(r2, &invoke);
529 __ CompareObjectType(r2, r3, r3, JS_GLOBAL_OBJECT_TYPE); 530 __ CompareObjectType(r2, r3, r3, JS_GLOBAL_OBJECT_TYPE);
530 __ b(eq, &global); 531 __ b(eq, &global);
531 __ cmp(r3, Operand(JS_BUILTINS_OBJECT_TYPE)); 532 __ cmp(r3, Operand(JS_BUILTINS_OBJECT_TYPE));
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 __ mov(r0, Operand(r2, ASR, kSmiTagSize)); 644 __ mov(r0, Operand(r2, ASR, kSmiTagSize));
644 // r0: untagged index 645 // r0: untagged index
645 __ LoadFromNumberDictionary(&slow_load, r4, r2, r1, r0, r3, r5); 646 __ LoadFromNumberDictionary(&slow_load, r4, r2, r1, r0, r3, r5);
646 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, r0, r3); 647 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, r0, r3);
647 __ jmp(&do_call); 648 __ jmp(&do_call);
648 649
649 __ bind(&slow_load); 650 __ bind(&slow_load);
650 // This branch is taken when calling KeyedCallIC_Miss is neither required 651 // This branch is taken when calling KeyedCallIC_Miss is neither required
651 // nor beneficial. 652 // nor beneficial.
652 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, r0, r3); 653 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, r0, r3);
653 __ EnterInternalFrame(); 654 {
654 __ push(r2); // save the key 655 FrameScope scope(masm, StackFrame::INTERNAL);
655 __ Push(r1, r2); // pass the receiver and the key 656 __ push(r2); // save the key
656 __ CallRuntime(Runtime::kKeyedGetProperty, 2); 657 __ Push(r1, r2); // pass the receiver and the key
657 __ pop(r2); // restore the key 658 __ CallRuntime(Runtime::kKeyedGetProperty, 2);
658 __ LeaveInternalFrame(); 659 __ pop(r2); // restore the key
660 }
659 __ mov(r1, r0); 661 __ mov(r1, r0);
660 __ jmp(&do_call); 662 __ jmp(&do_call);
661 663
662 __ bind(&check_string); 664 __ bind(&check_string);
663 GenerateKeyStringCheck(masm, r2, r0, r3, &index_string, &slow_call); 665 GenerateKeyStringCheck(masm, r2, r0, r3, &index_string, &slow_call);
664 666
665 // The key is known to be a symbol. 667 // The key is known to be a symbol.
666 // If the receiver is a regular JS object with slow properties then do 668 // If the receiver is a regular JS object with slow properties then do
667 // a quick inline probe of the receiver's dictionary. 669 // a quick inline probe of the receiver's dictionary.
668 // Otherwise do the monomorphic cache probe. 670 // Otherwise do the monomorphic cache probe.
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 Register reg = Assembler::GetRn(instr_at_patch); 1619 Register reg = Assembler::GetRn(instr_at_patch);
1618 patcher.masm()->tst(reg, Operand(kSmiTagMask)); 1620 patcher.masm()->tst(reg, Operand(kSmiTagMask));
1619 patcher.EmitCondition(eq); 1621 patcher.EmitCondition(eq);
1620 } 1622 }
1621 } 1623 }
1622 1624
1623 1625
1624 } } // namespace v8::internal 1626 } } // namespace v8::internal
1625 1627
1626 #endif // V8_TARGET_ARCH_ARM 1628 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698