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

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

Issue 71163006: Merge bleeding_edge r17376:17693. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Fix all.gyp Created 7 years, 1 month 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/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.h » ('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 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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 __ LoadFromNumberDictionary(&slow_load, t0, a2, a1, a0, a3, t1); 571 __ LoadFromNumberDictionary(&slow_load, t0, a2, a1, a0, a3, t1);
572 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, a0, a3); 572 __ IncrementCounter(counters->keyed_call_generic_smi_dict(), 1, a0, a3);
573 __ jmp(&do_call); 573 __ jmp(&do_call);
574 574
575 __ bind(&slow_load); 575 __ bind(&slow_load);
576 // This branch is taken when calling KeyedCallIC_Miss is neither required 576 // This branch is taken when calling KeyedCallIC_Miss is neither required
577 // nor beneficial. 577 // nor beneficial.
578 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, a0, a3); 578 __ IncrementCounter(counters->keyed_call_generic_slow_load(), 1, a0, a3);
579 { 579 {
580 FrameScope scope(masm, StackFrame::INTERNAL); 580 FrameScope scope(masm, StackFrame::INTERNAL);
581 __ push(a2); // Save the key. 581 __ Push(a2, a1, a2); // Save the key and pass the receiver and the key.
582 __ Push(a1, a2); // Pass the receiver and the key.
583 __ CallRuntime(Runtime::kKeyedGetProperty, 2); 582 __ CallRuntime(Runtime::kKeyedGetProperty, 2);
584 __ pop(a2); // Restore the key. 583 __ pop(a2); // Restore the key.
585 } 584 }
586 __ mov(a1, v0); 585 __ mov(a1, v0);
587 __ jmp(&do_call); 586 __ jmp(&do_call);
588 587
589 __ bind(&check_name); 588 __ bind(&check_name);
590 GenerateKeyNameCheck(masm, a2, a0, a3, &index_name, &slow_call); 589 GenerateKeyNameCheck(masm, a2, a0, a3, &index_name, &slow_call);
591 590
592 // The key is known to be a unique name. 591 // The key is known to be a unique name.
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1174 1173
1175 // Fast case: Do the store, could be either Object or double. 1174 // Fast case: Do the store, could be either Object or double.
1176 __ bind(fast_object); 1175 __ bind(fast_object);
1177 Register scratch_value = t0; 1176 Register scratch_value = t0;
1178 Register address = t1; 1177 Register address = t1;
1179 if (check_map == kCheckMap) { 1178 if (check_map == kCheckMap) {
1180 __ lw(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset)); 1179 __ lw(elements_map, FieldMemOperand(elements, HeapObject::kMapOffset));
1181 __ Branch(fast_double, ne, elements_map, 1180 __ Branch(fast_double, ne, elements_map,
1182 Operand(masm->isolate()->factory()->fixed_array_map())); 1181 Operand(masm->isolate()->factory()->fixed_array_map()));
1183 } 1182 }
1183
1184 // HOLECHECK: guards "A[i] = V"
1185 // We have to go to the runtime if the current value is the hole because
1186 // there may be a callback on the element.
1187 Label holecheck_passed1;
1188 __ Addu(address, elements, FixedArray::kHeaderSize - kHeapObjectTag);
1189 __ sll(at, key, kPointerSizeLog2 - kSmiTagSize);
1190 __ addu(address, address, at);
1191 __ lw(scratch_value, MemOperand(address));
1192 __ Branch(&holecheck_passed1, ne, scratch_value,
1193 Operand(masm->isolate()->factory()->the_hole_value()));
1194 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
1195 slow);
1196
1197 __ bind(&holecheck_passed1);
1198
1184 // Smi stores don't require further checks. 1199 // Smi stores don't require further checks.
1185 Label non_smi_value; 1200 Label non_smi_value;
1186 __ JumpIfNotSmi(value, &non_smi_value); 1201 __ JumpIfNotSmi(value, &non_smi_value);
1187 1202
1188 if (increment_length == kIncrementLength) { 1203 if (increment_length == kIncrementLength) {
1189 // Add 1 to receiver->length. 1204 // Add 1 to receiver->length.
1190 __ Addu(scratch_value, key, Operand(Smi::FromInt(1))); 1205 __ Addu(scratch_value, key, Operand(Smi::FromInt(1)));
1191 __ sw(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset)); 1206 __ sw(scratch_value, FieldMemOperand(receiver, JSArray::kLengthOffset));
1192 } 1207 }
1193 // It's irrelevant whether array is smi-only or not when writing a smi. 1208 // It's irrelevant whether array is smi-only or not when writing a smi.
(...skipping 30 matching lines...) Expand all
1224 OMIT_SMI_CHECK); 1239 OMIT_SMI_CHECK);
1225 __ Ret(); 1240 __ Ret();
1226 1241
1227 __ bind(fast_double); 1242 __ bind(fast_double);
1228 if (check_map == kCheckMap) { 1243 if (check_map == kCheckMap) {
1229 // Check for fast double array case. If this fails, call through to the 1244 // Check for fast double array case. If this fails, call through to the
1230 // runtime. 1245 // runtime.
1231 __ LoadRoot(at, Heap::kFixedDoubleArrayMapRootIndex); 1246 __ LoadRoot(at, Heap::kFixedDoubleArrayMapRootIndex);
1232 __ Branch(slow, ne, elements_map, Operand(at)); 1247 __ Branch(slow, ne, elements_map, Operand(at));
1233 } 1248 }
1249
1250 // HOLECHECK: guards "A[i] double hole?"
1251 // We have to see if the double version of the hole is present. If so
1252 // go to the runtime.
1253 __ Addu(address, elements,
1254 Operand(FixedDoubleArray::kHeaderSize + sizeof(kHoleNanLower32)
1255 - kHeapObjectTag));
1256 __ sll(at, key, kPointerSizeLog2);
1257 __ addu(address, address, at);
1258 __ lw(scratch_value, MemOperand(address));
1259 __ Branch(&fast_double_without_map_check, ne, scratch_value,
1260 Operand(kHoleNanUpper32));
1261 __ JumpIfDictionaryInPrototypeChain(receiver, elements_map, scratch_value,
1262 slow);
1263
1234 __ bind(&fast_double_without_map_check); 1264 __ bind(&fast_double_without_map_check);
1235 __ StoreNumberToDoubleElements(value, 1265 __ StoreNumberToDoubleElements(value,
1236 key, 1266 key,
1237 elements, // Overwritten. 1267 elements, // Overwritten.
1238 a3, // Scratch regs... 1268 a3, // Scratch regs...
1239 t0, 1269 t0,
1240 t1, 1270 t1,
1241 &transition_double_elements); 1271 &transition_double_elements);
1242 if (increment_length == kIncrementLength) { 1272 if (increment_length == kIncrementLength) {
1243 // Add 1 to receiver->length. 1273 // Add 1 to receiver->length.
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
1659 } else { 1689 } else {
1660 ASSERT(Assembler::IsBne(branch_instr)); 1690 ASSERT(Assembler::IsBne(branch_instr));
1661 patcher.ChangeBranchCondition(eq); 1691 patcher.ChangeBranchCondition(eq);
1662 } 1692 }
1663 } 1693 }
1664 1694
1665 1695
1666 } } // namespace v8::internal 1696 } } // namespace v8::internal
1667 1697
1668 #endif // V8_TARGET_ARCH_MIPS 1698 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/lithium-codegen-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698