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

Side by Side Diff: src/mips/macro-assembler-mips.cc

Issue 144023002: MIPS: Stay in fast enum case if the empty_slow_element_dictionary is used. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 6 years, 11 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
« 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 5536 matching lines...) Expand 10 before | Expand all | Expand 10 after
5547 5547
5548 bind(&next); 5548 bind(&next);
5549 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset)); 5549 lw(a1, FieldMemOperand(a2, HeapObject::kMapOffset));
5550 5550
5551 // For all objects but the receiver, check that the cache is empty. 5551 // For all objects but the receiver, check that the cache is empty.
5552 EnumLength(a3, a1); 5552 EnumLength(a3, a1);
5553 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0))); 5553 Branch(call_runtime, ne, a3, Operand(Smi::FromInt(0)));
5554 5554
5555 bind(&start); 5555 bind(&start);
5556 5556
5557 // Check that there are no elements. Register r2 contains the current JS 5557 // Check that there are no elements. Register r2 contains the current JS
Paul Lind 2014/01/21 17:46:12 nit: comment has wrong register name (from previou
5558 // object we've reached through the prototype chain. 5558 // object we've reached through the prototype chain.
5559 Label no_elements;
5559 lw(a2, FieldMemOperand(a2, JSObject::kElementsOffset)); 5560 lw(a2, FieldMemOperand(a2, JSObject::kElementsOffset));
5560 Branch(call_runtime, ne, a2, Operand(empty_fixed_array_value)); 5561 Branch(&no_elements, eq, a2, Operand(empty_fixed_array_value));
5561 5562
5563 // Second chance, the object may be using the empty slow element dictionary.
5564 LoadRoot(at, Heap::kEmptySlowElementDictionaryRootIndex);
5565 Branch(call_runtime, ne, a2, Operand(at));
5566
5567 bind(&no_elements);
5562 lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset)); 5568 lw(a2, FieldMemOperand(a1, Map::kPrototypeOffset));
5563 Branch(&next, ne, a2, Operand(null_value)); 5569 Branch(&next, ne, a2, Operand(null_value));
5564 } 5570 }
5565 5571
5566 5572
5567 void MacroAssembler::ClampUint8(Register output_reg, Register input_reg) { 5573 void MacroAssembler::ClampUint8(Register output_reg, Register input_reg) {
5568 ASSERT(!output_reg.is(input_reg)); 5574 ASSERT(!output_reg.is(input_reg));
5569 Label done; 5575 Label done;
5570 li(output_reg, Operand(255)); 5576 li(output_reg, Operand(255));
5571 // Normal branch: nop in delay slot. 5577 // Normal branch: nop in delay slot.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
5739 opcode == BGTZL); 5745 opcode == BGTZL);
5740 opcode = (cond == eq) ? BEQ : BNE; 5746 opcode = (cond == eq) ? BEQ : BNE;
5741 instr = (instr & ~kOpcodeMask) | opcode; 5747 instr = (instr & ~kOpcodeMask) | opcode;
5742 masm_.emit(instr); 5748 masm_.emit(instr);
5743 } 5749 }
5744 5750
5745 5751
5746 } } // namespace v8::internal 5752 } } // namespace v8::internal
5747 5753
5748 #endif // V8_TARGET_ARCH_MIPS 5754 #endif // V8_TARGET_ARCH_MIPS
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