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

Side by Side Diff: src/arm/lithium-codegen-arm.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: Respect hole-mode 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
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('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 4887 matching lines...) Expand 10 before | Expand all | Expand 10 after
4898 4898
4899 4899
4900 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { 4900 void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
4901 Register input = ToRegister(instr->value()); 4901 Register input = ToRegister(instr->value());
4902 Register result = ToRegister(instr->result()); 4902 Register result = ToRegister(instr->result());
4903 if (instr->needs_check()) { 4903 if (instr->needs_check()) {
4904 STATIC_ASSERT(kHeapObjectTag == 1); 4904 STATIC_ASSERT(kHeapObjectTag == 1);
4905 // If the input is a HeapObject, SmiUntag will set the carry flag. 4905 // If the input is a HeapObject, SmiUntag will set the carry flag.
4906 __ SmiUntag(result, input, SetCC); 4906 __ SmiUntag(result, input, SetCC);
4907 DeoptimizeIf(cs, instr->environment()); 4907 DeoptimizeIf(cs, instr->environment());
4908 } else if (instr->hydrogen()->value()->IsLoadKeyed()) {
4909 HLoadKeyed* load = HLoadKeyed::cast(instr->hydrogen()->value());
4910 if (load->UsesMustHandleHole()) {
4911 __ SmiUntag(result, input, SetCC);
4912 if (load->hole_mode() == ALLOW_RETURN_HOLE) {
4913 Label done;
4914 __ b(cc, &done);
4915 __ mov(result, Operand(Smi::FromInt(0)));
4916 __ bind(&done);
4917 } else {
4918 DeoptimizeIf(cs, instr->environment());
4919 }
4920 } else {
4921 __ SmiUntag(result, input);
4922 }
4908 } else { 4923 } else {
4909 __ SmiUntag(result, input); 4924 __ SmiUntag(result, input);
4910 } 4925 }
4911 } 4926 }
4912 4927
4913 4928
4914 void LCodeGen::EmitNumberUntagD(Register input_reg, 4929 void LCodeGen::EmitNumberUntagD(Register input_reg,
4915 DwVfpRegister result_reg, 4930 DwVfpRegister result_reg,
4916 bool deoptimize_on_undefined, 4931 bool deoptimize_on_undefined,
4917 bool deoptimize_on_minus_zero, 4932 bool deoptimize_on_minus_zero,
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
5907 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5922 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5908 __ ldr(result, FieldMemOperand(scratch, 5923 __ ldr(result, FieldMemOperand(scratch,
5909 FixedArray::kHeaderSize - kPointerSize)); 5924 FixedArray::kHeaderSize - kPointerSize));
5910 __ bind(&done); 5925 __ bind(&done);
5911 } 5926 }
5912 5927
5913 5928
5914 #undef __ 5929 #undef __
5915 5930
5916 } } // namespace v8::internal 5931 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698