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

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

Issue 11188031: Move DescriptorArray into the map (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: remove padding area 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/ia32/macro-assembler-ia32.cc ('k') | src/objects.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 5286 matching lines...) Expand 10 before | Expand all | Expand 10 after
5297 Addu(t8, t8, Operand(length)); 5297 Addu(t8, t8, Operand(length));
5298 sw(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset)); 5298 sw(t8, MemOperand(bitmap_scratch, MemoryChunk::kLiveBytesOffset));
5299 5299
5300 bind(&done); 5300 bind(&done);
5301 } 5301 }
5302 5302
5303 5303
5304 void MacroAssembler::LoadInstanceDescriptors(Register map, 5304 void MacroAssembler::LoadInstanceDescriptors(Register map,
5305 Register descriptors, 5305 Register descriptors,
5306 Register scratch) { 5306 Register scratch) {
5307 Register temp = descriptors; 5307 lw(descriptors, FieldMemOperand(map, Map::kDescriptorsOffset));
5308 lw(temp, FieldMemOperand(map, Map::kTransitionsOrBackPointerOffset));
5309
5310 Label ok, fail, load_from_back_pointer;
5311 CheckMap(temp,
5312 scratch,
5313 isolate()->factory()->fixed_array_map(),
5314 &fail,
5315 DONT_DO_SMI_CHECK);
5316 lw(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset));
5317 jmp(&ok);
5318
5319 bind(&fail);
5320 LoadRoot(scratch, Heap::kUndefinedValueRootIndex);
5321 Branch(&load_from_back_pointer, ne, temp, Operand(scratch));
5322 LoadRoot(descriptors, Heap::kEmptyDescriptorArrayRootIndex);
5323 jmp(&ok);
5324
5325 bind(&load_from_back_pointer);
5326 lw(temp, FieldMemOperand(temp, Map::kTransitionsOrBackPointerOffset));
5327 lw(descriptors, FieldMemOperand(temp, TransitionArray::kDescriptorsOffset));
5328
5329 bind(&ok);
5330 } 5308 }
5331 5309
5332 5310
5333 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) { 5311 void MacroAssembler::NumberOfOwnDescriptors(Register dst, Register map) {
5334 lw(dst, FieldMemOperand(map, Map::kBitField3Offset)); 5312 lw(dst, FieldMemOperand(map, Map::kBitField3Offset));
5335 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst); 5313 DecodeField<Map::NumberOfOwnDescriptorsBits>(dst);
5336 } 5314 }
5337 5315
5338 5316
5339 void MacroAssembler::EnumLength(Register dst, Register map) { 5317 void MacroAssembler::EnumLength(Register dst, Register map) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
5481 opcode == BGTZL); 5459 opcode == BGTZL);
5482 opcode = (cond == eq) ? BEQ : BNE; 5460 opcode = (cond == eq) ? BEQ : BNE;
5483 instr = (instr & ~kOpcodeMask) | opcode; 5461 instr = (instr & ~kOpcodeMask) | opcode;
5484 masm_.emit(instr); 5462 masm_.emit(instr);
5485 } 5463 }
5486 5464
5487 5465
5488 } } // namespace v8::internal 5466 } } // namespace v8::internal
5489 5467
5490 #endif // V8_TARGET_ARCH_MIPS 5468 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698