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

Side by Side Diff: src/x64/lithium-codegen-x64.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/objects-inl.h ('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 5023 matching lines...) Expand 10 before | Expand all | Expand 10 after
5034 5034
5035 // smi 5035 // smi
5036 __ bind(&is_smi); 5036 __ bind(&is_smi);
5037 __ SmiToInteger32(input_reg, input_reg); 5037 __ SmiToInteger32(input_reg, input_reg);
5038 __ ClampUint8(input_reg); 5038 __ ClampUint8(input_reg);
5039 5039
5040 __ bind(&done); 5040 __ bind(&done);
5041 } 5041 }
5042 5042
5043 5043
5044 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5045 if (instr->hydrogen()->CanOmitPrototypeChecks()) return;
5046 Register reg = ToRegister(instr->temp());
5047
5048 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5049 ZoneList<Handle<Map> >* maps = instr->maps();
5050
5051 ASSERT(prototypes->length() == maps->length());
5052
5053 for (int i = 0; i < prototypes->length(); i++) {
5054 __ LoadHeapObject(reg, prototypes->at(i));
5055 DoCheckMapCommon(reg, maps->at(i), instr);
5056 }
5057 }
5058
5059
5060 void LCodeGen::DoAllocate(LAllocate* instr) { 5044 void LCodeGen::DoAllocate(LAllocate* instr) {
5061 class DeferredAllocate: public LDeferredCode { 5045 class DeferredAllocate: public LDeferredCode {
5062 public: 5046 public:
5063 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5047 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5064 : LDeferredCode(codegen), instr_(instr) { } 5048 : LDeferredCode(codegen), instr_(instr) { }
5065 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); } 5049 virtual void Generate() { codegen()->DoDeferredAllocate(instr_); }
5066 virtual LInstruction* instr() { return instr_; } 5050 virtual LInstruction* instr() { return instr_; }
5067 private: 5051 private:
5068 LAllocate* instr_; 5052 LAllocate* instr_;
5069 }; 5053 };
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
5566 FixedArray::kHeaderSize - kPointerSize)); 5550 FixedArray::kHeaderSize - kPointerSize));
5567 __ bind(&done); 5551 __ bind(&done);
5568 } 5552 }
5569 5553
5570 5554
5571 #undef __ 5555 #undef __
5572 5556
5573 } } // namespace v8::internal 5557 } } // namespace v8::internal
5574 5558
5575 #endif // V8_TARGET_ARCH_X64 5559 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/x64/lithium-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698