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

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

Issue 21065006: Replace HCheckPrototypeMaps by explicit map checks of constant values. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Prepare all HConstant js objects 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 | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.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 5978 matching lines...) Expand 10 before | Expand all | Expand 10 after
5989 __ bind(&is_smi); 5989 __ bind(&is_smi);
5990 if (!input_reg.is(result_reg)) { 5990 if (!input_reg.is(result_reg)) {
5991 __ mov(result_reg, input_reg); 5991 __ mov(result_reg, input_reg);
5992 } 5992 }
5993 __ SmiUntag(result_reg); 5993 __ SmiUntag(result_reg);
5994 __ ClampUint8(result_reg); 5994 __ ClampUint8(result_reg);
5995 __ bind(&done); 5995 __ bind(&done);
5996 } 5996 }
5997 5997
5998 5998
5999 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
6000 if (instr->hydrogen()->CanOmitPrototypeChecks()) return;
6001 Register reg = ToRegister(instr->temp());
6002
6003 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
6004 ZoneList<Handle<Map> >* maps = instr->maps();
6005
6006 ASSERT(prototypes->length() == maps->length());
6007
6008 for (int i = 0; i < prototypes->length(); i++) {
6009 __ LoadHeapObject(reg, prototypes->at(i));
6010 DoCheckMapCommon(reg, maps->at(i), instr);
6011 }
6012 }
6013
6014
6015 void LCodeGen::DoAllocate(LAllocate* instr) { 5999 void LCodeGen::DoAllocate(LAllocate* instr) {
6016 class DeferredAllocate: public LDeferredCode { 6000 class DeferredAllocate: public LDeferredCode {
6017 public: 6001 public:
6018 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 6002 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
6019 : LDeferredCode(codegen), instr_(instr) { } 6003 : LDeferredCode(codegen), instr_(instr) { }
6020 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } 6004 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); }
6021 virtual LInstruction* instr() { return instr_; } 6005 virtual LInstruction* instr() { return instr_; }
6022 private: 6006 private:
6023 LAllocate* instr_; 6007 LAllocate* instr_;
6024 }; 6008 };
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
6513 FixedArray::kHeaderSize - kPointerSize)); 6497 FixedArray::kHeaderSize - kPointerSize));
6514 __ bind(&done); 6498 __ bind(&done);
6515 } 6499 }
6516 6500
6517 6501
6518 #undef __ 6502 #undef __
6519 6503
6520 } } // namespace v8::internal 6504 } } // namespace v8::internal
6521 6505
6522 #endif // V8_TARGET_ARCH_IA32 6506 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698