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

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

Issue 21639003: MIPS: Replace HCheckPrototypeMaps by explicit map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 5254 matching lines...) Expand 10 before | Expand all | Expand 10 after
5265 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg); 5265 __ ClampDoubleToUint8(result_reg, double_scratch0(), temp_reg);
5266 __ jmp(&done); 5266 __ jmp(&done);
5267 5267
5268 __ bind(&is_smi); 5268 __ bind(&is_smi);
5269 __ ClampUint8(result_reg, scratch); 5269 __ ClampUint8(result_reg, scratch);
5270 5270
5271 __ bind(&done); 5271 __ bind(&done);
5272 } 5272 }
5273 5273
5274 5274
5275 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5276 if (instr->hydrogen()->CanOmitPrototypeChecks()) return;
5277
5278 Register prototype_reg = ToRegister(instr->temp());
5279 Register map_reg = ToRegister(instr->temp2());
5280
5281 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5282 ZoneList<Handle<Map> >* maps = instr->maps();
5283
5284 ASSERT(prototypes->length() == maps->length());
5285
5286 for (int i = 0; i < prototypes->length(); i++) {
5287 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5288 __ lw(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5289 DoCheckMapCommon(map_reg, maps->at(i), instr->environment());
5290 }
5291 }
5292
5293
5294 void LCodeGen::DoAllocate(LAllocate* instr) { 5275 void LCodeGen::DoAllocate(LAllocate* instr) {
5295 class DeferredAllocate: public LDeferredCode { 5276 class DeferredAllocate: public LDeferredCode {
5296 public: 5277 public:
5297 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5278 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5298 : LDeferredCode(codegen), instr_(instr) { } 5279 : LDeferredCode(codegen), instr_(instr) { }
5299 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } 5280 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); }
5300 virtual LInstruction* instr() { return instr_; } 5281 virtual LInstruction* instr() { return instr_; }
5301 private: 5282 private:
5302 LAllocate* instr_; 5283 LAllocate* instr_;
5303 }; 5284 };
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 __ Subu(scratch, result, scratch); 5823 __ Subu(scratch, result, scratch);
5843 __ lw(result, FieldMemOperand(scratch, 5824 __ lw(result, FieldMemOperand(scratch,
5844 FixedArray::kHeaderSize - kPointerSize)); 5825 FixedArray::kHeaderSize - kPointerSize));
5845 __ bind(&done); 5826 __ bind(&done);
5846 } 5827 }
5847 5828
5848 5829
5849 #undef __ 5830 #undef __
5850 5831
5851 } } // namespace v8::internal 5832 } } // 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