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

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

Issue 15094018: Create AllocationSite objects, pointed to by AllocationSiteInfo. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment response 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 1223
1224 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) { 1224 void KeyedStoreIC::GenerateTransitionElementsSmiToDouble(MacroAssembler* masm) {
1225 // ---------- S t a t e -------------- 1225 // ---------- S t a t e --------------
1226 // -- r2 : receiver 1226 // -- r2 : receiver
1227 // -- r3 : target map 1227 // -- r3 : target map
1228 // -- lr : return address 1228 // -- lr : return address
1229 // ----------------------------------- 1229 // -----------------------------------
1230 // Must return the modified receiver in r0. 1230 // Must return the modified receiver in r0.
1231 if (!FLAG_trace_elements_transitions) { 1231 if (!FLAG_trace_elements_transitions) {
1232 Label fail; 1232 Label fail;
1233 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, 1233 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1234 FAST_DOUBLE_ELEMENTS); 1234 FAST_DOUBLE_ELEMENTS);
1235 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail); 1235 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, &fail);
1236 __ mov(r0, r2); 1236 __ mov(r0, r2);
1237 __ Ret(); 1237 __ Ret();
1238 __ bind(&fail); 1238 __ bind(&fail);
1239 } 1239 }
1240 1240
1241 __ push(r2); 1241 __ push(r2);
1242 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1); 1242 __ TailCallRuntime(Runtime::kTransitionElementsSmiToDouble, 1, 1);
1243 } 1243 }
1244 1244
1245 1245
1246 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject( 1246 void KeyedStoreIC::GenerateTransitionElementsDoubleToObject(
1247 MacroAssembler* masm) { 1247 MacroAssembler* masm) {
1248 // ---------- S t a t e -------------- 1248 // ---------- S t a t e --------------
1249 // -- r2 : receiver 1249 // -- r2 : receiver
1250 // -- r3 : target map 1250 // -- r3 : target map
1251 // -- lr : return address 1251 // -- lr : return address
1252 // ----------------------------------- 1252 // -----------------------------------
1253 // Must return the modified receiver in r0. 1253 // Must return the modified receiver in r0.
1254 if (!FLAG_trace_elements_transitions) { 1254 if (!FLAG_trace_elements_transitions) {
1255 Label fail; 1255 Label fail;
1256 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, 1256 AllocationSiteMode mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS,
1257 FAST_ELEMENTS); 1257 FAST_ELEMENTS);
1258 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail); 1258 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, &fail);
1259 __ mov(r0, r2); 1259 __ mov(r0, r2);
1260 __ Ret(); 1260 __ Ret();
1261 __ bind(&fail); 1261 __ bind(&fail);
1262 } 1262 }
1263 1263
1264 __ push(r2); 1264 __ push(r2);
1265 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1); 1265 __ TailCallRuntime(Runtime::kTransitionElementsDoubleToObject, 1, 1);
1266 } 1266 }
1267 1267
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 __ b(ne, &non_double_value); 1377 __ b(ne, &non_double_value);
1378 1378
1379 // Value is a double. Transition FAST_SMI_ELEMENTS -> 1379 // Value is a double. Transition FAST_SMI_ELEMENTS ->
1380 // FAST_DOUBLE_ELEMENTS and complete the store. 1380 // FAST_DOUBLE_ELEMENTS and complete the store.
1381 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1381 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1382 FAST_DOUBLE_ELEMENTS, 1382 FAST_DOUBLE_ELEMENTS,
1383 receiver_map, 1383 receiver_map,
1384 r4, 1384 r4,
1385 slow); 1385 slow);
1386 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3 1386 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
1387 AllocationSiteMode mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, 1387 AllocationSiteMode mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS,
1388 FAST_DOUBLE_ELEMENTS); 1388 FAST_DOUBLE_ELEMENTS);
1389 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow); 1389 ElementsTransitionGenerator::GenerateSmiToDouble(masm, mode, slow);
1390 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1390 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1391 __ jmp(&fast_double_without_map_check); 1391 __ jmp(&fast_double_without_map_check);
1392 1392
1393 __ bind(&non_double_value); 1393 __ bind(&non_double_value);
1394 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS 1394 // Value is not a double, FAST_SMI_ELEMENTS -> FAST_ELEMENTS
1395 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS, 1395 __ LoadTransitionedArrayMapConditional(FAST_SMI_ELEMENTS,
1396 FAST_ELEMENTS, 1396 FAST_ELEMENTS,
1397 receiver_map, 1397 receiver_map,
1398 r4, 1398 r4,
1399 slow); 1399 slow);
1400 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3 1400 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
1401 mode = AllocationSiteInfo::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS); 1401 mode = AllocationSite::GetMode(FAST_SMI_ELEMENTS, FAST_ELEMENTS);
1402 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode, 1402 ElementsTransitionGenerator::GenerateMapChangeElementsTransition(masm, mode,
1403 slow); 1403 slow);
1404 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1404 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1405 __ jmp(&finish_object_store); 1405 __ jmp(&finish_object_store);
1406 1406
1407 __ bind(&transition_double_elements); 1407 __ bind(&transition_double_elements);
1408 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a 1408 // Elements are FAST_DOUBLE_ELEMENTS, but value is an Object that's not a
1409 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and 1409 // HeapNumber. Make sure that the receiver is a Array with FAST_ELEMENTS and
1410 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS 1410 // transition array from FAST_DOUBLE_ELEMENTS to FAST_ELEMENTS
1411 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS, 1411 __ LoadTransitionedArrayMapConditional(FAST_DOUBLE_ELEMENTS,
1412 FAST_ELEMENTS, 1412 FAST_ELEMENTS,
1413 receiver_map, 1413 receiver_map,
1414 r4, 1414 r4,
1415 slow); 1415 slow);
1416 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3 1416 ASSERT(receiver_map.is(r3)); // Transition code expects map in r3
1417 mode = AllocationSiteInfo::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS); 1417 mode = AllocationSite::GetMode(FAST_DOUBLE_ELEMENTS, FAST_ELEMENTS);
1418 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow); 1418 ElementsTransitionGenerator::GenerateDoubleToObject(masm, mode, slow);
1419 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset)); 1419 __ ldr(elements, FieldMemOperand(receiver, JSObject::kElementsOffset));
1420 __ jmp(&finish_object_store); 1420 __ jmp(&finish_object_store);
1421 } 1421 }
1422 1422
1423 1423
1424 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm, 1424 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm,
1425 StrictModeFlag strict_mode) { 1425 StrictModeFlag strict_mode) {
1426 // ---------- S t a t e -------------- 1426 // ---------- S t a t e --------------
1427 // -- r0 : value 1427 // -- r0 : value
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 } else { 1697 } else {
1698 ASSERT(Assembler::GetCondition(branch_instr) == ne); 1698 ASSERT(Assembler::GetCondition(branch_instr) == ne);
1699 patcher.EmitCondition(eq); 1699 patcher.EmitCondition(eq);
1700 } 1700 }
1701 } 1701 }
1702 1702
1703 1703
1704 } } // namespace v8::internal 1704 } } // namespace v8::internal
1705 1705
1706 #endif // V8_TARGET_ARCH_ARM 1706 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698