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

Side by Side Diff: src/crankshaft/hydrogen-instructions.cc

Issue 2044113002: Turn Function.prototype.bind into a hydrogen stub optimized for the common case (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: arm64 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/crankshaft/hydrogen-instructions.h ('k') | src/deoptimizer.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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-instructions.h" 5 #include "src/crankshaft/hydrogen-instructions.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/base/safe_math.h" 8 #include "src/base/safe_math.h"
9 #include "src/crankshaft/hydrogen-infer-representation.h" 9 #include "src/crankshaft/hydrogen-infer-representation.h"
10 #include "src/double.h" 10 #include "src/double.h"
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1546 InstanceType* last) { 1546 InstanceType* last) {
1547 DCHECK(is_interval_check()); 1547 DCHECK(is_interval_check());
1548 switch (check_) { 1548 switch (check_) {
1549 case IS_JS_RECEIVER: 1549 case IS_JS_RECEIVER:
1550 *first = FIRST_JS_RECEIVER_TYPE; 1550 *first = FIRST_JS_RECEIVER_TYPE;
1551 *last = LAST_JS_RECEIVER_TYPE; 1551 *last = LAST_JS_RECEIVER_TYPE;
1552 return; 1552 return;
1553 case IS_JS_ARRAY: 1553 case IS_JS_ARRAY:
1554 *first = *last = JS_ARRAY_TYPE; 1554 *first = *last = JS_ARRAY_TYPE;
1555 return; 1555 return;
1556 case IS_JS_FUNCTION:
1557 *first = *last = JS_FUNCTION_TYPE;
1558 return;
1556 case IS_JS_DATE: 1559 case IS_JS_DATE:
1557 *first = *last = JS_DATE_TYPE; 1560 *first = *last = JS_DATE_TYPE;
1558 return; 1561 return;
1559 default: 1562 default:
1560 UNREACHABLE(); 1563 UNREACHABLE();
1561 } 1564 }
1562 } 1565 }
1563 1566
1564 1567
1565 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) { 1568 void HCheckInstanceType::GetCheckMaskAndTag(uint8_t* mask, uint8_t* tag) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 HValue* HCheckValue::Canonicalize() { 1621 HValue* HCheckValue::Canonicalize() {
1619 return (value()->IsConstant() && 1622 return (value()->IsConstant() &&
1620 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this; 1623 HConstant::cast(value())->EqualsUnique(object_)) ? NULL : this;
1621 } 1624 }
1622 1625
1623 1626
1624 const char* HCheckInstanceType::GetCheckName() const { 1627 const char* HCheckInstanceType::GetCheckName() const {
1625 switch (check_) { 1628 switch (check_) {
1626 case IS_JS_RECEIVER: return "object"; 1629 case IS_JS_RECEIVER: return "object";
1627 case IS_JS_ARRAY: return "array"; 1630 case IS_JS_ARRAY: return "array";
1631 case IS_JS_FUNCTION:
1632 return "function";
1628 case IS_JS_DATE: 1633 case IS_JS_DATE:
1629 return "date"; 1634 return "date";
1630 case IS_STRING: return "string"; 1635 case IS_STRING: return "string";
1631 case IS_INTERNALIZED_STRING: return "internalized_string"; 1636 case IS_INTERNALIZED_STRING: return "internalized_string";
1632 } 1637 }
1633 UNREACHABLE(); 1638 UNREACHABLE();
1634 return ""; 1639 return "";
1635 } 1640 }
1636 1641
1637 1642
(...skipping 2388 matching lines...) Expand 10 before | Expand all | Expand 10 after
4026 case HObjectAccess::kExternalMemory: 4031 case HObjectAccess::kExternalMemory:
4027 os << "[external-memory]"; 4032 os << "[external-memory]";
4028 break; 4033 break;
4029 } 4034 }
4030 4035
4031 return os << "@" << access.offset(); 4036 return os << "@" << access.offset();
4032 } 4037 }
4033 4038
4034 } // namespace internal 4039 } // namespace internal
4035 } // namespace v8 4040 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/deoptimizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698