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

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

Issue 7776010: Convert a bunch of ASSERTs to STATIC_ASSERTs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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/ic-arm.cc ('k') | src/arm/stub-cache-arm.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 3741 matching lines...) Expand 10 before | Expand all | Expand 10 after
3752 ASSERT(input->IsRegister() && input->Equals(instr->result())); 3752 ASSERT(input->IsRegister() && input->Equals(instr->result()));
3753 ASSERT(!instr->hydrogen_value()->CheckFlag(HValue::kCanOverflow)); 3753 ASSERT(!instr->hydrogen_value()->CheckFlag(HValue::kCanOverflow));
3754 __ SmiTag(ToRegister(input)); 3754 __ SmiTag(ToRegister(input));
3755 } 3755 }
3756 3756
3757 3757
3758 void LCodeGen::DoSmiUntag(LSmiUntag* instr) { 3758 void LCodeGen::DoSmiUntag(LSmiUntag* instr) {
3759 LOperand* input = instr->InputAt(0); 3759 LOperand* input = instr->InputAt(0);
3760 ASSERT(input->IsRegister() && input->Equals(instr->result())); 3760 ASSERT(input->IsRegister() && input->Equals(instr->result()));
3761 if (instr->needs_check()) { 3761 if (instr->needs_check()) {
3762 ASSERT(kHeapObjectTag == 1); 3762 STATIC_ASSERT(kHeapObjectTag == 1);
3763 // If the input is a HeapObject, SmiUntag will set the carry flag. 3763 // If the input is a HeapObject, SmiUntag will set the carry flag.
3764 __ SmiUntag(ToRegister(input), SetCC); 3764 __ SmiUntag(ToRegister(input), SetCC);
3765 DeoptimizeIf(cs, instr->environment()); 3765 DeoptimizeIf(cs, instr->environment());
3766 } else { 3766 } else {
3767 __ SmiUntag(ToRegister(input)); 3767 __ SmiUntag(ToRegister(input));
3768 } 3768 }
3769 } 3769 }
3770 3770
3771 3771
3772 void LCodeGen::EmitNumberUntagD(Register input_reg, 3772 void LCodeGen::EmitNumberUntagD(Register input_reg,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
3837 SwVfpRegister single_scratch = double_scratch.low(); 3837 SwVfpRegister single_scratch = double_scratch.low();
3838 3838
3839 ASSERT(!scratch1.is(input_reg) && !scratch1.is(scratch2)); 3839 ASSERT(!scratch1.is(input_reg) && !scratch1.is(scratch2));
3840 ASSERT(!scratch2.is(input_reg) && !scratch2.is(scratch1)); 3840 ASSERT(!scratch2.is(input_reg) && !scratch2.is(scratch1));
3841 3841
3842 Label done; 3842 Label done;
3843 3843
3844 // The input was optimistically untagged; revert it. 3844 // The input was optimistically untagged; revert it.
3845 // The carry flag is set when we reach this deferred code as we just executed 3845 // The carry flag is set when we reach this deferred code as we just executed
3846 // SmiUntag(heap_object, SetCC) 3846 // SmiUntag(heap_object, SetCC)
3847 ASSERT(kHeapObjectTag == 1); 3847 STATIC_ASSERT(kHeapObjectTag == 1);
3848 __ adc(input_reg, input_reg, Operand(input_reg)); 3848 __ adc(input_reg, input_reg, Operand(input_reg));
3849 3849
3850 // Heap number map check. 3850 // Heap number map check.
3851 __ ldr(scratch1, FieldMemOperand(input_reg, HeapObject::kMapOffset)); 3851 __ ldr(scratch1, FieldMemOperand(input_reg, HeapObject::kMapOffset));
3852 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); 3852 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex);
3853 __ cmp(scratch1, Operand(ip)); 3853 __ cmp(scratch1, Operand(ip));
3854 3854
3855 if (instr->truncating()) { 3855 if (instr->truncating()) {
3856 Register scratch3 = ToRegister(instr->TempAt(1)); 3856 Register scratch3 = ToRegister(instr->TempAt(1));
3857 DwVfpRegister double_scratch2 = ToDoubleRegister(instr->TempAt(2)); 3857 DwVfpRegister double_scratch2 = ToDoubleRegister(instr->TempAt(2));
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
4510 ASSERT(osr_pc_offset_ == -1); 4510 ASSERT(osr_pc_offset_ == -1);
4511 osr_pc_offset_ = masm()->pc_offset(); 4511 osr_pc_offset_ = masm()->pc_offset();
4512 } 4512 }
4513 4513
4514 4514
4515 4515
4516 4516
4517 #undef __ 4517 #undef __
4518 4518
4519 } } // namespace v8::internal 4519 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/stub-cache-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698