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

Side by Side Diff: src/hydrogen.h

Issue 34523004: More Hydrogen templatization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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 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
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
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 #ifdef DEBUG 1953 #ifdef DEBUG
1954 bind->set_closure(env->closure()); 1954 bind->set_closure(env->closure());
1955 #else
1956 // "use" bind to make the compiler happy.
Benedikt Meurer 2013/10/22 08:38:57 We have a USE macro for this.
Igor Sheludko 2013/10/22 10:49:17 Done.
1957 (void)bind;
1955 #endif 1958 #endif
1956 } 1959 }
1957 } 1960 }
1961
1958 HValue* LookupAndMakeLive(Variable* var) { 1962 HValue* LookupAndMakeLive(Variable* var) {
1959 HEnvironment* env = environment(); 1963 HEnvironment* env = environment();
1960 int index = env->IndexFor(var); 1964 int index = env->IndexFor(var);
1961 HValue* value = env->Lookup(index); 1965 HValue* value = env->Lookup(index);
1962 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { 1966 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) {
1963 HEnvironmentMarker* lookup = 1967 HEnvironmentMarker* lookup =
1964 New<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index); 1968 Add<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index);
1965 AddInstruction(lookup);
1966 #ifdef DEBUG 1969 #ifdef DEBUG
1967 lookup->set_closure(env->closure()); 1970 lookup->set_closure(env->closure());
1971 #else
1972 // "use" lookup to make the compiler happy.
Benedikt Meurer 2013/10/22 08:38:57 Same as above.
Igor Sheludko 2013/10/22 10:49:17 Done.
1973 (void)lookup;
1968 #endif 1974 #endif
1969 } 1975 }
1970 return value; 1976 return value;
1971 } 1977 }
1972 1978
1973 // The value of the arguments object is allowed in some but not most value 1979 // 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 1980 // contexts. (It's allowed in all effect contexts and disallowed in all
1975 // test contexts.) 1981 // test contexts.)
1976 void VisitForValue(Expression* expr, 1982 void VisitForValue(Expression* expr,
1977 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED); 1983 ArgumentsAllowedFlag flag = ARGUMENTS_NOT_ALLOWED);
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
2483 } 2489 }
2484 2490
2485 private: 2491 private:
2486 HGraphBuilder* builder_; 2492 HGraphBuilder* builder_;
2487 }; 2493 };
2488 2494
2489 2495
2490 } } // namespace v8::internal 2496 } } // namespace v8::internal
2491 2497
2492 #endif // V8_HYDROGEN_H_ 2498 #endif // V8_HYDROGEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698