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

Side by Side Diff: src/mips/lithium-codegen-mips.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/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.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 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after
1997 BranchCondition(instr->hydrogen()), 1997 BranchCondition(instr->hydrogen()),
1998 scratch, 1998 scratch,
1999 Operand(TestType(instr->hydrogen()))); 1999 Operand(TestType(instr->hydrogen())));
2000 } 2000 }
2001 2001
2002 2002
2003 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) { 2003 void LCodeGen::DoGetCachedArrayIndex(LGetCachedArrayIndex* instr) {
2004 Register input = ToRegister(instr->value()); 2004 Register input = ToRegister(instr->value());
2005 Register result = ToRegister(instr->result()); 2005 Register result = ToRegister(instr->result());
2006 2006
2007 __ AbortIfNotString(input); 2007 __ AssertString(input);
2008 2008
2009 __ lw(result, FieldMemOperand(input, String::kHashFieldOffset)); 2009 __ lw(result, FieldMemOperand(input, String::kHashFieldOffset));
2010 __ IndexFromHash(result, result); 2010 __ IndexFromHash(result, result);
2011 } 2011 }
2012 2012
2013 2013
2014 void LCodeGen::DoHasCachedArrayIndexAndBranch( 2014 void LCodeGen::DoHasCachedArrayIndexAndBranch(
2015 LHasCachedArrayIndexAndBranch* instr) { 2015 LHasCachedArrayIndexAndBranch* instr) {
2016 Register input = ToRegister(instr->value()); 2016 Register input = ToRegister(instr->value());
2017 Register scratch = scratch0(); 2017 Register scratch = scratch0();
(...skipping 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after
4021 if (instr->index()->IsConstantOperand()) { 4021 if (instr->index()->IsConstantOperand()) {
4022 int const_index = ToInteger32(LConstantOperand::cast(instr->index())); 4022 int const_index = ToInteger32(LConstantOperand::cast(instr->index()));
4023 __ Addu(scratch, zero_reg, Operand(Smi::FromInt(const_index))); 4023 __ Addu(scratch, zero_reg, Operand(Smi::FromInt(const_index)));
4024 __ push(scratch); 4024 __ push(scratch);
4025 } else { 4025 } else {
4026 Register index = ToRegister(instr->index()); 4026 Register index = ToRegister(instr->index());
4027 __ SmiTag(index); 4027 __ SmiTag(index);
4028 __ push(index); 4028 __ push(index);
4029 } 4029 }
4030 CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, instr); 4030 CallRuntimeFromDeferred(Runtime::kStringCharCodeAt, 2, instr);
4031 if (FLAG_debug_code) { 4031 __ AssertSmi(v0);
4032 __ AbortIfNotSmi(v0);
4033 }
4034 __ SmiUntag(v0); 4032 __ SmiUntag(v0);
4035 __ StoreToSafepointRegisterSlot(v0, result); 4033 __ StoreToSafepointRegisterSlot(v0, result);
4036 } 4034 }
4037 4035
4038 4036
4039 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4037 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4040 class DeferredStringCharFromCode: public LDeferredCode { 4038 class DeferredStringCharFromCode: public LDeferredCode {
4041 public: 4039 public:
4042 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4040 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4043 : LDeferredCode(codegen), instr_(instr) { } 4041 : LDeferredCode(codegen), instr_(instr) { }
(...skipping 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after
5450 __ Subu(scratch, result, scratch); 5448 __ Subu(scratch, result, scratch);
5451 __ lw(result, FieldMemOperand(scratch, 5449 __ lw(result, FieldMemOperand(scratch,
5452 FixedArray::kHeaderSize - kPointerSize)); 5450 FixedArray::kHeaderSize - kPointerSize));
5453 __ bind(&done); 5451 __ bind(&done);
5454 } 5452 }
5455 5453
5456 5454
5457 #undef __ 5455 #undef __
5458 5456
5459 } } // namespace v8::internal 5457 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698