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

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

Issue 7901016: Basic support for tracking smi-only arrays on ia32. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix remaining failing tests Created 9 years, 3 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
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 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1480 } 1480 }
1481 1481
1482 if (!result_saved) { 1482 if (!result_saved) {
1483 __ push(eax); 1483 __ push(eax);
1484 result_saved = true; 1484 result_saved = true;
1485 increment_stack_height(); 1485 increment_stack_height();
1486 } 1486 }
1487 VisitForAccumulatorValue(subexpr); 1487 VisitForAccumulatorValue(subexpr);
1488 1488
1489 // Store the subexpression value in the array's elements. 1489 // Store the subexpression value in the array's elements.
1490 __ mov(ebx, Operand(esp, 0)); // Copy of array literal. 1490 __ mov(ebx, Operand(esp, 0)); // Copy of array literal.
Yang 2011/09/21 14:47:50 Why not load this into edi instead of ebx and remo
danno 2011/09/22 11:23:15 This was actually another bug. Fixed. On 2011/09/2
1491 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset)); 1491 __ mov(ebx, FieldOperand(ebx, JSObject::kElementsOffset));
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;
1496 __ JumpIfSmi(result_register(), &no_map_change);
1495 // Update the write barrier for the array store. 1497 // Update the write barrier for the array store.
1496 __ RecordWriteField(ebx, offset, result_register(), ecx, kDontSaveFPRegs); 1498 __ RecordWriteField(ebx, offset, result_register(), ecx,
1499 kDontSaveFPRegs,
1500 EMIT_REMEMBERED_SET,
1501 OMIT_SMI_CHECK);
1502 if (FLAG_smi_only_arrays) {
1503 __ mov(edi, Operand(esp, 0));
1504 __ CheckFastSmiOnlyElements(edi, &no_map_change, Label::kNear);
1505 __ push(Operand(esp, 0));
1506 __ CallRuntime(Runtime::kNonSmiElementStored, 1);
1507 }
1508 __ bind(&no_map_change);
1497 1509
1498 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS); 1510 PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS);
1499 } 1511 }
1500 1512
1501 if (result_saved) { 1513 if (result_saved) {
1502 context()->PlugTOS(); 1514 context()->PlugTOS();
1503 } else { 1515 } else {
1504 context()->Plug(eax); 1516 context()->Plug(eax);
1505 } 1517 }
1506 } 1518 }
(...skipping 2796 matching lines...) Expand 10 before | Expand all | Expand 10 after
4303 *context_length = 0; 4315 *context_length = 0;
4304 return previous_; 4316 return previous_;
4305 } 4317 }
4306 4318
4307 4319
4308 #undef __ 4320 #undef __
4309 4321
4310 } } // namespace v8::internal 4322 } } // namespace v8::internal
4311 4323
4312 #endif // V8_TARGET_ARCH_IA32 4324 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/ic-ia32.cc » ('j') | src/ia32/ic-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698