| OLD | NEW |
| 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 #ifndef V8_HYDROGEN_H_ | 5 #ifndef V8_HYDROGEN_H_ |
| 6 #define V8_HYDROGEN_H_ | 6 #define V8_HYDROGEN_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2306 } | 2306 } |
| 2307 void BindIfLive(Variable* var, HValue* value) { | 2307 void BindIfLive(Variable* var, HValue* value) { |
| 2308 HEnvironment* env = environment(); | 2308 HEnvironment* env = environment(); |
| 2309 int index = env->IndexFor(var); | 2309 int index = env->IndexFor(var); |
| 2310 env->Bind(index, value); | 2310 env->Bind(index, value); |
| 2311 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { | 2311 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { |
| 2312 HEnvironmentMarker* bind = | 2312 HEnvironmentMarker* bind = |
| 2313 Add<HEnvironmentMarker>(HEnvironmentMarker::BIND, index); | 2313 Add<HEnvironmentMarker>(HEnvironmentMarker::BIND, index); |
| 2314 USE(bind); | 2314 USE(bind); |
| 2315 #ifdef DEBUG | 2315 #ifdef DEBUG |
| 2316 bind->set_closure(env->closure()); | 2316 if (!env->closure().is_null()) bind->set_closure(env->closure()); |
| 2317 #endif | 2317 #endif |
| 2318 } | 2318 } |
| 2319 } | 2319 } |
| 2320 HValue* LookupAndMakeLive(Variable* var) { | 2320 HValue* LookupAndMakeLive(Variable* var) { |
| 2321 HEnvironment* env = environment(); | 2321 HEnvironment* env = environment(); |
| 2322 int index = env->IndexFor(var); | 2322 int index = env->IndexFor(var); |
| 2323 HValue* value = env->Lookup(index); | 2323 HValue* value = env->Lookup(index); |
| 2324 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { | 2324 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { |
| 2325 HEnvironmentMarker* lookup = | 2325 HEnvironmentMarker* lookup = |
| 2326 Add<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index); | 2326 Add<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index); |
| 2327 USE(lookup); | 2327 USE(lookup); |
| 2328 #ifdef DEBUG | 2328 #ifdef DEBUG |
| 2329 lookup->set_closure(env->closure()); | 2329 if (!env->closure().is_null()) lookup->set_closure(env->closure()); |
| 2330 #endif | 2330 #endif |
| 2331 } | 2331 } |
| 2332 return value; | 2332 return value; |
| 2333 } | 2333 } |
| 2334 | 2334 |
| 2335 // The value of the arguments object is allowed in some but not most value | 2335 // The value of the arguments object is allowed in some but not most value |
| 2336 // contexts. (It's allowed in all effect contexts and disallowed in all | 2336 // contexts. (It's allowed in all effect contexts and disallowed in all |
| 2337 // test contexts.) | 2337 // test contexts.) |
| 2338 void VisitForValue(Expression* expr, | 2338 void VisitForValue(Expression* expr, |
| 2339 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED); | 2339 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED); |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3047 } | 3047 } |
| 3048 | 3048 |
| 3049 private: | 3049 private: |
| 3050 HGraphBuilder* builder_; | 3050 HGraphBuilder* builder_; |
| 3051 }; | 3051 }; |
| 3052 | 3052 |
| 3053 | 3053 |
| 3054 } } // namespace v8::internal | 3054 } } // namespace v8::internal |
| 3055 | 3055 |
| 3056 #endif // V8_HYDROGEN_H_ | 3056 #endif // V8_HYDROGEN_H_ |
| OLD | NEW |