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

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

Issue 15737003: Handle holes in smi-untag from LoadKeyed requiring hole handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after
4599 __ Integer32ToSmi(input, input); 4599 __ Integer32ToSmi(input, input);
4600 } 4600 }
4601 4601
4602 4602
4603 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { 4603 void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
4604 ASSERT(instr->value()->Equals(instr->result())); 4604 ASSERT(instr->value()->Equals(instr->result()));
4605 Register input = ToRegister(instr->value()); 4605 Register input = ToRegister(instr->value());
4606 if (instr->needs_check()) { 4606 if (instr->needs_check()) {
4607 Condition is_smi = __ CheckSmi(input); 4607 Condition is_smi = __ CheckSmi(input);
4608 DeoptimizeIf(NegateCondition(is_smi), instr->environment()); 4608 DeoptimizeIf(NegateCondition(is_smi), instr->environment());
4609 } else if (instr->hydrogen()->value()->IsLoadKeyed()) {
4610 HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value());
4611 if (load->UsesMustHandleHole()) {
4612 Label done;
4613 Condition cc = masm()->CheckSmi(input);
4614 __ j(cc, &done);
4615 __ xor_(input, input);
4616 __ bind(&done);
4617 } else {
4618 __ AssertSmi(input);
4619 }
4609 } else { 4620 } else {
4610 __ AssertSmi(input); 4621 __ AssertSmi(input);
4611 } 4622 }
4612 __ SmiToInteger32(input, input); 4623 __ SmiToInteger32(input, input);
4613 } 4624 }
4614 4625
4615 4626
4616 void LCodeGen::EmitNumberUntagD(Register input_reg, 4627 void LCodeGen::EmitNumberUntagD(Register input_reg,
4617 XMMRegister result_reg, 4628 XMMRegister result_reg,
4618 bool deoptimize_on_undefined, 4629 bool deoptimize_on_undefined,
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
5605 FixedArray::kHeaderSize - kPointerSize)); 5616 FixedArray::kHeaderSize - kPointerSize));
5606 __ bind(&done); 5617 __ bind(&done);
5607 } 5618 }
5608 5619
5609 5620
5610 #undef __ 5621 #undef __
5611 5622
5612 } } // namespace v8::internal 5623 } } // namespace v8::internal
5613 5624
5614 #endif // V8_TARGET_ARCH_X64 5625 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698