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/ast.h" | 5 #include "src/ast/ast.h" |
6 | 6 |
7 #include <cmath> // For isfinite. | 7 #include <cmath> // For isfinite. |
8 | 8 |
9 #include "src/ast/compile-time-value.h" | 9 #include "src/ast/compile-time-value.h" |
10 #include "src/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 } | 287 } |
288 return Token::ILLEGAL; | 288 return Token::ILLEGAL; |
289 } | 289 } |
290 | 290 |
291 | 291 |
292 bool FunctionLiteral::AllowsLazyCompilation() { | 292 bool FunctionLiteral::AllowsLazyCompilation() { |
293 return scope()->AllowsLazyCompilation(); | 293 return scope()->AllowsLazyCompilation(); |
294 } | 294 } |
295 | 295 |
296 | 296 |
297 bool FunctionLiteral::AllowsLazyCompilationWithoutContext() { | |
298 return scope()->AllowsLazyCompilationWithoutContext(); | |
299 } | |
300 | |
301 | |
302 int FunctionLiteral::start_position() const { | 297 int FunctionLiteral::start_position() const { |
303 return scope()->start_position(); | 298 return scope()->start_position(); |
304 } | 299 } |
305 | 300 |
306 | 301 |
307 int FunctionLiteral::end_position() const { | 302 int FunctionLiteral::end_position() const { |
308 return scope()->end_position(); | 303 return scope()->end_position(); |
309 } | 304 } |
310 | 305 |
311 | 306 |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 // static | 953 // static |
959 bool Literal::Match(void* literal1, void* literal2) { | 954 bool Literal::Match(void* literal1, void* literal2) { |
960 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); | 955 const AstValue* x = static_cast<Literal*>(literal1)->raw_value(); |
961 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); | 956 const AstValue* y = static_cast<Literal*>(literal2)->raw_value(); |
962 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || | 957 return (x->IsString() && y->IsString() && x->AsString() == y->AsString()) || |
963 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); | 958 (x->IsNumber() && y->IsNumber() && x->AsNumber() == y->AsNumber()); |
964 } | 959 } |
965 | 960 |
966 } // namespace internal | 961 } // namespace internal |
967 } // namespace v8 | 962 } // namespace v8 |
OLD | NEW |