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

Side by Side Diff: src/ast.h

Issue 661020: Version 2.1.2.1... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 10 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/ia32/stub-cache-ia32.cc » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 924
925 virtual bool IsValidLeftHandSide() { 925 virtual bool IsValidLeftHandSide() {
926 return var_ == NULL ? true : var_->IsValidLeftHandSide(); 926 return var_ == NULL ? true : var_->IsValidLeftHandSide();
927 } 927 }
928 928
929 virtual bool IsLeaf() { 929 virtual bool IsLeaf() {
930 ASSERT(var_ != NULL); // Variable must be resolved. 930 ASSERT(var_ != NULL); // Variable must be resolved.
931 return var()->is_global() || var()->rewrite()->IsLeaf(); 931 return var()->is_global() || var()->rewrite()->IsLeaf();
932 } 932 }
933 933
934 // Reading from a mutable variable is a side effect, but 'this' is
935 // immutable.
936 virtual bool IsTrivial() { return is_this(); }
937
938 bool IsVariable(Handle<String> n) { 934 bool IsVariable(Handle<String> n) {
939 return !is_this() && name().is_identical_to(n); 935 return !is_this() && name().is_identical_to(n);
940 } 936 }
941 937
942 bool IsArguments() { 938 bool IsArguments() {
943 Variable* variable = AsVariable(); 939 Variable* variable = AsVariable();
944 return (variable == NULL) ? false : variable->is_arguments(); 940 return (variable == NULL) ? false : variable->is_arguments();
945 } 941 }
946 942
947 Handle<String> name() const { return name_; } 943 Handle<String> name() const { return name_; }
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1849 #undef DEF_VISIT 1845 #undef DEF_VISIT
1850 1846
1851 private: 1847 private:
1852 bool stack_overflow_; 1848 bool stack_overflow_;
1853 }; 1849 };
1854 1850
1855 1851
1856 } } // namespace v8::internal 1852 } } // namespace v8::internal
1857 1853
1858 #endif // V8_AST_H_ 1854 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « no previous file | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698