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

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

Issue 11864013: Make HCheckPrototypeMaps compatible with parallel recompilation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comment Created 7 years, 11 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 5151 matching lines...) Expand 10 before | Expand all | Expand 10 after
5162 __ ClampUint8(input_reg); 5162 __ ClampUint8(input_reg);
5163 5163
5164 __ bind(&done); 5164 __ bind(&done);
5165 } 5165 }
5166 5166
5167 5167
5168 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5168 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5169 ASSERT(instr->temp()->Equals(instr->result())); 5169 ASSERT(instr->temp()->Equals(instr->result()));
5170 Register reg = ToRegister(instr->temp()); 5170 Register reg = ToRegister(instr->temp());
5171 5171
5172 Handle<JSObject> holder = instr->holder(); 5172 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5173 Handle<JSObject> current_prototype = instr->prototype(); 5173 ZoneList<Handle<Map> >* maps = instr->maps();
5174 5174
5175 // Load prototype object. 5175 ASSERT(prototypes->length() == maps->length());
5176 __ LoadHeapObject(reg, current_prototype);
5177 5176
5178 // Check prototype maps up to the holder. 5177 for (int i = 0; i < prototypes->length(); i++) {
5179 while (!current_prototype.is_identical_to(holder)) { 5178 __ LoadHeapObject(reg, prototypes->at(i));
5180 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()), 5179 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5181 ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5182
5183 current_prototype =
5184 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
5185 // Load next prototype object.
5186 __ LoadHeapObject(reg, current_prototype);
5187 } 5180 }
5188
5189 // Check the holder map.
5190 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
5191 ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5192 } 5181 }
5193 5182
5194 5183
5195 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { 5184 void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
5196 class DeferredAllocateObject: public LDeferredCode { 5185 class DeferredAllocateObject: public LDeferredCode {
5197 public: 5186 public:
5198 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr) 5187 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr)
5199 : LDeferredCode(codegen), instr_(instr) { } 5188 : LDeferredCode(codegen), instr_(instr) { }
5200 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); } 5189 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); }
5201 virtual LInstruction* instr() { return instr_; } 5190 virtual LInstruction* instr() { return instr_; }
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
5977 FixedArray::kHeaderSize - kPointerSize)); 5966 FixedArray::kHeaderSize - kPointerSize));
5978 __ bind(&done); 5967 __ bind(&done);
5979 } 5968 }
5980 5969
5981 5970
5982 #undef __ 5971 #undef __
5983 5972
5984 } } // namespace v8::internal 5973 } } // namespace v8::internal
5985 5974
5986 #endif // V8_TARGET_ARCH_IA32 5975 #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