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

Side by Side Diff: src/ast.h

Issue 3031005: [Isolates] Avoid dereferencing Isolate::Current() to check oddball identities... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 10 years, 4 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 | « src/accessors.cc ('k') | src/builtins.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 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
860 } 860 }
861 return false; 861 return false;
862 } 862 }
863 863
864 virtual bool IsLeaf() { return true; } 864 virtual bool IsLeaf() { return true; }
865 virtual bool IsTrivial() { return true; } 865 virtual bool IsTrivial() { return true; }
866 virtual bool IsPrimitive(); 866 virtual bool IsPrimitive();
867 virtual bool IsCritical(); 867 virtual bool IsCritical();
868 868
869 // Identity testers. 869 // Identity testers.
870 bool IsNull() const { return handle_.is_identical_to(Factory::null_value()); } 870 bool IsNull() const {
871 bool IsTrue() const { return handle_.is_identical_to(Factory::true_value()); } 871 ASSERT(!handle_.is_null());
872 return handle_->IsNull();
873 }
874 bool IsTrue() const {
875 ASSERT(!handle_.is_null());
876 return handle_->IsTrue();
877 }
872 bool IsFalse() const { 878 bool IsFalse() const {
873 return handle_.is_identical_to(Factory::false_value()); 879 ASSERT(!handle_.is_null());
880 return handle_->IsFalse();
874 } 881 }
875 882
876 Handle<Object> handle() const { return handle_; } 883 Handle<Object> handle() const { return handle_; }
877 884
878 private: 885 private:
879 Handle<Object> handle_; 886 Handle<Object> handle_;
880 }; 887 };
881 888
882 889
883 // Base class for literals that needs space in the corresponding JSFunction. 890 // Base class for literals that needs space in the corresponding JSFunction.
(...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after
2108 2115
2109 // Holds the result of copying an expression. 2116 // Holds the result of copying an expression.
2110 Expression* expr_; 2117 Expression* expr_;
2111 // Holds the result of copying a statement. 2118 // Holds the result of copying a statement.
2112 Statement* stmt_; 2119 Statement* stmt_;
2113 }; 2120 };
2114 2121
2115 } } // namespace v8::internal 2122 } } // namespace v8::internal
2116 2123
2117 #endif // V8_AST_H_ 2124 #endif // V8_AST_H_
OLDNEW
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698