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

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

Issue 11108011: Ensure that we do not accidentally emit debug code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed indentation Created 8 years, 2 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/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.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 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2288 2288
2289 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen())); 2289 __ CompareObjectType(input, scratch, scratch, TestType(instr->hydrogen()));
2290 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); 2290 EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen()));
2291 } 2291 }
2292 2292
2293 2293
2294 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { 2294 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) {
2295 Register input = ToRegister(instr->value()); 2295 Register input = ToRegister(instr->value());
2296 Register result = ToRegister(instr->result()); 2296 Register result = ToRegister(instr->result());
2297 2297
2298 __ AbortIfNotString(input); 2298 __ AssertString(input);
2299 2299
2300 __ ldr(result, FieldMemOperand(input, String::kHashFieldOffset)); 2300 __ ldr(result, FieldMemOperand(input, String::kHashFieldOffset));
2301 __ IndexFromHash(result, result); 2301 __ IndexFromHash(result, result);
2302 } 2302 }
2303 2303
2304 2304
2305 void LCodeGen::DoHasCachedArrayIndexAndBranch( 2305 void LCodeGen::DoHasCachedArrayIndexAndBranch(
2306 LHasCachedArrayIndexAndBranch* instr) { 2306 LHasCachedArrayIndexAndBranch* instr) {
2307 Register input = ToRegister(instr->value()); 2307 Register input = ToRegister(instr->value());
2308 Register scratch = scratch0(); 2308 Register scratch = scratch0();
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
4267 if (instr->index()->IsConstantOperand()) { 4267 if (instr->index()->IsConstantOperand()) {
4268 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); 4268 int const_index = ToInteger32(LConstantOperand::cast(instr->index()));
4269 __ mov(scratch, Operand(Smi::FromInt(const_index))); 4269 __ mov(scratch, Operand(Smi::FromInt(const_index)));
4270 __ push(scratch); 4270 __ push(scratch);
4271 } else { 4271 } else {
4272 Register index = ToRegister(instr->index()); 4272 Register index = ToRegister(instr->index());
4273 __ SmiTag(index); 4273 __ SmiTag(index);
4274 __ push(index); 4274 __ push(index);
4275 } 4275 }
4276 CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, instr); 4276 CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, instr);
4277 if (FLAG_debug_code) { 4277 __ AssertSmi(r0);
4278 __ AbortIfNotSmi(r0);
4279 }
4280 __ SmiUntag(r0); 4278 __ SmiUntag(r0);
4281 __ StoreToSafepointRegisterSlot(r0, result); 4279 __ StoreToSafepointRegisterSlot(r0, result);
4282 } 4280 }
4283 4281
4284 4282
4285 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4283 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4286 class DeferredStringCharFromCode: public LDeferredCode { 4284 class DeferredStringCharFromCode: public LDeferredCode {
4287 public: 4285 public:
4288 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4286 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4289 : LDeferredCode(codegen), instr_(instr) { } 4287 : LDeferredCode(codegen), instr_(instr) { }
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
5675 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 5673 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
5676 __ ldr(result, FieldMemOperand(scratch, 5674 __ ldr(result, FieldMemOperand(scratch,
5677 FixedArray::kHeaderSize - kPointerSize)); 5675 FixedArray::kHeaderSize - kPointerSize));
5678 __ bind(&done); 5676 __ bind(&done);
5679 } 5677 }
5680 5678
5681 5679
5682 #undef __ 5680 #undef __
5683 5681
5684 } } // namespace v8::internal 5682 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698