Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/typing-asm.cc

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase master Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/type-info.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/typing-asm.h" 5 #include "src/typing-asm.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } else { 596 } else {
597 RECURSE(IntersectResult(expr, cache_.kAsmUnsigned)); 597 RECURSE(IntersectResult(expr, cache_.kAsmUnsigned));
598 } 598 }
599 } else if (value->ToInt32(&i)) { 599 } else if (value->ToInt32(&i)) {
600 RECURSE(IntersectResult(expr, cache_.kAsmSigned)); 600 RECURSE(IntersectResult(expr, cache_.kAsmSigned));
601 } else { 601 } else {
602 FAIL(expr, "illegal number"); 602 FAIL(expr, "illegal number");
603 } 603 }
604 } else if (!is_return && value->IsString()) { 604 } else if (!is_return && value->IsString()) {
605 RECURSE(IntersectResult(expr, Type::String())); 605 RECURSE(IntersectResult(expr, Type::String()));
606 } else if (value->IsUndefined()) { 606 } else if (value->IsUndefined(isolate_)) {
607 RECURSE(IntersectResult(expr, Type::Undefined())); 607 RECURSE(IntersectResult(expr, Type::Undefined()));
608 } else { 608 } else {
609 FAIL(expr, "illegal literal"); 609 FAIL(expr, "illegal literal");
610 } 610 }
611 } 611 }
612 612
613 613
614 void AsmTyper::VisitLiteral(Literal* expr) { VisitLiteral(expr, false); } 614 void AsmTyper::VisitLiteral(Literal* expr) { VisitLiteral(expr, false); }
615 615
616 616
(...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 } 1630 }
1631 1631
1632 1632
1633 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) { 1633 void AsmTyper::VisitRewritableExpression(RewritableExpression* expr) {
1634 RECURSE(Visit(expr->expression())); 1634 RECURSE(Visit(expr->expression()));
1635 } 1635 }
1636 1636
1637 1637
1638 } // namespace internal 1638 } // namespace internal
1639 } // namespace v8 1639 } // namespace v8
OLDNEW
« no previous file with comments | « src/type-info.cc ('k') | src/wasm/wasm-js.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698