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

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

Issue 12026002: MIPS: Additional work to get array literal allocation tracking working, even with --always-opt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 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/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 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 __ Branch(&non_double_value, ne, t0, Operand(at)); 1288 __ Branch(&non_double_value, ne, t0, Operand(at));
1289 1289
1290 // Value is a double. Transition FAST_SMI_ELEMENTS -> 1290 // Value is a double. Transition FAST_SMI_ELEMENTS ->
1291 // FAST_DOUBLE_ELEMENTS and complete the store. 1291 // FAST_DOUBLE_ELEMENTS and complete the store.
1292 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1292 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1293 FAST_DOUBLE_ELEMENTS, 1293 FAST_DOUBLE_ELEMENTS,
1294 receiver_map, 1294 receiver_map,
1295 t0, 1295 t0,
1296 slow); 1296 slow);
1297 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1297 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1298 ElementsTransitionGenerator::GenerateSmiToDouble(masm, slow); 1298 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS,
1299 FAST_DOUBLE_ELEMENTS);
1300 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow);
1299 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1301 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1300 __ jmp(&fast_double_without_map_check); 1302 __ jmp(&fast_double_without_map_check);
1301 1303
1302 __ bind(&non_double_value); 1304 __ bind(&non_double_value);
1303 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 1305 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
1304 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1306 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1305 FAST_ELEMENTS, 1307 FAST_ELEMENTS,
1306 receiver_map, 1308 receiver_map,
1307 t0, 1309 t0,
1308 slow); 1310 slow);
1309 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1311 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1310 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm); 1312 mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1313 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode,
1314 slow);
1311 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1315 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1312 __ jmp(&finish_object_store); 1316 __ jmp(&finish_object_store);
1313 1317
1314 __ bind(&transition_double_elements); 1318 __ bind(&transition_double_elements);
1315 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1319 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1316 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1320 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1317 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1321 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1318 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1322 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1319 FAST_ELEMENTS, 1323 FAST_ELEMENTS,
1320 receiver_map, 1324 receiver_map,
1321 t0, 1325 t0,
1322 slow); 1326 slow);
1323 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3 1327 ASSERT(receiver_map.is(a3)); // Transition code expects map in a3
1324 ElementsTransitionGenerator::GenerateDoubleToObject(masm, slow); 1328 mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1329 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow);
1325 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1330 __ lw(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1326 __ jmp(&finish_object_store); 1331 __ jmp(&finish_object_store);
1327 } 1332 }
1328 1333
1329 1334
1330 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1335 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
1331 StrictModeFlag strict_mode) { 1336 StrictModeFlag strict_mode) {
1332 // ---------- S t a t e -------------- 1337 // ---------- S t a t e --------------
1333 // -- a0 : value 1338 // -- a0 : value
1334 // -- a1 : key 1339 // -- a1 : key
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 1503
1499 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1504 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1500 // ---------- S t a t e -------------- 1505 // ---------- S t a t e --------------
1501 // -- a2 : receiver 1506 // -- a2 : receiver
1502 // -- a3 : target map 1507 // -- a3 : target map
1503 // -- ra : return address 1508 // -- ra : return address
1504 // ----------------------------------- 1509 // -----------------------------------
1505 // Must return the modified receiver in v0. 1510 // Must return the modified receiver in v0.
1506 if (!FLAG_trace_elements_transitions) { 1511 if (!FLAG_trace_elements_transitions) {
1507 Label fail; 1512 Label fail;
1508 ElementsTransitionGenerator::GenerateSmiToDouble(masm, &fail); 1513 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS,
1514 FAST_DOUBLE_ELEMENTS);
1515 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
1509 __ Ret(USE_DELAY_SLOT); 1516 __ Ret(USE_DELAY_SLOT);
1510 __ mov(v0, a2); 1517 __ mov(v0, a2);
1511 __ bind(&fail); 1518 __ bind(&fail);
1512 } 1519 }
1513 1520
1514 __ push(a2); 1521 __ push(a2);
1515 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1522 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1516 } 1523 }
1517 1524
1518 1525
1519 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1526 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1520 MacroAssembler* masm) { 1527 MacroAssembler* masm) {
1521 // ---------- S t a t e -------------- 1528 // ---------- S t a t e --------------
1522 // -- a2 : receiver 1529 // -- a2 : receiver
1523 // -- a3 : target map 1530 // -- a3 : target map
1524 // -- ra : return address 1531 // -- ra : return address
1525 // ----------------------------------- 1532 // -----------------------------------
1526 // Must return the modified receiver in v0. 1533 // Must return the modified receiver in v0.
1527 if (!FLAG_trace_elements_transitions) { 1534 if (!FLAG_trace_elements_transitions) {
1528 Label fail; 1535 Label fail;
1529 ElementsTransitionGenerator::GenerateDoubleToObject(masm, &fail); 1536 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS,
1537 FAST_ELEMENTS);
1538 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
1530 __ Ret(USE_DELAY_SLOT); 1539 __ Ret(USE_DELAY_SLOT);
1531 __ mov(v0, a2); 1540 __ mov(v0, a2);
1532 __ bind(&fail); 1541 __ bind(&fail);
1533 } 1542 }
1534 1543
1535 __ push(a2); 1544 __ push(a2);
1536 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1545 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1537 } 1546 }
1538 1547
1539 1548
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1766 } else { 1775 } else {
1767 ASSERT(Assembler::IsBne(branch_instr)); 1776 ASSERT(Assembler::IsBne(branch_instr));
1768 patcher.ChangeBranchCondition(eq); 1777 patcher.ChangeBranchCondition(eq);
1769 } 1778 }
1770 } 1779 }
1771 1780
1772 1781
1773 } } // namespace v8::internal 1782 } } // namespace v8::internal
1774 1783
1775 #endif // V8_TARGET_ARCH_MIPS 1784 #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