// Implementation of other node functionality.
-bool Expression::IsSmiLiteral() {
+bool Expression::IsSmiLiteral() const {
return AsLiteral() != NULL && AsLiteral()->value()->IsSmi();
}
-bool Expression::IsStringLiteral() {
+bool Expression::IsStringLiteral() const {
return AsLiteral() != NULL && AsLiteral()->value()->IsString();
}
-bool Expression::IsNullLiteral() {
+bool Expression::IsNullLiteral() const {
return AsLiteral() != NULL && AsLiteral()->value()->IsNull();
}
-bool Expression::IsUndefinedLiteral(Isolate* isolate) {
- VariableProxy* var_proxy = AsVariableProxy();
+bool Expression::IsUndefinedLiteral(Isolate* isolate) const {
+ const VariableProxy* var_proxy = AsVariableProxy();
if (var_proxy == NULL) return false;
Variable* var = var_proxy->var();
// The global identifier "undefined" is immutable. Everything
}
-bool BinaryOperation::ResultOverwriteAllowed() {
+bool BinaryOperation::ResultOverwriteAllowed() const {
switch (op_) {
case Token::COMMA:
case Token::OR: