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

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

Issue 10918287: MIPS: Sharing of descriptor arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix bug in loading bitfield Created 8 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/mips/macro-assembler-mips.h ('k') | 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 5281 matching lines...) Expand 10 before | Expand all | Expand 10 after
5292 bind(&done); 5292 bind(&done);
5293 } 5293 }
5294 5294
5295 5295
5296 void MacroAssembler::LoadInstanceDescriptors(Register map, 5296 void MacroAssembler::LoadInstanceDescriptors(Register map,
5297 Register descriptors, 5297 Register descriptors,
5298 Register scratch) { 5298 Register scratch) {
5299 Register temp = descriptors; 5299 Register temp = descriptors;
5300 lw(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset)); 5300 lw(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset));
5301 5301
5302 Label ok, fail; 5302 Label ok, fail, load_from_back_pointer;
5303 CheckMap(temp, 5303 CheckMap(temp,
5304 scratch, 5304 scratch,
5305 isolate()->factory()->fixed_array_map(), 5305 isolate()->factory()->fixed_array_map(),
5306 &fail, 5306 &fail,
5307 DONT_DO_SMI_CHECK); 5307 DONT_DO_SMI_CHECK);
5308 lw(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset)); 5308 lw(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset));
5309 lw(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset));
5309 jmp(&ok); 5310 jmp(&ok);
5311
5310 bind(&fail); 5312 bind(&fail);
5313 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5314 Branch(&load_from_back_pointer, ne, temp, Operand(scratch));
5311 LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex); 5315 LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex);
5316 jmp(&ok);
5317
5318 bind(&load_from_back_pointer);
5319 lw(temp, FieldMemOperand(temp, Map::kTransitionsOrBackPointerOffset));
5320 lw(temp, FieldMemOperand(temp, TransitionArray::kDescriptorsPointerOffset));
5321 lw(descriptors, FieldMemOperand(temp, JSGlobalPropertyCell::kValueOffset));
5322
5312 bind(&ok); 5323 bind(&ok);
5313 } 5324 }
5314 5325
5315 5326
5327 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
5328 lw(dst, FieldMemOperand(map, Map::kBitField3Offset));
5329 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
5330 }
5331
5332
5316 void MacroAssembler::EnumLength(Register dst, Register map) { 5333 void MacroAssembler::EnumLength(Register dst, Register map) {
5317 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0); 5334 STATIC_ASSERT(Map::EnumLengthBits::kShift == 0);
5318 lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); 5335 lw(dst, FieldMemOperand(map, Map::kBitField3Offset));
5319 And(dst, dst, Operand(Smi::FromInt(Map::EnumLengthBits::kMask))); 5336 And(dst, dst, Operand(Smi::FromInt(Map::EnumLengthBits::kMask)));
5320 } 5337 }
5321 5338
5322 5339
5323 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) { 5340 void MacroAssembler::CheckEnumCache(Register null_value, Label* call_runtime) {
5324 Register empty_fixed_array_value = t2; 5341 Register empty_fixed_array_value = t2;
5325 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex); 5342 LoadRoot(empty_fixed_array_value, Heap::kEmptyFixedArrayRootIndex);
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
5458 opcode == BGTZL); 5475 opcode == BGTZL);
5459 opcode = (cond == eq) ? BEQ : BNE; 5476 opcode = (cond == eq) ? BEQ : BNE;
5460 instr = (instr & ~kOpcodeMask) | opcode; 5477 instr = (instr & ~kOpcodeMask) | opcode;
5461 masm_.emit(instr); 5478 masm_.emit(instr);
5462 } 5479 }
5463 5480
5464 5481
5465 } } // namespace v8::internal 5482 } } // namespace v8::internal
5466 5483
5467 #endif // V8_TARGET_ARCH_MIPS 5484 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698