OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 8146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8157 ASSERT(current_block()->HasPredecessor()); | 8157 ASSERT(current_block()->HasPredecessor()); |
8158 | 8158 |
8159 // Check for a few fast cases. The AST visiting behavior must be in sync | 8159 // Check for a few fast cases. The AST visiting behavior must be in sync |
8160 // with the full codegen: We don't push both left and right values onto | 8160 // with the full codegen: We don't push both left and right values onto |
8161 // the expression stack when one side is a special-case literal. | 8161 // the expression stack when one side is a special-case literal. |
8162 Expression* sub_expr = NULL; | 8162 Expression* sub_expr = NULL; |
8163 Handle<String> check; | 8163 Handle<String> check; |
8164 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { | 8164 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { |
8165 return HandleLiteralCompareTypeof(expr, sub_expr, check); | 8165 return HandleLiteralCompareTypeof(expr, sub_expr, check); |
8166 } | 8166 } |
8167 if (expr->IsLiteralCompareUndefined(&sub_expr)) { | 8167 if (expr->IsLiteralCompareUndefined(&sub_expr, isolate())) { |
8168 return HandleLiteralCompareNil(expr, sub_expr, kUndefinedValue); | 8168 return HandleLiteralCompareNil(expr, sub_expr, kUndefinedValue); |
8169 } | 8169 } |
8170 if (expr->IsLiteralCompareNull(&sub_expr)) { | 8170 if (expr->IsLiteralCompareNull(&sub_expr)) { |
8171 return HandleLiteralCompareNil(expr, sub_expr, kNullValue); | 8171 return HandleLiteralCompareNil(expr, sub_expr, kNullValue); |
8172 } | 8172 } |
8173 | 8173 |
8174 if (IsClassOfTest(expr)) { | 8174 if (IsClassOfTest(expr)) { |
8175 CallRuntime* call = expr->left()->AsCallRuntime(); | 8175 CallRuntime* call = expr->left()->AsCallRuntime(); |
8176 ASSERT(call->arguments()->length() == 1); | 8176 ASSERT(call->arguments()->length() == 1); |
8177 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 8177 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9989 if (ShouldProduceTraceOutput()) { | 9989 if (ShouldProduceTraceOutput()) { |
9990 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 9990 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
9991 } | 9991 } |
9992 | 9992 |
9993 #ifdef DEBUG | 9993 #ifdef DEBUG |
9994 graph_->Verify(false); // No full verify. | 9994 graph_->Verify(false); // No full verify. |
9995 #endif | 9995 #endif |
9996 } | 9996 } |
9997 | 9997 |
9998 } } // namespace v8::internal | 9998 } } // namespace v8::internal |
OLD | NEW |