OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
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 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 HInstruction* AddElementAccess( | 1276 HInstruction* AddElementAccess( |
1277 HValue* elements, | 1277 HValue* elements, |
1278 HValue* checked_key, | 1278 HValue* checked_key, |
1279 HValue* val, | 1279 HValue* val, |
1280 HValue* dependency, | 1280 HValue* dependency, |
1281 ElementsKind elements_kind, | 1281 ElementsKind elements_kind, |
1282 bool is_store, | 1282 bool is_store, |
1283 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); | 1283 LoadKeyedHoleMode load_mode = NEVER_RETURN_HOLE); |
1284 | 1284 |
1285 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); | 1285 HLoadNamedField* BuildLoadNamedField(HValue* object, HObjectAccess access); |
| 1286 HInstruction* AddLoadNamedField(HValue* object, HObjectAccess access); |
1286 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); | 1287 HInstruction* BuildLoadStringLength(HValue* object, HValue* checked_value); |
1287 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); | 1288 HStoreNamedField* AddStoreMapConstant(HValue* object, Handle<Map>); |
1288 HLoadNamedField* AddLoadElements(HValue* object); | 1289 HLoadNamedField* AddLoadElements(HValue* object); |
1289 | 1290 |
1290 bool MatchRotateRight(HValue* left, | 1291 bool MatchRotateRight(HValue* left, |
1291 HValue* right, | 1292 HValue* right, |
1292 HValue** operand, | 1293 HValue** operand, |
1293 HValue** shift_amount); | 1294 HValue** shift_amount); |
1294 | 1295 |
1295 HInstruction* BuildBinaryOperation(Token::Value op, | 1296 HInstruction* BuildBinaryOperation(Token::Value op, |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1941 !var->is_arguments() && | 1942 !var->is_arguments() && |
1942 !value->IsArgumentsObject() && | 1943 !value->IsArgumentsObject() && |
1943 env->is_local_index(index); | 1944 env->is_local_index(index); |
1944 } | 1945 } |
1945 void BindIfLive(Variable* var, HValue* value) { | 1946 void BindIfLive(Variable* var, HValue* value) { |
1946 HEnvironment* env = environment(); | 1947 HEnvironment* env = environment(); |
1947 int index = env->IndexFor(var); | 1948 int index = env->IndexFor(var); |
1948 env->Bind(index, value); | 1949 env->Bind(index, value); |
1949 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { | 1950 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { |
1950 HEnvironmentMarker* bind = | 1951 HEnvironmentMarker* bind = |
1951 New<HEnvironmentMarker>(HEnvironmentMarker::BIND, index); | 1952 Add<HEnvironmentMarker>(HEnvironmentMarker::BIND, index); |
1952 AddInstruction(bind); | 1953 USE(bind); |
1953 #ifdef DEBUG | 1954 #ifdef DEBUG |
1954 bind->set_closure(env->closure()); | 1955 bind->set_closure(env->closure()); |
1955 #endif | 1956 #endif |
1956 } | 1957 } |
1957 } | 1958 } |
| 1959 |
1958 HValue* LookupAndMakeLive(Variable* var) { | 1960 HValue* LookupAndMakeLive(Variable* var) { |
1959 HEnvironment* env = environment(); | 1961 HEnvironment* env = environment(); |
1960 int index = env->IndexFor(var); | 1962 int index = env->IndexFor(var); |
1961 HValue* value = env->Lookup(index); | 1963 HValue* value = env->Lookup(index); |
1962 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { | 1964 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { |
1963 HEnvironmentMarker* lookup = | 1965 HEnvironmentMarker* lookup = |
1964 New<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index); | 1966 Add<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index); |
1965 AddInstruction(lookup); | 1967 USE(lookup); |
1966 #ifdef DEBUG | 1968 #ifdef DEBUG |
1967 lookup->set_closure(env->closure()); | 1969 lookup->set_closure(env->closure()); |
1968 #endif | 1970 #endif |
1969 } | 1971 } |
1970 return value; | 1972 return value; |
1971 } | 1973 } |
1972 | 1974 |
1973 // The value of the arguments object is allowed in some but not most value | 1975 // The value of the arguments object is allowed in some but not most value |
1974 // contexts. (It's allowed in all effect contexts and disallowed in all | 1976 // contexts. (It's allowed in all effect contexts and disallowed in all |
1975 // test contexts.) | 1977 // test contexts.) |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 } | 2485 } |
2484 | 2486 |
2485 private: | 2487 private: |
2486 HGraphBuilder* builder_; | 2488 HGraphBuilder* builder_; |
2487 }; | 2489 }; |
2488 | 2490 |
2489 | 2491 |
2490 } } // namespace v8::internal | 2492 } } // namespace v8::internal |
2491 | 2493 |
2492 #endif // V8_HYDROGEN_H_ | 2494 #endif // V8_HYDROGEN_H_ |
OLD | NEW |