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

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

Issue 264973013: Don't add code dependencies eagerly for HCheckMaps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE 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/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "v8.h" 5 #include "v8.h"
6 6
7 #include "arm/lithium-codegen-arm.h" 7 #include "arm/lithium-codegen-arm.h"
8 #include "arm/lithium-gap-resolver-arm.h" 8 #include "arm/lithium-gap-resolver-arm.h"
9 #include "code-stubs.h" 9 #include "code-stubs.h"
10 #include "stub-cache.h" 10 #include "stub-cache.h"
(...skipping 5122 matching lines...) Expand 10 before | Expand all | Expand 10 after
5133 codegen()->DoDeferredInstanceMigration(instr_, object_); 5133 codegen()->DoDeferredInstanceMigration(instr_, object_);
5134 } 5134 }
5135 Label* check_maps() { return &check_maps_; } 5135 Label* check_maps() { return &check_maps_; }
5136 virtual LInstruction* instr() V8_OVERRIDE { return instr_; } 5136 virtual LInstruction* instr() V8_OVERRIDE { return instr_; }
5137 private: 5137 private:
5138 LCheckMaps* instr_; 5138 LCheckMaps* instr_;
5139 Label check_maps_; 5139 Label check_maps_;
5140 Register object_; 5140 Register object_;
5141 }; 5141 };
5142 5142
5143 if (instr->hydrogen()->CanOmitMapChecks()) return; 5143 if (instr->hydrogen()->IsStabilityCheck()) {
5144 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5145 for (int i = 0; i < maps->size(); ++i) {
5146 AddStabilityDependency(maps->at(i).handle());
5147 }
5148 return;
5149 }
5150
5144 Register map_reg = scratch0(); 5151 Register map_reg = scratch0();
5145 5152
5146 LOperand* input = instr->value(); 5153 LOperand* input = instr->value();
5147 ASSERT(input->IsRegister()); 5154 ASSERT(input->IsRegister());
5148 Register reg = ToRegister(input); 5155 Register reg = ToRegister(input);
5149 5156
5150 __ ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); 5157 __ ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset));
5151 5158
5152 DeferredCheckMaps* deferred = NULL; 5159 DeferredCheckMaps* deferred = NULL;
5153 if (instr->hydrogen()->has_migration_target()) { 5160 if (instr->hydrogen()->HasMigrationTarget()) {
5154 deferred = new(zone()) DeferredCheckMaps(this, instr, reg); 5161 deferred = new(zone()) DeferredCheckMaps(this, instr, reg);
5155 __ bind(deferred->check_maps()); 5162 __ bind(deferred->check_maps());
5156 } 5163 }
5157 5164
5158 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); 5165 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5159 Label success; 5166 Label success;
5160 for (int i = 0; i < maps->size() - 1; i++) { 5167 for (int i = 0; i < maps->size() - 1; i++) {
5161 Handle<Map> map = maps->at(i).handle(); 5168 Handle<Map> map = maps->at(i).handle();
5162 __ CompareMap(map_reg, map, &success); 5169 __ CompareMap(map_reg, map, &success);
5163 __ b(eq, &success); 5170 __ b(eq, &success);
5164 } 5171 }
5165 5172
5166 Handle<Map> map = maps->at(maps->size() - 1).handle(); 5173 Handle<Map> map = maps->at(maps->size() - 1).handle();
5167 __ CompareMap(map_reg, map, &success); 5174 __ CompareMap(map_reg, map, &success);
5168 if (instr->hydrogen()->has_migration_target()) { 5175 if (instr->hydrogen()->HasMigrationTarget()) {
5169 __ b(ne, deferred->entry()); 5176 __ b(ne, deferred->entry());
5170 } else { 5177 } else {
5171 DeoptimizeIf(ne, instr->environment()); 5178 DeoptimizeIf(ne, instr->environment());
5172 } 5179 }
5173 5180
5174 __ bind(&success); 5181 __ bind(&success);
5175 } 5182 }
5176 5183
5177 5184
5178 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) { 5185 void LCodeGen::DoClampDToUint8(LClampDToUint8* instr) {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
5830 __ ldr(result, FieldMemOperand(scratch, 5837 __ ldr(result, FieldMemOperand(scratch,
5831 FixedArray::kHeaderSize - kPointerSize)); 5838 FixedArray::kHeaderSize - kPointerSize));
5832 __ bind(deferred->exit()); 5839 __ bind(deferred->exit());
5833 __ bind(&done); 5840 __ bind(&done);
5834 } 5841 }
5835 5842
5836 5843
5837 #undef __ 5844 #undef __
5838 5845
5839 } } // namespace v8::internal 5846 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.cc ('k') | src/arm64/lithium-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698