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

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

Issue 368263003: Use a stub in crankshaft for grow store arrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Performance fixes. Created 6 years, 5 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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/lithium-codegen.h" 7 #include "src/lithium-codegen.h"
8 8
9 #if V8_TARGET_ARCH_IA32 9 #if V8_TARGET_ARCH_IA32
10 #include "src/ia32/lithium-ia32.h" // NOLINT 10 #include "src/ia32/lithium-ia32.h" // NOLINT
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void LCodeGenBase::CheckEnvironmentUsage() { 105 void LCodeGenBase::CheckEnvironmentUsage() {
106 #ifdef DEBUG 106 #ifdef DEBUG
107 bool dead_block = false; 107 bool dead_block = false;
108 for (int i = 0; i < instructions_->length(); i++) { 108 for (int i = 0; i < instructions_->length(); i++) {
109 LInstruction* instr = instructions_->at(i); 109 LInstruction* instr = instructions_->at(i);
110 HValue* hval = instr->hydrogen_value(); 110 HValue* hval = instr->hydrogen_value();
111 if (instr->IsLabel()) dead_block = LLabel::cast(instr)->HasReplacement(); 111 if (instr->IsLabel()) dead_block = LLabel::cast(instr)->HasReplacement();
112 if (dead_block || !hval->block()->IsReachable()) continue; 112 if (dead_block || !hval->block()->IsReachable()) continue;
113 113
114 HInstruction* hinstr = HInstruction::cast(hval); 114 HInstruction* hinstr = HInstruction::cast(hval);
115 if (!hinstr->CanDeoptimize() && instr->HasEnvironment()) { 115 // TODO(mvstanton): Verify that the side effects exemption is correct and
116 // sufficient.
117 if (!hinstr->CanDeoptimize() && instr->HasEnvironment() &&
118 !(hinstr->IsCallWithDescriptor() &&
119 !hinstr->HasObservableSideEffects())) {
116 V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)\n", 120 V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)\n",
117 hinstr->Mnemonic(), instr->Mnemonic()); 121 hinstr->Mnemonic(), instr->Mnemonic());
118 } 122 }
119 123
120 if (instr->HasEnvironment() && !instr->environment()->has_been_used()) { 124 if (instr->HasEnvironment() && !instr->environment()->has_been_used()) {
121 V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)\n", 125 V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)\n",
122 hinstr->Mnemonic(), instr->Mnemonic()); 126 hinstr->Mnemonic(), instr->Mnemonic());
123 } 127 }
124 } 128 }
125 #endif 129 #endif
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 chunk_->AddDeprecationDependency(map); 228 chunk_->AddDeprecationDependency(map);
225 } 229 }
226 230
227 231
228 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) { 232 void LCodeGenBase::AddStabilityDependency(Handle<Map> map) {
229 if (!map->is_stable()) return Abort(kMapBecameUnstable); 233 if (!map->is_stable()) return Abort(kMapBecameUnstable);
230 chunk_->AddStabilityDependency(map); 234 chunk_->AddStabilityDependency(map);
231 } 235 }
232 236
233 } } // namespace v8::internal 237 } } // namespace v8::internal
OLDNEW
« src/ia32/lithium-ia32.cc ('K') | « src/isolate.cc ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698