| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 | 502 |
| 503 // IsPrimitive implementation. IsPrimitive is true if the value of an | 503 // IsPrimitive implementation. IsPrimitive is true if the value of an |
| 504 // expression is known at compile-time to be any JS type other than Object | 504 // expression is known at compile-time to be any JS type other than Object |
| 505 // (e.g, it is Undefined, Null, Boolean, String, or Number). | 505 // (e.g, it is Undefined, Null, Boolean, String, or Number). |
| 506 | 506 |
| 507 // The following expression types are never primitive because they express | 507 // The following expression types are never primitive because they express |
| 508 // Object values. | 508 // Object values. |
| 509 bool FunctionLiteral::IsPrimitive() { return false; } | 509 bool FunctionLiteral::IsPrimitive() { return false; } |
| 510 bool FunctionBoilerplateLiteral::IsPrimitive() { return false; } | 510 bool SharedFunctionInfoLiteral::IsPrimitive() { return false; } |
| 511 bool RegExpLiteral::IsPrimitive() { return false; } | 511 bool RegExpLiteral::IsPrimitive() { return false; } |
| 512 bool ObjectLiteral::IsPrimitive() { return false; } | 512 bool ObjectLiteral::IsPrimitive() { return false; } |
| 513 bool ArrayLiteral::IsPrimitive() { return false; } | 513 bool ArrayLiteral::IsPrimitive() { return false; } |
| 514 bool CatchExtensionObject::IsPrimitive() { return false; } | 514 bool CatchExtensionObject::IsPrimitive() { return false; } |
| 515 bool CallNew::IsPrimitive() { return false; } | 515 bool CallNew::IsPrimitive() { return false; } |
| 516 bool ThisFunction::IsPrimitive() { return false; } | 516 bool ThisFunction::IsPrimitive() { return false; } |
| 517 | 517 |
| 518 | 518 |
| 519 // The following expression types are not always primitive because we do not | 519 // The following expression types are not always primitive because we do not |
| 520 // have enough information to conclude that they are. | 520 // have enough information to conclude that they are. |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 DebuggerStatement* stmt) { | 851 DebuggerStatement* stmt) { |
| 852 SetStackOverflow(); | 852 SetStackOverflow(); |
| 853 } | 853 } |
| 854 | 854 |
| 855 | 855 |
| 856 void CopyAstVisitor::VisitFunctionLiteral(FunctionLiteral* expr) { | 856 void CopyAstVisitor::VisitFunctionLiteral(FunctionLiteral* expr) { |
| 857 SetStackOverflow(); | 857 SetStackOverflow(); |
| 858 } | 858 } |
| 859 | 859 |
| 860 | 860 |
| 861 void CopyAstVisitor::VisitFunctionBoilerplateLiteral( | 861 void CopyAstVisitor::VisitSharedFunctionInfoLiteral( |
| 862 FunctionBoilerplateLiteral* expr) { | 862 SharedFunctionInfoLiteral* expr) { |
| 863 SetStackOverflow(); | 863 SetStackOverflow(); |
| 864 } | 864 } |
| 865 | 865 |
| 866 | 866 |
| 867 void CopyAstVisitor::VisitConditional(Conditional* expr) { | 867 void CopyAstVisitor::VisitConditional(Conditional* expr) { |
| 868 SetStackOverflow(); | 868 SetStackOverflow(); |
| 869 } | 869 } |
| 870 | 870 |
| 871 | 871 |
| 872 void CopyAstVisitor::VisitSlot(Slot* expr) { | 872 void CopyAstVisitor::VisitSlot(Slot* expr) { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 970 SetStackOverflow(); | 970 SetStackOverflow(); |
| 971 } | 971 } |
| 972 | 972 |
| 973 | 973 |
| 974 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { | 974 void CopyAstVisitor::VisitDeclaration(Declaration* decl) { |
| 975 UNREACHABLE(); | 975 UNREACHABLE(); |
| 976 } | 976 } |
| 977 | 977 |
| 978 | 978 |
| 979 } } // namespace v8::internal | 979 } } // namespace v8::internal |
| OLD | NEW |