Revert of [crankshaft] Inline hasOwnProperty when used in fast-case for-in (patchset #1 id:40001 of https://codereview.chromium.org/1742253002/ )
Reason for revert: ARM64 GCStress failure Original issue's description: > [crankshaft] Inline hasOwnProperty when used in fast-case for-in > > e.g., > > for (var k in o) { > if (!o.hasOwnProperty(k)) continue; > ... > } > > without enumerable properties on the prototype chain of o. > > BUG= > > Committed: https://crrev.com/dec80752eb344dfeb85588e61ac0afd22b11aadb > Cr-Commit-Position: refs/heads/master@{#34379} TBR=bmeurer@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= Review URL: https://codereview.chromium.org/1748143004 Cr-Commit-Position: refs/heads/master@{#34380}
This commit is contained in:
parent
dec80752eb
commit
b5487307db
@ -8752,22 +8752,6 @@ bool HOptimizedGraphBuilder::TryInlineBuiltinMethodCall(
|
||||
}
|
||||
// Try to inline calls like Math.* as operations in the calling function.
|
||||
switch (id) {
|
||||
case kObjectHasOwnProperty: {
|
||||
if (argument_count != 2) return false;
|
||||
HValue* key = Top();
|
||||
if (!key->IsLoadKeyed()) return false;
|
||||
HValue* elements = HLoadKeyed::cast(key)->elements();
|
||||
if (!elements->IsPhi() || elements->OperandCount() != 1) return false;
|
||||
if (!elements->OperandAt(0)->IsForInCacheArray()) return false;
|
||||
HForInCacheArray* cache = HForInCacheArray::cast(elements->OperandAt(0));
|
||||
HValue* receiver = environment()->ExpressionStackAt(1);
|
||||
if (!receiver->IsPhi() || receiver->OperandCount() != 1) return false;
|
||||
if (cache->enumerable() != receiver->OperandAt(0)) return false;
|
||||
Drop(3); // key, receiver, function
|
||||
Add<HCheckMapValue>(receiver, cache->map());
|
||||
ast_context()->ReturnValue(graph()->GetConstantTrue());
|
||||
return true;
|
||||
}
|
||||
case kStringCharCodeAt:
|
||||
case kStringCharAt:
|
||||
if (argument_count == 2) {
|
||||
|
@ -6562,41 +6562,40 @@ class Script: public Struct {
|
||||
//
|
||||
// Installation of ids for the selected builtin functions is handled
|
||||
// by the bootstrapper.
|
||||
#define FUNCTIONS_WITH_ID_LIST(V) \
|
||||
V(Array.prototype, indexOf, ArrayIndexOf) \
|
||||
V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \
|
||||
V(Array.prototype, push, ArrayPush) \
|
||||
V(Array.prototype, pop, ArrayPop) \
|
||||
V(Array.prototype, shift, ArrayShift) \
|
||||
V(Function.prototype, apply, FunctionApply) \
|
||||
V(Function.prototype, call, FunctionCall) \
|
||||
V(Object.prototype, hasOwnProperty, ObjectHasOwnProperty) \
|
||||
V(String.prototype, charCodeAt, StringCharCodeAt) \
|
||||
V(String.prototype, charAt, StringCharAt) \
|
||||
V(String.prototype, concat, StringConcat) \
|
||||
V(String.prototype, toLowerCase, StringToLowerCase) \
|
||||
V(String.prototype, toUpperCase, StringToUpperCase) \
|
||||
V(String, fromCharCode, StringFromCharCode) \
|
||||
V(Math, random, MathRandom) \
|
||||
V(Math, floor, MathFloor) \
|
||||
V(Math, round, MathRound) \
|
||||
V(Math, ceil, MathCeil) \
|
||||
V(Math, abs, MathAbs) \
|
||||
V(Math, log, MathLog) \
|
||||
V(Math, exp, MathExp) \
|
||||
V(Math, sqrt, MathSqrt) \
|
||||
V(Math, pow, MathPow) \
|
||||
V(Math, max, MathMax) \
|
||||
V(Math, min, MathMin) \
|
||||
V(Math, cos, MathCos) \
|
||||
V(Math, sin, MathSin) \
|
||||
V(Math, tan, MathTan) \
|
||||
V(Math, acos, MathAcos) \
|
||||
V(Math, asin, MathAsin) \
|
||||
V(Math, atan, MathAtan) \
|
||||
V(Math, atan2, MathAtan2) \
|
||||
V(Math, imul, MathImul) \
|
||||
V(Math, clz32, MathClz32) \
|
||||
#define FUNCTIONS_WITH_ID_LIST(V) \
|
||||
V(Array.prototype, indexOf, ArrayIndexOf) \
|
||||
V(Array.prototype, lastIndexOf, ArrayLastIndexOf) \
|
||||
V(Array.prototype, push, ArrayPush) \
|
||||
V(Array.prototype, pop, ArrayPop) \
|
||||
V(Array.prototype, shift, ArrayShift) \
|
||||
V(Function.prototype, apply, FunctionApply) \
|
||||
V(Function.prototype, call, FunctionCall) \
|
||||
V(String.prototype, charCodeAt, StringCharCodeAt) \
|
||||
V(String.prototype, charAt, StringCharAt) \
|
||||
V(String.prototype, concat, StringConcat) \
|
||||
V(String.prototype, toLowerCase, StringToLowerCase) \
|
||||
V(String.prototype, toUpperCase, StringToUpperCase) \
|
||||
V(String, fromCharCode, StringFromCharCode) \
|
||||
V(Math, random, MathRandom) \
|
||||
V(Math, floor, MathFloor) \
|
||||
V(Math, round, MathRound) \
|
||||
V(Math, ceil, MathCeil) \
|
||||
V(Math, abs, MathAbs) \
|
||||
V(Math, log, MathLog) \
|
||||
V(Math, exp, MathExp) \
|
||||
V(Math, sqrt, MathSqrt) \
|
||||
V(Math, pow, MathPow) \
|
||||
V(Math, max, MathMax) \
|
||||
V(Math, min, MathMin) \
|
||||
V(Math, cos, MathCos) \
|
||||
V(Math, sin, MathSin) \
|
||||
V(Math, tan, MathTan) \
|
||||
V(Math, acos, MathAcos) \
|
||||
V(Math, asin, MathAsin) \
|
||||
V(Math, atan, MathAtan) \
|
||||
V(Math, atan2, MathAtan2) \
|
||||
V(Math, imul, MathImul) \
|
||||
V(Math, clz32, MathClz32) \
|
||||
V(Math, fround, MathFround)
|
||||
|
||||
#define ATOMIC_FUNCTIONS_WITH_ID_LIST(V) \
|
||||
|
Loading…
Reference in New Issue
Block a user