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

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 2697063002: Fix typeof optimization for undetectable (Closed)
Patch Set: Rename + format fix Created 3 years, 10 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/compiler/escape-analysis.cc ('k') | src/compiler/opcodes.h » ('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 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/js-typed-lowering.h" 5 #include "src/compiler/js-typed-lowering.h"
6 6
7 #include "src/ast/modules.h" 7 #include "src/ast/modules.h"
8 #include "src/builtins/builtins-utils.h" 8 #include "src/builtins/builtins-utils.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compilation-dependencies.h" 10 #include "src/compilation-dependencies.h"
(...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 Node* value; 890 Node* value;
891 if (String::Equals(type, factory()->boolean_string())) { 891 if (String::Equals(type, factory()->boolean_string())) {
892 value = 892 value =
893 graph()->NewNode(common()->Select(MachineRepresentation::kTagged), 893 graph()->NewNode(common()->Select(MachineRepresentation::kTagged),
894 graph()->NewNode(simplified()->ReferenceEqual(), input, 894 graph()->NewNode(simplified()->ReferenceEqual(), input,
895 jsgraph()->TrueConstant()), 895 jsgraph()->TrueConstant()),
896 jsgraph()->TrueConstant(), 896 jsgraph()->TrueConstant(),
897 graph()->NewNode(simplified()->ReferenceEqual(), input, 897 graph()->NewNode(simplified()->ReferenceEqual(), input,
898 jsgraph()->FalseConstant())); 898 jsgraph()->FalseConstant()));
899 } else if (String::Equals(type, factory()->function_string())) { 899 } else if (String::Equals(type, factory()->function_string())) {
900 value = graph()->NewNode(simplified()->ObjectIsCallable(), input); 900 value = graph()->NewNode(simplified()->ObjectIsDetectableCallable(), input);
901 } else if (String::Equals(type, factory()->number_string())) { 901 } else if (String::Equals(type, factory()->number_string())) {
902 value = graph()->NewNode(simplified()->ObjectIsNumber(), input); 902 value = graph()->NewNode(simplified()->ObjectIsNumber(), input);
903 } else if (String::Equals(type, factory()->object_string())) { 903 } else if (String::Equals(type, factory()->object_string())) {
904 value = graph()->NewNode( 904 value = graph()->NewNode(
905 common()->Select(MachineRepresentation::kTagged), 905 common()->Select(MachineRepresentation::kTagged),
906 graph()->NewNode(simplified()->ObjectIsNonCallable(), input), 906 graph()->NewNode(simplified()->ObjectIsNonCallable(), input),
907 jsgraph()->TrueConstant(), 907 jsgraph()->TrueConstant(),
908 graph()->NewNode(simplified()->ReferenceEqual(), input, 908 graph()->NewNode(simplified()->ReferenceEqual(), input,
909 jsgraph()->NullConstant())); 909 jsgraph()->NullConstant()));
910 } else if (String::Equals(type, factory()->string_string())) { 910 } else if (String::Equals(type, factory()->string_string())) {
(...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after
2481 } 2481 }
2482 2482
2483 2483
2484 CompilationDependencies* JSTypedLowering::dependencies() const { 2484 CompilationDependencies* JSTypedLowering::dependencies() const {
2485 return dependencies_; 2485 return dependencies_;
2486 } 2486 }
2487 2487
2488 } // namespace compiler 2488 } // namespace compiler
2489 } // namespace internal 2489 } // namespace internal
2490 } // namespace v8 2490 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/escape-analysis.cc ('k') | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698