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

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

Issue 264693011: Various cleanups in check elimination. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/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 5159 matching lines...) Expand 10 before | Expand all | Expand 10 after
5170 ASSERT(input->IsRegister()); 5170 ASSERT(input->IsRegister());
5171 Register reg = ToRegister(input); 5171 Register reg = ToRegister(input);
5172 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 5172 __ lw(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
5173 5173
5174 DeferredCheckMaps* deferred = NULL; 5174 DeferredCheckMaps* deferred = NULL;
5175 if (instr->hydrogen()->has_migration_target()) { 5175 if (instr->hydrogen()->has_migration_target()) {
5176 deferred = new(zone()) DeferredCheckMaps(this, instr, reg); 5176 deferred = new(zone()) DeferredCheckMaps(this, instr, reg);
5177 __ bind(deferred->check_maps()); 5177 __ bind(deferred->check_maps());
5178 } 5178 }
5179 5179
5180 const UniqueSet<Map>* map_set = instr->hydrogen()->map_set(); 5180 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5181 Label success; 5181 Label success;
5182 for (int i = 0; i < map_set->size() - 1; i++) { 5182 for (int i = 0; i < maps->size() - 1; i++) {
5183 Handle<Map> map = map_set->at(i).handle(); 5183 Handle<Map> map = maps->at(i).handle();
5184 __ CompareMapAndBranch(map_reg, map, &success, eq, &success); 5184 __ CompareMapAndBranch(map_reg, map, &success, eq, &success);
5185 } 5185 }
5186 Handle<Map> map = map_set->at(map_set->size() - 1).handle(); 5186 Handle<Map> map = maps->at(maps->size() - 1).handle();
5187 // Do the CompareMap() directly within the Branch() and DeoptimizeIf(). 5187 // Do the CompareMap() directly within the Branch() and DeoptimizeIf().
5188 if (instr->hydrogen()->has_migration_target()) { 5188 if (instr->hydrogen()->has_migration_target()) {
5189 __ Branch(deferred->entry(), ne, map_reg, Operand(map)); 5189 __ Branch(deferred->entry(), ne, map_reg, Operand(map));
5190 } else { 5190 } else {
5191 DeoptimizeIf(ne, instr->environment(), map_reg, Operand(map)); 5191 DeoptimizeIf(ne, instr->environment(), map_reg, Operand(map));
5192 } 5192 }
5193 5193
5194 __ bind(&success); 5194 __ bind(&success);
5195 } 5195 }
5196 5196
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
5891 __ lw(result, FieldMemOperand(scratch, 5891 __ lw(result, FieldMemOperand(scratch,
5892 FixedArray::kHeaderSize - kPointerSize)); 5892 FixedArray::kHeaderSize - kPointerSize));
5893 __ bind(deferred->exit()); 5893 __ bind(deferred->exit());
5894 __ bind(&done); 5894 __ bind(&done);
5895 } 5895 }
5896 5896
5897 5897
5898 #undef __ 5898 #undef __
5899 5899
5900 } } // namespace v8::internal 5900 } } // 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