OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/compiler/ast-graph-builder.h" | 5 #include "src/compiler/ast-graph-builder.h" |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1989 switch (expr->op()) { | 1989 switch (expr->op()) { |
1990 case Token::EQ: | 1990 case Token::EQ: |
1991 op = javascript()->Equal(hint); | 1991 op = javascript()->Equal(hint); |
1992 break; | 1992 break; |
1993 case Token::NE: | 1993 case Token::NE: |
1994 op = javascript()->NotEqual(hint); | 1994 op = javascript()->NotEqual(hint); |
1995 break; | 1995 break; |
1996 case Token::EQ_STRICT: | 1996 case Token::EQ_STRICT: |
1997 op = javascript()->StrictEqual(hint); | 1997 op = javascript()->StrictEqual(hint); |
1998 break; | 1998 break; |
1999 case Token::NE_STRICT: | |
2000 op = javascript()->StrictNotEqual(hint); | |
2001 break; | |
2002 case Token::LT: | 1999 case Token::LT: |
2003 op = javascript()->LessThan(hint); | 2000 op = javascript()->LessThan(hint); |
2004 break; | 2001 break; |
2005 case Token::GT: | 2002 case Token::GT: |
2006 op = javascript()->GreaterThan(hint); | 2003 op = javascript()->GreaterThan(hint); |
2007 break; | 2004 break; |
2008 case Token::LTE: | 2005 case Token::LTE: |
2009 op = javascript()->LessThanOrEqual(hint); | 2006 op = javascript()->LessThanOrEqual(hint); |
2010 break; | 2007 break; |
2011 case Token::GTE: | 2008 case Token::GTE: |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2809 NumberMatcher m(input); | 2806 NumberMatcher m(input); |
2810 return jsgraph_->BooleanConstant(!m.Is(0) && !m.IsNaN()); | 2807 return jsgraph_->BooleanConstant(!m.Is(0) && !m.IsNaN()); |
2811 } | 2808 } |
2812 case IrOpcode::kHeapConstant: { | 2809 case IrOpcode::kHeapConstant: { |
2813 Handle<HeapObject> object = HeapObjectMatcher(input).Value(); | 2810 Handle<HeapObject> object = HeapObjectMatcher(input).Value(); |
2814 return jsgraph_->BooleanConstant(object->BooleanValue()); | 2811 return jsgraph_->BooleanConstant(object->BooleanValue()); |
2815 } | 2812 } |
2816 case IrOpcode::kJSEqual: | 2813 case IrOpcode::kJSEqual: |
2817 case IrOpcode::kJSNotEqual: | 2814 case IrOpcode::kJSNotEqual: |
2818 case IrOpcode::kJSStrictEqual: | 2815 case IrOpcode::kJSStrictEqual: |
2819 case IrOpcode::kJSStrictNotEqual: | |
2820 case IrOpcode::kJSLessThan: | 2816 case IrOpcode::kJSLessThan: |
2821 case IrOpcode::kJSLessThanOrEqual: | 2817 case IrOpcode::kJSLessThanOrEqual: |
2822 case IrOpcode::kJSGreaterThan: | 2818 case IrOpcode::kJSGreaterThan: |
2823 case IrOpcode::kJSGreaterThanOrEqual: | 2819 case IrOpcode::kJSGreaterThanOrEqual: |
2824 case IrOpcode::kJSToBoolean: | 2820 case IrOpcode::kJSToBoolean: |
2825 case IrOpcode::kJSDeleteProperty: | 2821 case IrOpcode::kJSDeleteProperty: |
2826 case IrOpcode::kJSHasProperty: | 2822 case IrOpcode::kJSHasProperty: |
2827 case IrOpcode::kJSInstanceOf: | 2823 case IrOpcode::kJSInstanceOf: |
2828 return input; | 2824 return input; |
2829 default: | 2825 default: |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3184 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, | 3180 float invocation_frequency, LoopAssignmentAnalysis* loop_assignment, |
3185 SourcePositionTable* source_positions, int inlining_id) | 3181 SourcePositionTable* source_positions, int inlining_id) |
3186 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, | 3182 : AstGraphBuilder(local_zone, info, jsgraph, invocation_frequency, |
3187 loop_assignment), | 3183 loop_assignment), |
3188 source_positions_(source_positions), | 3184 source_positions_(source_positions), |
3189 start_position_(info->shared_info()->start_position(), inlining_id) {} | 3185 start_position_(info->shared_info()->start_position(), inlining_id) {} |
3190 | 3186 |
3191 } // namespace compiler | 3187 } // namespace compiler |
3192 } // namespace internal | 3188 } // namespace internal |
3193 } // namespace v8 | 3189 } // namespace v8 |
OLD | NEW |