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

Side by Side Diff: src/ia32/full-codegen-ia32.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/hydrogen.cc ('k') | src/ia32/ic-ia32.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 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1492 int offset = FixedArray::kHeaderSize + (i * kPointerSize); 1492 int offset = FixedArray::kHeaderSize + (i * kPointerSize);
1493 __ mov(FieldOperand(ebx, offset), result_register()); 1493 __ mov(FieldOperand(ebx, offset), result_register());
1494 1494
1495 Label no_map_change; 1495 Label no_map_change;
1496 __ JumpIfSmi(result_register(), &no_map_change); 1496 __ JumpIfSmi(result_register(), &no_map_change);
1497 // Update the write barrier for the array store. 1497 // Update the write barrier for the array store.
1498 __ RecordWriteField(ebx, offset, result_register(), ecx, 1498 __ RecordWriteField(ebx, offset, result_register(), ecx,
1499 kDontSaveFPRegs, 1499 kDontSaveFPRegs,
1500 EMIT_REMEMBERED_SET, 1500 EMIT_REMEMBERED_SET,
1501 OMIT_SMI_CHECK); 1501 OMIT_SMI_CHECK);
1502 if (FLAG_smi_only_arrays) { 1502 __ mov(edi, FieldOperand(ebx, JSObject::kMapOffset));
1503 __ mov(edi, FieldOperand(ebx, JSObject::kMapOffset)); 1503 __ CheckFastSmiOnlyElements(edi, &no_map_change, Label::kNear);
1504 __ CheckFastSmiOnlyElements(edi, &no_map_change, Label::kNear); 1504 __ push(Operand(esp, 0));
1505 __ push(Operand(esp, 0)); 1505 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1506 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1507 }
1508 __ bind(&no_map_change); 1506 __ bind(&no_map_change);
1509 1507
1510 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); 1508 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS);
1511 } 1509 }
1512 1510
1513 if (result_saved) { 1511 if (result_saved) {
1514 context()->PlugTOS(); 1512 context()->PlugTOS();
1515 } else { 1513 } else {
1516 context()->Plug(eax); 1514 context()->Plug(eax);
1517 } 1515 }
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
4343 *context_length = 0; 4341 *context_length = 0;
4344 return previous_; 4342 return previous_;
4345 } 4343 }
4346 4344
4347 4345
4348 #undef __ 4346 #undef __
4349 4347
4350 } } // namespace v8::internal 4348 } } // namespace v8::internal
4351 4349
4352 #endif // V8_TARGET_ARCH_IA32 4350 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698