| OLD | NEW |
| 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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 }; | 1142 }; |
| 1143 | 1143 |
| 1144 | 1144 |
| 1145 // The CallRuntime class does not represent any official JavaScript | 1145 // The CallRuntime class does not represent any official JavaScript |
| 1146 // language construct. Instead it is used to call a C or JS function | 1146 // language construct. Instead it is used to call a C or JS function |
| 1147 // with a set of arguments. This is used from the builtins that are | 1147 // with a set of arguments. This is used from the builtins that are |
| 1148 // implemented in JavaScript (see "v8natives.js"). | 1148 // implemented in JavaScript (see "v8natives.js"). |
| 1149 class CallRuntime: public Expression { | 1149 class CallRuntime: public Expression { |
| 1150 public: | 1150 public: |
| 1151 CallRuntime(Handle<String> name, | 1151 CallRuntime(Handle<String> name, |
| 1152 Runtime::Function* function, | 1152 const Runtime::Function* function, |
| 1153 ZoneList<Expression*>* arguments) | 1153 ZoneList<Expression*>* arguments) |
| 1154 : name_(name), function_(function), arguments_(arguments) { } | 1154 : name_(name), function_(function), arguments_(arguments) { } |
| 1155 | 1155 |
| 1156 DECLARE_NODE_TYPE(CallRuntime) | 1156 DECLARE_NODE_TYPE(CallRuntime) |
| 1157 | 1157 |
| 1158 Handle<String> name() const { return name_; } | 1158 Handle<String> name() const { return name_; } |
| 1159 Runtime::Function* function() const { return function_; } | 1159 const Runtime::Function* function() const { return function_; } |
| 1160 ZoneList<Expression*>* arguments() const { return arguments_; } | 1160 ZoneList<Expression*>* arguments() const { return arguments_; } |
| 1161 bool is_jsruntime() const { return function_ == NULL; } | 1161 bool is_jsruntime() const { return function_ == NULL; } |
| 1162 | 1162 |
| 1163 private: | 1163 private: |
| 1164 Handle<String> name_; | 1164 Handle<String> name_; |
| 1165 Runtime::Function* function_; | 1165 const Runtime::Function* function_; |
| 1166 ZoneList<Expression*>* arguments_; | 1166 ZoneList<Expression*>* arguments_; |
| 1167 }; | 1167 }; |
| 1168 | 1168 |
| 1169 | 1169 |
| 1170 class UnaryOperation: public Expression { | 1170 class UnaryOperation: public Expression { |
| 1171 public: | 1171 public: |
| 1172 UnaryOperation(Token::Value op, Expression* expression) | 1172 UnaryOperation(Token::Value op, Expression* expression) |
| 1173 : op_(op), expression_(expression) { | 1173 : op_(op), expression_(expression) { |
| 1174 ASSERT(Token::IsUnaryOp(op)); | 1174 ASSERT(Token::IsUnaryOp(op)); |
| 1175 } | 1175 } |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 #undef DEF_VISIT | 1899 #undef DEF_VISIT |
| 1900 | 1900 |
| 1901 private: | 1901 private: |
| 1902 bool stack_overflow_; | 1902 bool stack_overflow_; |
| 1903 }; | 1903 }; |
| 1904 | 1904 |
| 1905 | 1905 |
| 1906 } } // namespace v8::internal | 1906 } } // namespace v8::internal |
| 1907 | 1907 |
| 1908 #endif // V8_AST_H_ | 1908 #endif // V8_AST_H_ |
| OLD | NEW |