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

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

Issue 209873005: Replaced unreachable code in DoStoreNamedField by an assertion. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified Created 6 years, 9 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-codegen-arm.cc ('k') | src/ia32/lithium-codegen-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 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 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 return constant->handle(isolate()); 1260 return constant->handle(isolate());
1261 } 1261 }
1262 1262
1263 1263
1264 bool LCodeGen::IsSmi(LConstantOperand* op) const { 1264 bool LCodeGen::IsSmi(LConstantOperand* op) const {
1265 return chunk_->LookupLiteralRepresentation(op).IsSmi(); 1265 return chunk_->LookupLiteralRepresentation(op).IsSmi();
1266 } 1266 }
1267 1267
1268 1268
1269 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const { 1269 bool LCodeGen::IsInteger32Constant(LConstantOperand* op) const {
1270 return op->IsConstantOperand() && 1270 return chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32();
1271 chunk_->LookupLiteralRepresentation(op).IsSmiOrInteger32();
1272 } 1271 }
1273 1272
1274 1273
1275 int32_t LCodeGen::ToInteger32(LConstantOperand* op) const { 1274 int32_t LCodeGen::ToInteger32(LConstantOperand* op) const {
1276 HConstant* constant = chunk_->LookupConstant(op); 1275 HConstant* constant = chunk_->LookupConstant(op);
1277 return constant->Integer32Value(); 1276 return constant->Integer32Value();
1278 } 1277 }
1279 1278
1280 1279
1281 double LCodeGen::ToDouble(LConstantOperand* op) const { 1280 double LCodeGen::ToDouble(LConstantOperand* op) const {
(...skipping 3952 matching lines...) Expand 10 before | Expand all | Expand 10 after
5234 FPRegister value = ToDoubleRegister(instr->value()); 5233 FPRegister value = ToDoubleRegister(instr->value());
5235 __ Str(value, FieldMemOperand(object, offset)); 5234 __ Str(value, FieldMemOperand(object, offset));
5236 return; 5235 return;
5237 } 5236 }
5238 5237
5239 Register value = ToRegister(instr->value()); 5238 Register value = ToRegister(instr->value());
5240 5239
5241 SmiCheck check_needed = instr->hydrogen()->value()->IsHeapObject() 5240 SmiCheck check_needed = instr->hydrogen()->value()->IsHeapObject()
5242 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; 5241 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK;
5243 5242
5243 ASSERT(!(representation.IsSmi() &&
5244 instr->value()->IsConstantOperand() &&
5245 !IsInteger32Constant(LConstantOperand::cast(instr->value()))));
5244 if (representation.IsHeapObject() && 5246 if (representation.IsHeapObject() &&
5245 !instr->hydrogen()->value()->type().IsHeapObject()) { 5247 !instr->hydrogen()->value()->type().IsHeapObject()) {
5246 DeoptimizeIfSmi(value, instr->environment()); 5248 DeoptimizeIfSmi(value, instr->environment());
5247 5249
5248 // We know that value is a smi now, so we can omit the check below. 5250 // We know that value is a smi now, so we can omit the check below.
5249 check_needed = OMIT_SMI_CHECK; 5251 check_needed = OMIT_SMI_CHECK;
5250 } 5252 }
5251 5253
5252 if (!transition.is_null()) { 5254 if (!transition.is_null()) {
5253 // Store the new map value. 5255 // Store the new map value.
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
5854 __ Bind(&out_of_object); 5856 __ Bind(&out_of_object);
5855 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5857 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5856 // Index is equal to negated out of object property index plus 1. 5858 // Index is equal to negated out of object property index plus 1.
5857 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5859 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5858 __ Ldr(result, FieldMemOperand(result, 5860 __ Ldr(result, FieldMemOperand(result,
5859 FixedArray::kHeaderSize - kPointerSize)); 5861 FixedArray::kHeaderSize - kPointerSize));
5860 __ Bind(&done); 5862 __ Bind(&done);
5861 } 5863 }
5862 5864
5863 } } // namespace v8::internal 5865 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698