| 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/full-codegen/full-codegen.h" | 5 #include "src/full-codegen/full-codegen.h" |
| 6 | 6 |
| 7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
| 8 #include "src/ast/ast-numbering.h" | 8 #include "src/ast/ast-numbering.h" |
| 9 #include "src/ast/prettyprinter.h" | 9 #include "src/ast/prettyprinter.h" |
| 10 #include "src/ast/scopeinfo.h" | 10 #include "src/ast/scopeinfo.h" |
| (...skipping 1740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 } | 1751 } |
| 1752 | 1752 |
| 1753 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* expr) { | 1753 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* expr) { |
| 1754 Expression* sub_expr; | 1754 Expression* sub_expr; |
| 1755 Handle<String> check; | 1755 Handle<String> check; |
| 1756 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { | 1756 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { |
| 1757 EmitLiteralCompareTypeof(expr, sub_expr, check); | 1757 EmitLiteralCompareTypeof(expr, sub_expr, check); |
| 1758 return true; | 1758 return true; |
| 1759 } | 1759 } |
| 1760 | 1760 |
| 1761 if (expr->IsLiteralCompareUndefined(&sub_expr, isolate())) { | 1761 if (expr->IsLiteralCompareUndefined(&sub_expr)) { |
| 1762 EmitLiteralCompareNil(expr, sub_expr, kUndefinedValue); | 1762 EmitLiteralCompareNil(expr, sub_expr, kUndefinedValue); |
| 1763 return true; | 1763 return true; |
| 1764 } | 1764 } |
| 1765 | 1765 |
| 1766 if (expr->IsLiteralCompareNull(&sub_expr)) { | 1766 if (expr->IsLiteralCompareNull(&sub_expr)) { |
| 1767 EmitLiteralCompareNil(expr, sub_expr, kNullValue); | 1767 EmitLiteralCompareNil(expr, sub_expr, kNullValue); |
| 1768 return true; | 1768 return true; |
| 1769 } | 1769 } |
| 1770 | 1770 |
| 1771 return false; | 1771 return false; |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1945 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || | 1945 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || |
| 1946 var->initializer_position() >= proxy->position(); | 1946 var->initializer_position() >= proxy->position(); |
| 1947 } | 1947 } |
| 1948 | 1948 |
| 1949 | 1949 |
| 1950 #undef __ | 1950 #undef __ |
| 1951 | 1951 |
| 1952 | 1952 |
| 1953 } // namespace internal | 1953 } // namespace internal |
| 1954 } // namespace v8 | 1954 } // namespace v8 |
| OLD | NEW |