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

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: 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 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 Label done;
4912 __ SmiUntag(result, input, SetCC);
4913 __ b(cc, &done);
4914 __ mov(result, Operand(Smi::FromInt(0)));
4915 __ bind(&done);
4916 } else {
4917 __ SmiUntag(result, input);
4918 }
4908 } else { 4919 } else {
4909 __ SmiUntag(result, input); 4920 __ SmiUntag(result, input);
4910 } 4921 }
4911 } 4922 }
4912 4923
4913 4924
4914 void LCodeGen::EmitNumberUntagD(Register input_reg, 4925 void LCodeGen::EmitNumberUntagD(Register input_reg,
4915 DwVfpRegister result_reg, 4926 DwVfpRegister result_reg,
4916 bool deoptimize_on_undefined, 4927 bool deoptimize_on_undefined,
4917 bool deoptimize_on_minus_zero, 4928 bool deoptimize_on_minus_zero,
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
5907 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5918 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5908 __ ldr(result, FieldMemOperand(scratch, 5919 __ ldr(result, FieldMemOperand(scratch,
5909 FixedArray::kHeaderSize - kPointerSize)); 5920 FixedArray::kHeaderSize - kPointerSize));
5910 __ bind(&done); 5921 __ bind(&done);
5911 } 5922 }
5912 5923
5913 5924
5914 #undef __ 5925 #undef __
5915 5926
5916 } } // namespace v8::internal 5927 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698