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

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

Issue 160452: Fix debug printing of pointers, and a keyed store with smi index error, in X6... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 4 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/string-stream.cc ('k') | test/cctest/cctest.status » ('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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 // Check that the receiver does not require access checks. We need 417 // Check that the receiver does not require access checks. We need
418 // to do this because this generic stub does not perform map checks. 418 // to do this because this generic stub does not perform map checks.
419 __ testb(FieldOperand(rcx, Map::kBitFieldOffset), 419 __ testb(FieldOperand(rcx, Map::kBitFieldOffset),
420 Immediate(1 << Map::kIsAccessCheckNeeded)); 420 Immediate(1 << Map::kIsAccessCheckNeeded));
421 __ j(not_zero, &slow); 421 __ j(not_zero, &slow);
422 // Get the key from the stack. 422 // Get the key from the stack.
423 __ movq(rbx, Operand(rsp, 1 * kPointerSize)); // 1 ~ return address 423 __ movq(rbx, Operand(rsp, 1 * kPointerSize)); // 1 ~ return address
424 // Check that the key is a smi. 424 // Check that the key is a smi.
425 __ testl(rbx, Immediate(kSmiTagMask)); 425 __ testl(rbx, Immediate(kSmiTagMask));
426 __ j(not_zero, &slow); 426 __ j(not_zero, &slow);
427 // If it is a smi, make sure it is zero-extended, so it can be
428 // used as an index in a memory operand.
429 __ movl(rbx, rbx); // Clear the high bits of rbx.
427 430
428 __ CmpInstanceType(rcx, JS_ARRAY_TYPE); 431 __ CmpInstanceType(rcx, JS_ARRAY_TYPE);
429 __ j(equal, &array); 432 __ j(equal, &array);
430 // Check that the object is some kind of JS object. 433 // Check that the object is some kind of JS object.
431 __ CmpInstanceType(rcx, FIRST_JS_OBJECT_TYPE); 434 __ CmpInstanceType(rcx, FIRST_JS_OBJECT_TYPE);
432 __ j(below, &slow); 435 __ j(below, &slow);
433 436
434 // Object case: Check key against length in the elements array. 437 // Object case: Check key against length in the elements array.
435 // rax: value 438 // rax: value
436 // rdx: JSObject 439 // rdx: JSObject
437 // rbx: index (as a smi) 440 // rbx: index (as a smi), zero-extended.
438 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset)); 441 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset));
439 // Check that the object is in fast mode (not dictionary). 442 // Check that the object is in fast mode (not dictionary).
440 __ Cmp(FieldOperand(rcx, HeapObject::kMapOffset), Factory::fixed_array_map()); 443 __ Cmp(FieldOperand(rcx, HeapObject::kMapOffset), Factory::fixed_array_map());
441 __ j(not_equal, &slow); 444 __ j(not_equal, &slow);
442 // Untag the key (for checking against untagged length in the fixed array). 445 // Untag the key (for checking against untagged length in the fixed array).
443 __ movl(rdx, rbx); 446 __ movl(rdx, rbx);
444 __ sarl(rdx, Immediate(kSmiTagSize)); 447 __ sarl(rdx, Immediate(kSmiTagSize));
445 __ cmpl(rdx, FieldOperand(rcx, Array::kLengthOffset)); 448 __ cmpl(rdx, FieldOperand(rcx, Array::kLengthOffset));
446 // rax: value 449 // rax: value
447 // rcx: FixedArray 450 // rcx: FixedArray
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 718
716 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) { 719 void StoreIC::GenerateMegamorphic(MacroAssembler* masm) {
717 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss))); 720 Generate(masm, ExternalReference(IC_Utility(kStoreIC_Miss)));
718 } 721 }
719 722
720 723
721 #undef __ 724 #undef __
722 725
723 726
724 } } // namespace v8::internal 727 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/string-stream.cc ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698