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

Side by Side Diff: src/arm/lithium-codegen-arm.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/arm/lithium-arm.h ('k') | src/hydrogen.cc » ('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 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5311 5311
5312 __ bind(&done); 5312 __ bind(&done);
5313 } 5313 }
5314 5314
5315 5315
5316 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { 5316 void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
5317 ASSERT(instr->temp()->Equals(instr->result())); 5317 ASSERT(instr->temp()->Equals(instr->result()));
5318 Register prototype_reg = ToRegister(instr->temp()); 5318 Register prototype_reg = ToRegister(instr->temp());
5319 Register map_reg = ToRegister(instr->temp2()); 5319 Register map_reg = ToRegister(instr->temp2());
5320 5320
5321 Handle<JSObject> holder = instr->holder(); 5321 ZoneList<Handle<JSObject> >* prototypes = instr->prototypes();
5322 Handle<JSObject> current_prototype = instr->prototype(); 5322 ZoneList<Handle<Map> >* maps = instr->maps();
5323 5323
5324 // Load prototype object. 5324 ASSERT(prototypes->length() == maps->length());
5325 __ LoadHeapObject(prototype_reg, current_prototype);
5326 5325
5327 // Check prototype maps up to the holder. 5326 for (int i = 0; i < prototypes->length(); i++) {
5328 while (!current_prototype.is_identical_to(holder)) { 5327 __ LoadHeapObject(prototype_reg, prototypes->at(i));
5329 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset)); 5328 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5330 DoCheckMapCommon(map_reg, 5329 DoCheckMapCommon(map_reg,
5331 Handle<Map>(current_prototype->map()), 5330 maps->at(i),
5332 ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment()); 5331 ALLOW_ELEMENT_TRANSITION_MAPS,
5333 current_prototype = 5332 instr->environment());
5334 Handle<JSObject>(JSObject::cast(current_prototype->GetPrototype()));
5335 // Load next prototype object.
5336 __ LoadHeapObject(prototype_reg, current_prototype);
5337 } 5333 }
5338
5339 // Check the holder map.
5340 __ ldr(map_reg, FieldMemOperand(prototype_reg, HeapObject::kMapOffset));
5341 DoCheckMapCommon(map_reg,
5342 Handle<Map>(current_prototype->map()),
5343 ALLOW_ELEMENT_TRANSITION_MAPS, instr->environment());
5344 } 5334 }
5345 5335
5346 5336
5347 void LCodeGen::DoAllocateObject(LAllocateObject* instr) { 5337 void LCodeGen::DoAllocateObject(LAllocateObject* instr) {
5348 class DeferredAllocateObject: public LDeferredCode { 5338 class DeferredAllocateObject: public LDeferredCode {
5349 public: 5339 public:
5350 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr) 5340 DeferredAllocateObject(LCodeGen* codegen, LAllocateObject* instr)
5351 : LDeferredCode(codegen), instr_(instr) { } 5341 : LDeferredCode(codegen), instr_(instr) { }
5352 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); } 5342 virtual void Generate() { codegen()->DoDeferredAllocateObject(instr_); }
5353 virtual LInstruction* instr() { return instr_; } 5343 virtual LInstruction* instr() { return instr_; }
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
6111 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); 6101 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize));
6112 __ ldr(result, FieldMemOperand(scratch, 6102 __ ldr(result, FieldMemOperand(scratch,
6113 FixedArray::kHeaderSize - kPointerSize)); 6103 FixedArray::kHeaderSize - kPointerSize));
6114 __ bind(&done); 6104 __ bind(&done);
6115 } 6105 }
6116 6106
6117 6107
6118 #undef __ 6108 #undef __
6119 6109
6120 } } // namespace v8::internal 6110 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698