| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |