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

Side by Side Diff: src/arm/stub-cache-arm.cc

Issue 7860035: Merge bleeding edge up to 9192 into the GC branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/gc
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/regexp-macro-assembler-arm.cc ('k') | src/array.js » ('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 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after
3508 __ ldr(ip, FieldMemOperand(r3, ExternalArray::kLengthOffset)); 3508 __ ldr(ip, FieldMemOperand(r3, ExternalArray::kLengthOffset));
3509 __ cmp(key, ip); 3509 __ cmp(key, ip);
3510 // Unsigned comparison catches both negative and too-large values. 3510 // Unsigned comparison catches both negative and too-large values.
3511 __ b(hs, &miss_force_generic); 3511 __ b(hs, &miss_force_generic);
3512 3512
3513 __ ldr(r3, FieldMemOperand(r3, ExternalArray::kExternalPointerOffset)); 3513 __ ldr(r3, FieldMemOperand(r3, ExternalArray::kExternalPointerOffset));
3514 // r3: base pointer of external storage 3514 // r3: base pointer of external storage
3515 3515
3516 // We are not untagging smi key and instead work with it 3516 // We are not untagging smi key and instead work with it
3517 // as if it was premultiplied by 2. 3517 // as if it was premultiplied by 2.
3518 ASSERT((kSmiTag == 0) && (kSmiTagSize == 1)); 3518 STATIC_ASSERT((kSmiTag == 0) && (kSmiTagSize == 1));
3519 3519
3520 Register value = r2; 3520 Register value = r2;
3521 switch (elements_kind) { 3521 switch (elements_kind) {
3522 case JSObject::EXTERNAL_BYTE_ELEMENTS: 3522 case JSObject::EXTERNAL_BYTE_ELEMENTS:
3523 __ ldrsb(value, MemOperand(r3, key, LSR, 1)); 3523 __ ldrsb(value, MemOperand(r3, key, LSR, 1));
3524 break; 3524 break;
3525 case JSObject::EXTERNAL_PIXEL_ELEMENTS: 3525 case JSObject::EXTERNAL_PIXEL_ELEMENTS:
3526 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: 3526 case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS:
3527 __ ldrb(value, MemOperand(r3, key, LSR, 1)); 3527 __ ldrb(value, MemOperand(r3, key, LSR, 1));
3528 break; 3528 break;
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
4158 __ ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset)); 4158 __ ldr(r2, FieldMemOperand(r1, JSObject::kElementsOffset));
4159 __ AssertFastElements(r2); 4159 __ AssertFastElements(r2);
4160 4160
4161 // Check that the key is within bounds. 4161 // Check that the key is within bounds.
4162 __ ldr(r3, FieldMemOperand(r2, FixedArray::kLengthOffset)); 4162 __ ldr(r3, FieldMemOperand(r2, FixedArray::kLengthOffset));
4163 __ cmp(r0, Operand(r3)); 4163 __ cmp(r0, Operand(r3));
4164 __ b(hs, &miss_force_generic); 4164 __ b(hs, &miss_force_generic);
4165 4165
4166 // Load the result and make sure it's not the hole. 4166 // Load the result and make sure it's not the hole.
4167 __ add(r3, r2, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4167 __ add(r3, r2, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4168 ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); 4168 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
4169 __ ldr(r4, 4169 __ ldr(r4,
4170 MemOperand(r3, r0, LSL, kPointerSizeLog2 - kSmiTagSize)); 4170 MemOperand(r3, r0, LSL, kPointerSizeLog2 - kSmiTagSize));
4171 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 4171 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
4172 __ cmp(r4, ip); 4172 __ cmp(r4, ip);
4173 __ b(eq, &miss_force_generic); 4173 __ b(eq, &miss_force_generic);
4174 __ mov(r0, r4); 4174 __ mov(r0, r4);
4175 __ Ret(); 4175 __ Ret();
4176 4176
4177 __ bind(&miss_force_generic); 4177 __ bind(&miss_force_generic);
4178 Code* stub = masm->isolate()->builtins()->builtin( 4178 Code* stub = masm->isolate()->builtins()->builtin(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 __ ldr(scratch, FieldMemOperand(receiver_reg, JSArray::kLengthOffset)); 4290 __ ldr(scratch, FieldMemOperand(receiver_reg, JSArray::kLengthOffset));
4291 } else { 4291 } else {
4292 __ ldr(scratch, FieldMemOperand(elements_reg, FixedArray::kLengthOffset)); 4292 __ ldr(scratch, FieldMemOperand(elements_reg, FixedArray::kLengthOffset));
4293 } 4293 }
4294 // Compare smis. 4294 // Compare smis.
4295 __ cmp(key_reg, scratch); 4295 __ cmp(key_reg, scratch);
4296 __ b(hs, &miss_force_generic); 4296 __ b(hs, &miss_force_generic);
4297 4297
4298 __ add(scratch, 4298 __ add(scratch,
4299 elements_reg, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); 4299 elements_reg, Operand(FixedArray::kHeaderSize - kHeapObjectTag));
4300 ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); 4300 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2);
4301 __ add(scratch, 4301 __ add(scratch,
4302 scratch, 4302 scratch,
4303 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); 4303 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize));
4304 __ str(value_reg, MemOperand(scratch)); 4304 __ str(value_reg, MemOperand(scratch));
4305 __ mov(receiver_reg, value_reg); 4305 __ mov(receiver_reg, value_reg);
4306 __ RecordWrite(elements_reg, // Object. 4306 __ RecordWrite(elements_reg, // Object.
4307 scratch, // Address. 4307 scratch, // Address.
4308 receiver_reg, // Value. 4308 receiver_reg, // Value.
4309 kLRHasNotBeenSaved, 4309 kLRHasNotBeenSaved,
4310 kDontSaveFPRegs); 4310 kDontSaveFPRegs);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
4444 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); 4444 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric();
4445 __ Jump(ic, RelocInfo::CODE_TARGET); 4445 __ Jump(ic, RelocInfo::CODE_TARGET);
4446 } 4446 }
4447 4447
4448 4448
4449 #undef __ 4449 #undef __
4450 4450
4451 } } // namespace v8::internal 4451 } } // namespace v8::internal
4452 4452
4453 #endif // V8_TARGET_ARCH_ARM 4453 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/regexp-macro-assembler-arm.cc ('k') | src/array.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698