OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/ast.h" | 5 #include "src/ast.h" |
6 | 6 |
7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
8 #include "src/builtins.h" | 8 #include "src/builtins.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/contexts.h" | 10 #include "src/contexts.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; | 105 case Token::ASSIGN_BIT_XOR: return Token::BIT_XOR; |
106 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; | 106 case Token::ASSIGN_BIT_AND: return Token::BIT_AND; |
107 case Token::ASSIGN_SHL: return Token::SHL; | 107 case Token::ASSIGN_SHL: return Token::SHL; |
108 case Token::ASSIGN_SAR: return Token::SAR; | 108 case Token::ASSIGN_SAR: return Token::SAR; |
109 case Token::ASSIGN_SHR: return Token::SHR; | 109 case Token::ASSIGN_SHR: return Token::SHR; |
110 case Token::ASSIGN_ADD: return Token::ADD; | 110 case Token::ASSIGN_ADD: return Token::ADD; |
111 case Token::ASSIGN_SUB: return Token::SUB; | 111 case Token::ASSIGN_SUB: return Token::SUB; |
112 case Token::ASSIGN_MUL: return Token::MUL; | 112 case Token::ASSIGN_MUL: return Token::MUL; |
113 case Token::ASSIGN_DIV: return Token::DIV; | 113 case Token::ASSIGN_DIV: return Token::DIV; |
114 case Token::ASSIGN_MOD: return Token::MOD; | 114 case Token::ASSIGN_MOD: return Token::MOD; |
| 115 case Token::ASSIGN_EXP: return Token::EXP; |
115 default: UNREACHABLE(); | 116 default: UNREACHABLE(); |
116 } | 117 } |
117 return Token::ILLEGAL; | 118 return Token::ILLEGAL; |
118 } | 119 } |
119 | 120 |
120 | 121 |
121 bool FunctionLiteral::AllowsLazyCompilation() { | 122 bool FunctionLiteral::AllowsLazyCompilation() { |
122 return scope()->AllowsLazyCompilation(); | 123 return scope()->AllowsLazyCompilation(); |
123 } | 124 } |
124 | 125 |
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 // static | 1010 // static |
1010 bool Literal::Match(void* literal1, void* literal2) { | 1011 bool Literal::Match(void* literal1, void* literal2) { |
1011 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 1012 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
1012 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 1013 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
1013 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || | 1014 return (x->IsString() && y->IsString() && *x->AsString() == *y->AsString()) || |
1014 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 1015 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
1015 } | 1016 } |
1016 | 1017 |
1017 | 1018 |
1018 } } // namespace v8::internal | 1019 } } // namespace v8::internal |
OLD | NEW |