v8/src/builtins
Benedikt Meurer d5c19aa9fc [ic] Ensure that we make progress on KeyedLoadIC polymorphic name.
In the special case of KeyedLoadIC, where the key that is passed in is a
Name that is always the same we only checked for identity in both the
stub and the TurboFan case, which works fine for symbols and internalized
strings, but doesn't really work with non-internalized strings, where
the identity check will fail, the runtime will internalize the string,
and the IC will then see the original internalized string again and not
progress in the feedback lattice. This leads to tricky deoptimization
loops in TurboFan and constantly missing ICs.

This adds fixes the stub to always try to internalize strings first
when the identity check fails and then doing the check again. If the
name is not found in the string table we miss, since in that case the
string cannot match the previously recorded feedback name (which is
always a unique name).

In TurboFan we represent this checks with new CheckEqualsSymbol and
CheckEqualsInternalizedString operators, which validate the previously
recorded feedback, and the CheckEqualsInternalizedString operator does
the attempt to internalize the input.

Bug: v8:6936, v8:6948, v8:6969
Change-Id: I3f3b4a587c67f00f7c4b60d239eb98a9626fe04a
Reviewed-on: https://chromium-review.googlesource.com/730224
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48784}
2017-10-20 12:16:10 +00:00
..
arm Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
arm64 Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
ia32 Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
mips Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
mips64 Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
ppc Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
s390 Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
x64 Cleanup codegen.h includes 2017-10-20 11:56:01 +00:00
builtins-api.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
builtins-arguments-gen.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
builtins-arguments-gen.h add gn jumbo build support 2017-08-09 09:05:29 +00:00
builtins-array-gen.cc Revert "[Turbofan] Array.prototype.filter inlining." 2017-10-20 08:43:58 +00:00
builtins-array.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
builtins-arraybuffer.cc [runtime] Remove unnecessary casts of species constructor. 2017-05-26 15:21:32 +00:00
builtins-async-function-gen.cc [Interpreter] Make CallJSRuntime implicitly use undefined reciever. 2017-09-07 12:14:24 +00:00
builtins-async-gen.cc [cleanup] Make LanguageMode an enum class 2017-10-16 11:44:01 +00:00
builtins-async-gen.h [async-iteration] eliminate implicit Await when resuming with .return() 2017-08-09 14:53:14 +00:00
builtins-async-generator-gen.cc [Interpreter] Make CallJSRuntime implicitly use undefined reciever. 2017-09-07 12:14:24 +00:00
builtins-async-iterator-gen.cc [cleanup] CSA: Use CStringConstant helper 2017-07-11 21:11:32 +00:00
builtins-bigint.cc [bigint] Add NewBigIntFromInt factory function. 2017-10-10 09:39:20 +00:00
builtins-boolean-gen.cc [builtins] Define interface descriptors for builtins with JSFunction linkage. 2017-03-20 12:21:30 +00:00
builtins-boolean.cc [refactor] Separate generated builtins and C++ builtins into separate files 2017-03-16 11:32:01 +00:00
builtins-call-gen.cc [cleanup] Spread more CSA helpers 2017-10-13 10:41:57 +00:00
builtins-call-gen.h [runtime] Port SpreadCall code to CSA. 2017-06-20 11:44:02 +00:00
builtins-call.cc Reland "[builtins] Remove Builtins::Name() accessors" 2017-08-01 10:39:10 +00:00
builtins-callsite.cc [wasm] Move compilation methods to module-compiler.h 2017-09-28 13:14:26 +00:00
builtins-collections-gen.cc [collections] Fix error message. 2017-10-14 11:29:09 +00:00
builtins-collections.cc [builtins] Unify the naming of the Map/Set prototype builtins. 2017-10-09 19:01:14 +00:00
builtins-console-gen.cc [iwyu] Split frame-constants.h out of frames.h to reduce transitive includes. 2017-08-03 10:12:12 +00:00
builtins-console.cc [cleanup] Make LanguageMode an enum class 2017-10-16 11:44:01 +00:00
builtins-constructor-gen.cc Ensure inlined Array.protoype.shift() calls return non-COW arrays 2017-10-19 15:05:44 +00:00
builtins-constructor-gen.h Simplify code in EmitCreateShallowArrayLiteral by using CloneFastJSArray 2017-10-19 12:12:01 +00:00
builtins-constructor.h Fix JSArray::kInitialMaxFastElementArray to make sense for 32-bit platforms. 2017-10-09 07:49:41 +00:00
builtins-conversion-gen.cc [bigint] Introduce ToNumeric conversion. 2017-10-11 07:49:28 +00:00
builtins-dataview.cc [rename] Rename internal field to embedder field. 2017-03-17 13:26:05 +00:00
builtins-date-gen.cc [cleanup] Unifying instance type checks in CSA 2017-10-13 12:53:17 +00:00
builtins-date.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
builtins-debug-gen.cc [debug] remove support for full-codegen. 2017-08-16 06:18:26 +00:00
builtins-definitions.h [ic] Ensure that we make progress on KeyedLoadIC polymorphic name. 2017-10-20 12:16:10 +00:00
builtins-descriptors.h Replace Code::HANDLER by Code::BUILTIN or Code::STUB 2017-09-29 08:54:39 +00:00
builtins-error.cc [error] Lazy stack trace formatting for Error.captureStackTrace 2017-07-18 06:40:39 +00:00
builtins-function-gen.cc [cleanup] Use more CSA InstanceTypeEqual 2017-10-20 02:01:13 +00:00
builtins-function.cc Fix spec violation in Function.prototype.bind. 2017-08-17 08:42:03 +00:00
builtins-generator-gen.cc [cleanup] Unifying instance type checks in CSA 2017-10-13 12:53:17 +00:00
builtins-global-gen.cc [CSA] Use IsHeapNumber helper in older CSA code 2017-06-16 12:06:18 +00:00
builtins-global.cc [refactor] Separate generated builtins and C++ builtins into separate files 2017-03-16 11:32:01 +00:00
builtins-handler-gen.cc [ic] Introduce proper slow stub for StoreGlobalIC. 2017-10-12 14:07:41 +00:00
builtins-ic-gen.cc [ic] Ensure that we make progress on KeyedLoadIC polymorphic name. 2017-10-20 12:16:10 +00:00
builtins-internal-gen.cc Ensure inlined Array.protoype.shift() calls return non-COW arrays 2017-10-19 15:05:44 +00:00
builtins-internal.cc [runtime] Create only one instance of %ThrowTypeError%. 2017-07-10 08:26:02 +00:00
builtins-interpreter-gen.cc [cleanup] Remove always-off support for tail calls 2017-07-13 19:29:05 +00:00
builtins-interpreter.cc Reland "[builtins] Remove Builtins::Name() accessors" 2017-08-01 10:39:10 +00:00
builtins-intl-gen.cc [cleanup] Remove List. 2017-09-28 10:47:40 +00:00
builtins-intl.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
builtins-intl.h [intl] Implement Intl.NumberFormat.prototype.formatToParts 2017-06-30 20:14:18 +00:00
builtins-iterator-gen.cc [iwyu] Remove illegal inline include from "macro-assembler.h" 2017-09-13 11:44:07 +00:00
builtins-iterator-gen.h add gn jumbo build support 2017-08-09 09:05:29 +00:00
builtins-json.cc [iwyu] Remove unallowed include arguments.h -> objects-inl.h 2017-02-13 10:06:48 +00:00
builtins-math-gen.cc Use nullptr instead of NULL where possible 2017-10-13 17:21:49 +00:00
builtins-math.cc [cleanup] Replace List with std::vector in runtime and builtins. 2017-08-25 08:14:23 +00:00
builtins-number-gen.cc [cleanup] Fix remaining (D)CHECK macro usages 2017-10-18 10:12:31 +00:00
builtins-number.cc [builtins] Increase precision limits for toFixed, etc 2017-07-20 13:05:35 +00:00
builtins-object-gen.cc [cleanup] Spread more CSA helpers 2017-10-13 10:41:57 +00:00
builtins-object.cc [es2015] Optimize Object.is baseline and interesting cases. 2017-10-04 06:58:36 +00:00
builtins-promise-gen.cc Ensure inlined Array.protoype.shift() calls return non-COW arrays 2017-10-19 15:05:44 +00:00
builtins-promise-gen.h [es2015] Optimize Reflect.has builtin. 2017-10-16 17:27:41 +00:00
builtins-promise.cc [Promise] Move IsPromise to CPP 2017-07-17 19:55:28 +00:00
builtins-proxy-gen.cc [cleanup] Make LanguageMode an enum class 2017-10-16 11:44:01 +00:00
builtins-proxy-gen.h Reland "Add fast path to ObjectGetOwnPropertyDescriptor" 2017-10-12 10:52:18 +00:00
builtins-reflect-gen.cc [es2015] Optimize Reflect.has builtin. 2017-10-16 17:27:41 +00:00
builtins-reflect.cc [es2015] Optimize Reflect.has builtin. 2017-10-16 17:27:41 +00:00
builtins-regexp-gen.cc Ensure inlined Array.protoype.shift() calls return non-COW arrays 2017-10-19 15:05:44 +00:00
builtins-regexp-gen.h [regexp] Extract CSA::AllocateRegExpResult 2017-08-23 07:32:58 +00:00
builtins-regexp.cc [refactor] Separate generated builtins and C++ builtins into separate files 2017-03-16 11:32:01 +00:00
builtins-sharedarraybuffer-gen.cc [cleanup] Unifying instance type checks in CSA 2017-10-13 12:53:17 +00:00
builtins-sharedarraybuffer.cc Fix Check failure on OOB access in Atomics.wait 2017-05-31 15:08:52 +00:00
builtins-string-gen.cc Remove SubString intrinsic and convert SubString code stub to CSA. 2017-10-18 05:52:47 +00:00
builtins-string-gen.h [builtins] Port String.prototype.{trim, trimLeft, trimRight} to CSA 2017-09-06 15:12:23 +00:00
builtins-string.cc [builtins] Port String.raw to CPP 2017-10-19 13:47:33 +00:00
builtins-symbol-gen.cc Revert of [es2015] Precompute the descriptive string for symbols. (patchset #3 id:40001 of https://codereview.chromium.org/2900703002/ ) 2017-05-23 11:58:15 +00:00
builtins-symbol.cc Revert of [es2015] Precompute the descriptive string for symbols. (patchset #3 id:40001 of https://codereview.chromium.org/2900703002/ ) 2017-05-23 11:58:15 +00:00
builtins-typedarray-gen.cc [cleanup] Use more CSA InstanceTypeEqual 2017-10-20 02:01:13 +00:00
builtins-typedarray.cc [typedarrays] Check if the target is a typed array at TA.p.set entry 2017-10-19 11:10:11 +00:00
builtins-utils-gen.h [csa] Add debug file position on BasicBlock and CSA-variables 2017-04-06 09:01:14 +00:00
builtins-utils.h Add padding to builtin exit frames. 2017-10-13 13:52:18 +00:00
builtins-wasm-gen.cc [compiler] Allow for interfaces without context 2017-06-20 12:58:57 +00:00
builtins.cc Revert "[Turbofan] Array.prototype.filter inlining." 2017-10-20 08:43:58 +00:00
builtins.h [turbofan] Properly optimize literals in inlined functions. 2017-09-25 13:05:16 +00:00
setup-builtins-internal.cc Remove ComputeFlags, simply pass in Code::Kind instead of Code::Flags 2017-09-29 15:37:27 +00:00