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

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: 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
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 5156 matching lines...) Expand 10 before | Expand all | Expand 10 after
5167 __ ClampUint8(input_reg); 5167 __ ClampUint8(input_reg);
5168 5168
5169 __ bind(&done); 5169 __ bind(&done);
5170 } 5170 }
5171 5171
5172 5172
5173 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5173 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5174 ASSERT(instr->temp()->Equals(instr->result())); 5174 ASSERT(instr->temp()->Equals(instr->result()));
5175 Register reg = ToRegister(instr->temp()); 5175 Register reg = ToRegister(instr->temp());
5176 5176
5177 Handle<JSObject> holder = instr->holder(); 5177 ZoneList< Handle<JSObject> >* prototypes = instr->prototypes();
5178 Handle<JSObject> current_prototype = instr->prototype(); 5178 ZoneList< Handle<Map> >* maps = instr->maps();
5179 5179
5180 // Load prototype object. 5180 ASSERT(prototypes->length() == maps->length());
5181 __ LoadHeapObject(reg, current_prototype);
5182 5181
5183 // Check prototype maps up to the holder. 5182 for (int i = 0; i < prototypes->length(); i++) {
5184 while (!current_prototype.is_identical_to(holder)) { 5183 __ LoadHeapObject(reg, prototypes->at(i));
5185 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()), 5184 DoCheckMapCommon(reg, maps->at(i), ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5186 ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5187
5188 current_prototype =
5189 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
5190 // Load next prototype object.
5191 __ LoadHeapObject(reg, current_prototype);
5192 } 5185 }
5193
5194 // Check the holder map.
5195 DoCheckMapCommon(reg, Handle<Map>(current_prototype->map()),
5196 ALLOW_ELEMENT_TRANSITION_MAPS, instr);
5197 } 5186 }
5198 5187
5199 5188
5200 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { 5189 void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
5201 class DeferredAllocateObject: public LDeferredCode { 5190 class DeferredAllocateObject: public LDeferredCode {
5202 public: 5191 public:
5203 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr) 5192 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr)
5204 : LDeferredCode(codegen), instr_(instr) { } 5193 : LDeferredCode(codegen), instr_(instr) { }
5205 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); } 5194 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); }
5206 virtual LInstruction* instr() { return instr_; } 5195 virtual LInstruction* instr() { return instr_; }
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
5955 FixedArray::kHeaderSize - kPointerSize)); 5944 FixedArray::kHeaderSize - kPointerSize));
5956 __ bind(&done); 5945 __ bind(&done);
5957 } 5946 }
5958 5947
5959 5948
5960 #undef __ 5949 #undef __
5961 5950
5962 } } // namespace v8::internal 5951 } } // namespace v8::internal
5963 5952
5964 #endif // V8_TARGET_ARCH_IA32 5953 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698