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

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

Issue 244383002: Fix field type handling in load elimination. (Closed) Base URL: git@github.com:v8/v8.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/unique.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
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 5179 matching lines...) Expand 10 before | Expand all | Expand 10 after
5190 ASSERT(input->IsRegister()); 5190 ASSERT(input->IsRegister());
5191 Register reg = ToRegister(input); 5191 Register reg = ToRegister(input);
5192 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 5192 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
5193 5193
5194 DeferredCheckMaps* deferred = NULL; 5194 DeferredCheckMaps* deferred = NULL;
5195 if (instr->hydrogen()->has_migration_target()) { 5195 if (instr->hydrogen()->has_migration_target()) {
5196 deferred = new(zone()) DeferredCheckMaps(this, instr, reg); 5196 deferred = new(zone()) DeferredCheckMaps(this, instr, reg);
5197 __ bind(deferred->check_maps()); 5197 __ bind(deferred->check_maps());
5198 } 5198 }
5199 5199
5200 UniqueSet<Map> map_set = instr->hydrogen()->map_set(); 5200 const UniqueSet<Map>* map_set = instr->hydrogen()->map_set();
5201 Label success; 5201 Label success;
5202 for (int i = 0; i < map_set.size() - 1; i++) { 5202 for (int i = 0; i < map_set->size() - 1; i++) {
5203 Handle<Map> map = map_set.at(i).handle(); 5203 Handle<Map> map = map_set->at(i).handle();
5204 __ CompareMapAndBranch(map_reg, map, &success, eq, &success); 5204 __ CompareMapAndBranch(map_reg, map, &success, eq, &success);
5205 } 5205 }
5206 Handle<Map> map = map_set.at(map_set.size() - 1).handle(); 5206 Handle<Map> map = map_set->at(map_set->size() - 1).handle();
5207 // Do the CompareMap() directly within the Branch() and DeoptimizeIf(). 5207 // Do the CompareMap() directly within the Branch() and DeoptimizeIf().
5208 if (instr->hydrogen()->has_migration_target()) { 5208 if (instr->hydrogen()->has_migration_target()) {
5209 __ Branch(deferred->entry(), ne, map_reg, Operand(map)); 5209 __ Branch(deferred->entry(), ne, map_reg, Operand(map));
5210 } else { 5210 } else {
5211 DeoptimizeIf(ne, instr->environment(), map_reg, Operand(map)); 5211 DeoptimizeIf(ne, instr->environment(), map_reg, Operand(map));
5212 } 5212 }
5213 5213
5214 __ bind(&success); 5214 __ bind(&success);
5215 } 5215 }
5216 5216
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
5910 __ lw(result, FieldMemOperand(scratch, 5910 __ lw(result, FieldMemOperand(scratch,
5911 FixedArray::kHeaderSize - kPointerSize)); 5911 FixedArray::kHeaderSize - kPointerSize));
5912 __ bind(deferred->exit()); 5912 __ bind(deferred->exit());
5913 __ bind(&done); 5913 __ bind(&done);
5914 } 5914 }
5915 5915
5916 5916
5917 #undef __ 5917 #undef __
5918 5918
5919 } } // namespace v8::internal 5919 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-codegen-ia32.cc ('k') | src/unique.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698