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

Side by Side Diff: src/x64/full-codegen-x64.cc

Issue 8177005: Active smi-only optimizations for large array literals. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 2 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/runtime.cc ('k') | src/x64/ic-x64.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 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 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1460 int offset = FixedArray::kHeaderSize + (i * kPointerSize); 1460 int offset = FixedArray::kHeaderSize + (i * kPointerSize);
1461 __ movq(FieldOperand(rbx, offset), result_register()); 1461 __ movq(FieldOperand(rbx, offset), result_register());
1462 1462
1463 Label no_map_change; 1463 Label no_map_change;
1464 __ JumpIfSmi(result_register(), &no_map_change); 1464 __ JumpIfSmi(result_register(), &no_map_change);
1465 // Update the write barrier for the array store. 1465 // Update the write barrier for the array store.
1466 __ RecordWriteField(rbx, offset, result_register(), rcx, 1466 __ RecordWriteField(rbx, offset, result_register(), rcx,
1467 kDontSaveFPRegs, 1467 kDontSaveFPRegs,
1468 EMIT_REMEMBERED_SET, 1468 EMIT_REMEMBERED_SET,
1469 OMIT_SMI_CHECK); 1469 OMIT_SMI_CHECK);
1470 if (FLAG_smi_only_arrays) { 1470 __ movq(rdi, FieldOperand(rbx, JSObject::kMapOffset));
1471 __ movq(rdi, FieldOperand(rbx, JSObject::kMapOffset)); 1471 __ CheckFastSmiOnlyElements(rdi, &no_map_change, Label::kNear);
1472 __ CheckFastSmiOnlyElements(rdi, &no_map_change, Label::kNear); 1472 __ push(r8);
1473 __ push(r8); 1473 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1474 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1475 }
1476 __ bind(&no_map_change); 1474 __ bind(&no_map_change);
1477 1475
1478 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); 1476 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS);
1479 } 1477 }
1480 1478
1481 if (result_saved) { 1479 if (result_saved) {
1482 context()->PlugTOS(); 1480 context()->PlugTOS();
1483 } else { 1481 } else {
1484 context()->Plug(rax); 1482 context()->Plug(rax);
1485 } 1483 }
(...skipping 2710 matching lines...) Expand 10 before | Expand all | Expand 10 after
4196 *context_length = 0; 4194 *context_length = 0;
4197 return previous_; 4195 return previous_;
4198 } 4196 }
4199 4197
4200 4198
4201 #undef __ 4199 #undef __
4202 4200
4203 } } // namespace v8::internal 4201 } } // namespace v8::internal
4204 4202
4205 #endif // V8_TARGET_ARCH_X64 4203 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | src/x64/ic-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698