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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 2684193003: [turbofan] Add support for %_MaxSmi and %_TypedArrayMaxSizeInHeap. (Closed)
Patch Set: Fix comment. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index 04f978f77c57ea0d2bf531f11d6c8290f428be99..31cfe1116daed9117578f3c33e47c45ea3a64a9e 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -76,6 +76,10 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceCall(node);
case Runtime::kInlineGetSuperConstructor:
return ReduceGetSuperConstructor(node);
+ case Runtime::kInlineMaxSmi:
+ return ReduceMaxSmi(node);
+ case Runtime::kInlineTypedArrayMaxSizeInHeap:
+ return ReduceTypedArrayMaxSizeInHeap(node);
case Runtime::kInlineJSCollectionGetTable:
return ReduceJSCollectionGetTable(node);
case Runtime::kInlineStringGetRawHashField:
@@ -317,6 +321,18 @@ Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) {
active_function_map, effect, control);
}
+Reduction JSIntrinsicLowering::ReduceMaxSmi(Node* node) {
+ Node* value = jsgraph()->Constant(Smi::kMaxValue);
+ ReplaceWithValue(node, value);
+ return Replace(value);
+}
+
+Reduction JSIntrinsicLowering::ReduceTypedArrayMaxSizeInHeap(Node* node) {
+ Node* value = jsgraph()->Constant(FLAG_typed_array_max_size_in_heap);
+ ReplaceWithValue(node, value);
+ return Replace(value);
+}
+
Reduction JSIntrinsicLowering::ReduceJSCollectionGetTable(Node* node) {
Node* collection = NodeProperties::GetValueInput(node, 0);
Node* effect = NodeProperties::GetEffectInput(node);
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698