OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/hydrogen.h" | 5 #include "src/crankshaft/hydrogen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/allocation-site-scopes.h" | 9 #include "src/allocation-site-scopes.h" |
10 #include "src/ast/ast-numbering.h" | 10 #include "src/ast/ast-numbering.h" |
(...skipping 11444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11455 if (!top_info()->is_tracking_positions()) SetSourcePosition(expr->position()); | 11455 if (!top_info()->is_tracking_positions()) SetSourcePosition(expr->position()); |
11456 | 11456 |
11457 // Check for a few fast cases. The AST visiting behavior must be in sync | 11457 // Check for a few fast cases. The AST visiting behavior must be in sync |
11458 // with the full codegen: We don't push both left and right values onto | 11458 // with the full codegen: We don't push both left and right values onto |
11459 // the expression stack when one side is a special-case literal. | 11459 // the expression stack when one side is a special-case literal. |
11460 Expression* sub_expr = NULL; | 11460 Expression* sub_expr = NULL; |
11461 Handle<String> check; | 11461 Handle<String> check; |
11462 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { | 11462 if (expr->IsLiteralCompareTypeof(&sub_expr, &check)) { |
11463 return HandleLiteralCompareTypeof(expr, sub_expr, check); | 11463 return HandleLiteralCompareTypeof(expr, sub_expr, check); |
11464 } | 11464 } |
11465 if (expr->IsLiteralCompareUndefined(&sub_expr, isolate())) { | 11465 if (expr->IsLiteralCompareUndefined(&sub_expr)) { |
11466 return HandleLiteralCompareNil(expr, sub_expr, kUndefinedValue); | 11466 return HandleLiteralCompareNil(expr, sub_expr, kUndefinedValue); |
11467 } | 11467 } |
11468 if (expr->IsLiteralCompareNull(&sub_expr)) { | 11468 if (expr->IsLiteralCompareNull(&sub_expr)) { |
11469 return HandleLiteralCompareNil(expr, sub_expr, kNullValue); | 11469 return HandleLiteralCompareNil(expr, sub_expr, kNullValue); |
11470 } | 11470 } |
11471 | 11471 |
11472 if (IsClassOfTest(expr)) { | 11472 if (IsClassOfTest(expr)) { |
11473 CallRuntime* call = expr->left()->AsCallRuntime(); | 11473 CallRuntime* call = expr->left()->AsCallRuntime(); |
11474 DCHECK(call->arguments()->length() == 1); | 11474 DCHECK(call->arguments()->length() == 1); |
11475 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); | 11475 CHECK_ALIVE(VisitForValue(call->arguments()->at(0))); |
(...skipping 2049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13525 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); | 13525 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); |
13526 } | 13526 } |
13527 | 13527 |
13528 #ifdef DEBUG | 13528 #ifdef DEBUG |
13529 graph_->Verify(false); // No full verify. | 13529 graph_->Verify(false); // No full verify. |
13530 #endif | 13530 #endif |
13531 } | 13531 } |
13532 | 13532 |
13533 } // namespace internal | 13533 } // namespace internal |
13534 } // namespace v8 | 13534 } // namespace v8 |
OLD | NEW |