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

Side by Side Diff: src/hydrogen.h

Issue 32513002: HEnvironmentMarker factory added (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
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 !var->is_arguments() && 1911 !var->is_arguments() &&
1912 !value->IsArgumentsObject() && 1912 !value->IsArgumentsObject() &&
1913 env->is_local_index(index); 1913 env->is_local_index(index);
1914 } 1914 }
1915 void BindIfLive(Variable* var, HValue* value) { 1915 void BindIfLive(Variable* var, HValue* value) {
1916 HEnvironment* env = environment(); 1916 HEnvironment* env = environment();
1917 int index = env->IndexFor(var); 1917 int index = env->IndexFor(var);
1918 env->Bind(index, value); 1918 env->Bind(index, value);
1919 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { 1919 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) {
1920 HEnvironmentMarker* bind = 1920 HEnvironmentMarker* bind =
1921 new(zone()) HEnvironmentMarker(HEnvironmentMarker::BIND, index); 1921 New<HEnvironmentMarker>(HEnvironmentMarker::BIND, index);
1922 AddInstruction(bind); 1922 AddInstruction(bind);
1923 #ifdef DEBUG 1923 #ifdef DEBUG
1924 bind->set_closure(env->closure()); 1924 bind->set_closure(env->closure());
1925 #endif 1925 #endif
1926 } 1926 }
1927 } 1927 }
1928 HValue* LookupAndMakeLive(Variable* var) { 1928 HValue* LookupAndMakeLive(Variable* var) {
1929 HEnvironment* env = environment(); 1929 HEnvironment* env = environment();
1930 int index = env->IndexFor(var); 1930 int index = env->IndexFor(var);
1931 HValue* value = env->Lookup(index); 1931 HValue* value = env->Lookup(index);
1932 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) { 1932 if (IsEligibleForEnvironmentLivenessAnalysis(var, index, value, env)) {
1933 HEnvironmentMarker* lookup = 1933 HEnvironmentMarker* lookup =
1934 new(zone()) HEnvironmentMarker(HEnvironmentMarker::LOOKUP, index); 1934 New<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index);
1935 AddInstruction(lookup); 1935 AddInstruction(lookup);
1936 #ifdef DEBUG 1936 #ifdef DEBUG
1937 lookup->set_closure(env->closure()); 1937 lookup->set_closure(env->closure());
1938 #endif 1938 #endif
1939 } 1939 }
1940 return value; 1940 return value;
1941 } 1941 }
1942 1942
1943 // The value of the arguments object is allowed in some but not most value 1943 // The value of the arguments object is allowed in some but not most value
1944 // contexts. (It's allowed in all effect contexts and disallowed in all 1944 // contexts. (It's allowed in all effect contexts and disallowed in all
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
2460 } 2460 }
2461 2461
2462 private: 2462 private:
2463 HGraphBuilder* builder_; 2463 HGraphBuilder* builder_;
2464 }; 2464 };
2465 2465
2466 2466
2467 } } // namespace v8::internal 2467 } } // namespace v8::internal
2468 2468
2469 #endif // V8_HYDROGEN_H_ 2469 #endif // V8_HYDROGEN_H_
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698