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

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

Issue 18089025: MIPS: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Port fix. Created 7 years, 5 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
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.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 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 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 __ Branch(&non_double_value, ne, t0, Operand(at)); 1254 __ Branch(&non_double_value, ne, t0, Operand(at));
1255 1255
1256 // Value is a double. Transition FAST_SMI_ELEMENTS -> 1256 // Value is a double. Transition FAST_SMI_ELEMENTS ->
1257 // FAST_DOUBLE_ELEMENTS and complete the store. 1257 // FAST_DOUBLE_ELEMENTS and complete the store.
1258 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1258 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1259 FAST_DOUBLE_ELEMENTS, 1259 FAST_DOUBLE_ELEMENTS,
1260 receiver_map, 1260 receiver_map,
1261 t0, 1261 t0,
1262 slow); 1262 slow);
1263 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1263 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1264 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, 1264 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1265 FAST_DOUBLE_ELEMENTS); 1265 FAST_DOUBLE_ELEMENTS);
1266 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 1266 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow);
1267 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1267 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1268 __ jmp(&fast_double_without_map_check); 1268 __ jmp(&fast_double_without_map_check);
1269 1269
1270 __ bind(&non_double_value); 1270 __ bind(&non_double_value);
1271 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 1271 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
1272 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1272 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1273 FAST_ELEMENTS, 1273 FAST_ELEMENTS,
1274 receiver_map, 1274 receiver_map,
1275 t0, 1275 t0,
1276 slow); 1276 slow);
1277 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1277 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1278 mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 1278 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1279 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 1279 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode,
1280 slow); 1280 slow);
1281 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1281 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1282 __ jmp(&finish_object_store); 1282 __ jmp(&finish_object_store);
1283 1283
1284 __ bind(&transition_double_elements); 1284 __ bind(&transition_double_elements);
1285 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1285 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1286 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1286 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1287 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1287 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1288 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1288 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1289 FAST_ELEMENTS, 1289 FAST_ELEMENTS,
1290 receiver_map, 1290 receiver_map,
1291 t0, 1291 t0,
1292 slow); 1292 slow);
1293 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1293 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1294 mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 1294 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1295 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 1295 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow);
1296 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1296 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1297 __ jmp(&finish_object_store); 1297 __ jmp(&finish_object_store);
1298 } 1298 }
1299 1299
1300 1300
1301 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1301 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
1302 StrictModeFlag strict_mode) { 1302 StrictModeFlag strict_mode) {
1303 // ---------- S t a t e -------------- 1303 // ---------- S t a t e --------------
1304 // -- a0 : value 1304 // -- a0 : value
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 1488
1489 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1489 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1490 // ---------- S t a t e -------------- 1490 // ---------- S t a t e --------------
1491 // -- a2 : receiver 1491 // -- a2 : receiver
1492 // -- a3 : target map 1492 // -- a3 : target map
1493 // -- ra : return address 1493 // -- ra : return address
1494 // ----------------------------------- 1494 // -----------------------------------
1495 // Must return the modified receiver in v0. 1495 // Must return the modified receiver in v0.
1496 if (!FLAG_trace_elements_transitions) { 1496 if (!FLAG_trace_elements_transitions) {
1497 Label fail; 1497 Label fail;
1498 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, 1498 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1499 FAST_DOUBLE_ELEMENTS); 1499 FAST_DOUBLE_ELEMENTS);
1500 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); 1500 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
1501 __ Ret(USE_DELAY_SLOT); 1501 __ Ret(USE_DELAY_SLOT);
1502 __ mov(v0, a2); 1502 __ mov(v0, a2);
1503 __ bind(&fail); 1503 __ bind(&fail);
1504 } 1504 }
1505 1505
1506 __ push(a2); 1506 __ push(a2);
1507 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1507 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1508 } 1508 }
1509 1509
1510 1510
1511 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1511 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1512 MacroAssembler* masm) { 1512 MacroAssembler* masm) {
1513 // ---------- S t a t e -------------- 1513 // ---------- S t a t e --------------
1514 // -- a2 : receiver 1514 // -- a2 : receiver
1515 // -- a3 : target map 1515 // -- a3 : target map
1516 // -- ra : return address 1516 // -- ra : return address
1517 // ----------------------------------- 1517 // -----------------------------------
1518 // Must return the modified receiver in v0. 1518 // Must return the modified receiver in v0.
1519 if (!FLAG_trace_elements_transitions) { 1519 if (!FLAG_trace_elements_transitions) {
1520 Label fail; 1520 Label fail;
1521 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, 1521 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS,
1522 FAST_ELEMENTS); 1522 FAST_ELEMENTS);
1523 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); 1523 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
1524 __ Ret(USE_DELAY_SLOT); 1524 __ Ret(USE_DELAY_SLOT);
1525 __ mov(v0, a2); 1525 __ mov(v0, a2);
1526 __ bind(&fail); 1526 __ bind(&fail);
1527 } 1527 }
1528 1528
1529 __ push(a2); 1529 __ push(a2);
1530 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1530 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1531 } 1531 }
1532 1532
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1704 } else { 1704 } else {
1705 ASSERT(Assembler::IsBne(branch_instr)); 1705 ASSERT(Assembler::IsBne(branch_instr));
1706 patcher.ChangeBranchCondition(eq); 1706 patcher.ChangeBranchCondition(eq);
1707 } 1707 }
1708 } 1708 }
1709 1709
1710 1710
1711 } } // namespace v8::internal 1711 } } // namespace v8::internal
1712 1712
1713 #endif // V8_TARGET_ARCH_MIPS 1713 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698