| 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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/ast/ast.h" | 8 #include "src/ast/ast.h" |
| 9 #include "src/ast/ast-expression-rewriter.h" | 9 #include "src/ast/ast-expression-rewriter.h" |
| 10 #include "src/ast/ast-expression-visitor.h" | 10 #include "src/ast/ast-expression-visitor.h" |
| (...skipping 2707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2718 Assignment* assign = factory()->NewAssignment( | 2718 Assignment* assign = factory()->NewAssignment( |
| 2719 Token::ASSIGN, factory()->NewVariableProxy(temp), return_value, pos); | 2719 Token::ASSIGN, factory()->NewVariableProxy(temp), return_value, pos); |
| 2720 | 2720 |
| 2721 // %_IsJSReceiver(temp) | 2721 // %_IsJSReceiver(temp) |
| 2722 ZoneList<Expression*>* is_spec_object_args = | 2722 ZoneList<Expression*>* is_spec_object_args = |
| 2723 new (zone()) ZoneList<Expression*>(1, zone()); | 2723 new (zone()) ZoneList<Expression*>(1, zone()); |
| 2724 is_spec_object_args->Add(factory()->NewVariableProxy(temp), zone()); | 2724 is_spec_object_args->Add(factory()->NewVariableProxy(temp), zone()); |
| 2725 Expression* is_spec_object_call = factory()->NewCallRuntime( | 2725 Expression* is_spec_object_call = factory()->NewCallRuntime( |
| 2726 Runtime::kInlineIsJSReceiver, is_spec_object_args, pos); | 2726 Runtime::kInlineIsJSReceiver, is_spec_object_args, pos); |
| 2727 | 2727 |
| 2728 // %_IsJSReceiver(temp) ? temp : throw_expression | 2728 // %_IsJSReceiver(temp) ? temp : 1; |
| 2729 Expression* is_object_conditional = factory()->NewConditional( | 2729 Expression* is_object_conditional = factory()->NewConditional( |
| 2730 is_spec_object_call, factory()->NewVariableProxy(temp), | 2730 is_spec_object_call, factory()->NewVariableProxy(temp), |
| 2731 factory()->NewSmiLiteral(1, pos), pos); | 2731 factory()->NewSmiLiteral(1, pos), pos); |
| 2732 | 2732 |
| 2733 // temp === undefined | 2733 // temp === undefined |
| 2734 Expression* is_undefined = factory()->NewCompareOperation( | 2734 Expression* is_undefined = factory()->NewCompareOperation( |
| 2735 Token::EQ_STRICT, assign, | 2735 Token::EQ_STRICT, assign, |
| 2736 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition), pos); | 2736 factory()->NewUndefinedLiteral(RelocInfo::kNoPosition), pos); |
| 2737 | 2737 |
| 2738 // is_undefined ? this : is_object_conditional | 2738 // is_undefined ? this : is_object_conditional |
| (...skipping 4170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6909 try_block, target); | 6909 try_block, target); |
| 6910 final_loop = target; | 6910 final_loop = target; |
| 6911 } | 6911 } |
| 6912 | 6912 |
| 6913 return final_loop; | 6913 return final_loop; |
| 6914 } | 6914 } |
| 6915 | 6915 |
| 6916 | 6916 |
| 6917 } // namespace internal | 6917 } // namespace internal |
| 6918 } // namespace v8 | 6918 } // namespace v8 |
| OLD | NEW |