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

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

Issue 13636002: MIPS: Remove extranous holder load in some prototype-chain checking cases (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 | src/mips/lithium-mips.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 5189 matching lines...) Expand 10 before | Expand all | Expand 10 after
5200 __ jmp(&done); 5200 __ jmp(&done);
5201 5201
5202 __ bind(&is_smi); 5202 __ bind(&is_smi);
5203 __ ClampUint8(result_reg, scratch); 5203 __ ClampUint8(result_reg, scratch);
5204 5204
5205 __ bind(&done); 5205 __ bind(&done);
5206 } 5206 }
5207 5207
5208 5208
5209 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5209 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5210 ASSERT(instr->temp()->Equals(instr->result()));
5211 Register prototype_reg = ToRegister(instr->temp()); 5210 Register prototype_reg = ToRegister(instr->temp());
5212 Register map_reg = ToRegister(instr->temp2()); 5211 Register map_reg = ToRegister(instr->temp2());
5213 5212
5214 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 5213 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5215 ZoneList<Handle<Map> >* maps = instr->maps(); 5214 ZoneList<Handle<Map> >* maps = instr->maps();
5216 5215
5217 ASSERT(prototypes->length() == maps->length()); 5216 ASSERT(prototypes->length() == maps->length());
5218 5217
5219 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 5218 if (instr->hydrogen()->CanOmitPrototypeChecks()) {
5220 for (int i = 0; i < maps->length(); i++) { 5219 for (int i = 0; i < maps->length(); i++) {
5221 prototype_maps_.Add(maps->at(i), info()->zone()); 5220 prototype_maps_.Add(maps->at(i), info()->zone());
5222 } 5221 }
5223 __ LoadHeapObject(prototype_reg,
5224 prototypes->at(prototypes->length() - 1));
5225 } else { 5222 } else {
5226 for (int i = 0; i < prototypes->length(); i++) { 5223 for (int i = 0; i < prototypes->length(); i++) {
5227 __ LoadHeapObject(prototype_reg, prototypes->at(i)); 5224 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5228 __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); 5225 __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5229 DoCheckMapCommon(map_reg, 5226 DoCheckMapCommon(map_reg,
5230 maps->at(i), 5227 maps->at(i),
5231 ALLOW_ELEMENT_TRANSITION_MAPS, 5228 ALLOW_ELEMENT_TRANSITION_MAPS,
5232 instr->environment()); 5229 instr->environment());
5233 } 5230 }
5234 } 5231 }
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
6100 __ Subu(scratch, result, scratch); 6097 __ Subu(scratch, result, scratch);
6101 __ lw(result, FieldMemOperand(scratch, 6098 __ lw(result, FieldMemOperand(scratch,
6102 FixedArray::kHeaderSize - kPointerSize)); 6099 FixedArray::kHeaderSize - kPointerSize));
6103 __ bind(&done); 6100 __ bind(&done);
6104 } 6101 }
6105 6102
6106 6103
6107 #undef __ 6104 #undef __
6108 6105
6109 } } // namespace v8::internal 6106 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/mips/lithium-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698