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

Side by Side Diff: src/compiler/js-operator.cc

Issue 1609893003: [es6] Tail calls support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebasing Created 4 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/js-operator.h ('k') | src/crankshaft/arm/lithium-codegen-arm.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 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-operator.h" 5 #include "src/compiler/js-operator.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/base/lazy-instance.h" 9 #include "src/base/lazy-instance.h"
10 #include "src/compiler/opcodes.h" 10 #include "src/compiler/opcodes.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return OpParameter<ConvertReceiverMode>(op); 45 return OpParameter<ConvertReceiverMode>(op);
46 } 46 }
47 47
48 48
49 ToBooleanHints ToBooleanHintsOf(Operator const* op) { 49 ToBooleanHints ToBooleanHintsOf(Operator const* op) {
50 DCHECK_EQ(IrOpcode::kJSToBoolean, op->opcode()); 50 DCHECK_EQ(IrOpcode::kJSToBoolean, op->opcode());
51 return OpParameter<ToBooleanHints>(op); 51 return OpParameter<ToBooleanHints>(op);
52 } 52 }
53 53
54 54
55 size_t hash_value(TailCallMode mode) {
56 return base::hash_value(static_cast<unsigned>(mode));
57 }
58
59
60 std::ostream& operator<<(std::ostream& os, TailCallMode mode) {
61 switch (mode) {
62 case TailCallMode::kAllow:
63 return os << "ALLOW_TAIL_CALLS";
64 case TailCallMode::kDisallow:
65 return os << "DISALLOW_TAIL_CALLS";
66 }
67 UNREACHABLE();
68 return os;
69 }
70
71
72 bool operator==(BinaryOperationParameters const& lhs, 55 bool operator==(BinaryOperationParameters const& lhs,
73 BinaryOperationParameters const& rhs) { 56 BinaryOperationParameters const& rhs) {
74 return lhs.language_mode() == rhs.language_mode() && 57 return lhs.language_mode() == rhs.language_mode() &&
75 lhs.hints() == rhs.hints(); 58 lhs.hints() == rhs.hints();
76 } 59 }
77 60
78 61
79 bool operator!=(BinaryOperationParameters const& lhs, 62 bool operator!=(BinaryOperationParameters const& lhs,
80 BinaryOperationParameters const& rhs) { 63 BinaryOperationParameters const& rhs) {
81 return !(lhs == rhs); 64 return !(lhs == rhs);
(...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 return new (zone()) Operator1<Handle<ScopeInfo>>( // -- 996 return new (zone()) Operator1<Handle<ScopeInfo>>( // --
1014 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode 997 IrOpcode::kJSCreateScriptContext, Operator::kNoProperties, // opcode
1015 "JSCreateScriptContext", // name 998 "JSCreateScriptContext", // name
1016 1, 1, 1, 1, 1, 2, // counts 999 1, 1, 1, 1, 1, 2, // counts
1017 scpope_info); // parameter 1000 scpope_info); // parameter
1018 } 1001 }
1019 1002
1020 } // namespace compiler 1003 } // namespace compiler
1021 } // namespace internal 1004 } // namespace internal
1022 } // namespace v8 1005 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-operator.h ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698