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

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

Issue 12703030: MIPS: Small refactoring of r14058. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | 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 5810 matching lines...) Expand 10 before | Expand all | Expand 10 after
5821 cmp1 = input; 5821 cmp1 = input;
5822 cmp2 = Operand(JS_FUNCTION_PROXY_TYPE); 5822 cmp2 = Operand(JS_FUNCTION_PROXY_TYPE);
5823 final_branch_condition = eq; 5823 final_branch_condition = eq;
5824 5824
5825 } else if (type_name->Equals(heap()->object_string())) { 5825 } else if (type_name->Equals(heap()->object_string())) {
5826 __ JumpIfSmi(input, false_label); 5826 __ JumpIfSmi(input, false_label);
5827 if (!FLAG_harmony_typeof) { 5827 if (!FLAG_harmony_typeof) {
5828 __ LoadRoot(at, Heap::kNullValueRootIndex); 5828 __ LoadRoot(at, Heap::kNullValueRootIndex);
5829 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); 5829 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input));
5830 } 5830 }
5831 // input is an object, it is safe to use GetObjectType in the delay slot. 5831 Register map = input;
5832 __ GetObjectType(input, input, scratch); 5832 __ GetObjectType(input, map, scratch);
5833 __ Branch(USE_DELAY_SLOT, false_label, 5833 __ Branch(false_label,
5834 lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); 5834 lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE));
5835 // Still an object, so the InstanceType can be loaded.
5836 __ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset));
5837 __ Branch(USE_DELAY_SLOT, false_label, 5835 __ Branch(USE_DELAY_SLOT, false_label,
5838 gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); 5836 gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE));
5839 // Still an object, so the BitField can be loaded. 5837 // map is still valid, so the BitField can be loaded in delay slot.
5840 // Check for undetectable objects => false. 5838 // Check for undetectable objects => false.
5841 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); 5839 __ lbu(at, FieldMemOperand(map, Map::kBitFieldOffset));
5842 __ And(at, at, 1 << Map::kIsUndetectable); 5840 __ And(at, at, 1 << Map::kIsUndetectable);
5843 cmp1 = at; 5841 cmp1 = at;
5844 cmp2 = Operand(zero_reg); 5842 cmp2 = Operand(zero_reg);
5845 final_branch_condition = eq; 5843 final_branch_condition = eq;
5846 5844
5847 } else { 5845 } else {
5848 cmp1 = at; 5846 cmp1 = at;
5849 cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion. 5847 cmp2 = Operand(zero_reg); // Set to valid regs, to avoid caller assertion.
5850 __ Branch(false_label); 5848 __ Branch(false_label);
5851 } 5849 }
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
6108 __ Subu(scratch, result, scratch); 6106 __ Subu(scratch, result, scratch);
6109 __ lw(result, FieldMemOperand(scratch, 6107 __ lw(result, FieldMemOperand(scratch,
6110 FixedArray::kHeaderSize - kPointerSize)); 6108 FixedArray::kHeaderSize - kPointerSize));
6111 __ bind(&done); 6109 __ bind(&done);
6112 } 6110 }
6113 6111
6114 6112
6115 #undef __ 6113 #undef __
6116 6114
6117 } } // namespace v8::internal 6115 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698