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

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

Issue 13620003: 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 | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 4959 matching lines...) Expand 10 before | Expand all | Expand 10 after
4970 // smi 4970 // smi
4971 __ bind(&is_smi); 4971 __ bind(&is_smi);
4972 __ SmiToInteger32(input_reg, input_reg); 4972 __ SmiToInteger32(input_reg, input_reg);
4973 __ ClampUint8(input_reg); 4973 __ ClampUint8(input_reg);
4974 4974
4975 __ bind(&done); 4975 __ bind(&done);
4976 } 4976 }
4977 4977
4978 4978
4979 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 4979 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
4980 ASSERT(instr->temp()->Equals(instr->result()));
4981 Register reg = ToRegister(instr->temp()); 4980 Register reg = ToRegister(instr->temp());
4982 4981
4983 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes(); 4982 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
4984 ZoneList<Handle<Map> >* maps = instr->maps(); 4983 ZoneList<Handle<Map> >* maps = instr->maps();
4985 4984
4986 ASSERT(prototypes->length() == maps->length()); 4985 ASSERT(prototypes->length() == maps->length());
4987 4986
4988 if (instr->hydrogen()->CanOmitPrototypeChecks()) { 4987 if (instr->hydrogen()->CanOmitPrototypeChecks()) {
4989 for (int i = 0; i < maps->length(); i++) { 4988 for (int i = 0; i < maps->length(); i++) {
4990 prototype_maps_.Add(maps->at(i), info()->zone()); 4989 prototype_maps_.Add(maps->at(i), info()->zone());
4991 } 4990 }
4992 __ LoadHeapObject(reg, prototypes->at(prototypes->length() - 1));
4993 } else { 4991 } else {
4994 for (int i = 0; i < prototypes->length(); i++) { 4992 for (int i = 0; i < prototypes->length(); i++) {
4995 __ LoadHeapObject(reg, prototypes->at(i)); 4993 __ LoadHeapObject(reg, prototypes->at(i));
4996 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr); 4994 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
4997 } 4995 }
4998 } 4996 }
4999 } 4997 }
5000 4998
5001 4999
5002 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { 5000 void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
5840 FixedArray::kHeaderSize - kPointerSize)); 5838 FixedArray::kHeaderSize - kPointerSize));
5841 __ bind(&done); 5839 __ bind(&done);
5842 } 5840 }
5843 5841
5844 5842
5845 #undef __ 5843 #undef __
5846 5844
5847 } } // namespace v8::internal 5845 } } // namespace v8::internal
5848 5846
5849 #endif // V8_TARGET_ARCH_X64 5847 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698