v8/test
Sathya Gunasekaran 8a9e3f64ee [ast] Store correct source position on ThisExpression
Previously, all ThisExpression's had kNoSourcePositions leading to
incorrect error messages like this:

  ➜ d8 -e "function t() { for (const x of this) {} } t();"
  unnamed:1: TypeError: undefined is not a function
  function t() { for (const x of this) {} } t();
            ^
  TypeError: undefined is not a function
      at t (unnamed:1:11)
      at unnamed:1:43


This patch allows creation of a ThisExpression with a source position,
leading to a better error message:

  ➜ d8  -e "function t() { for (const x of this) {} } t();"
  unnamed:1: TypeError: this is not iterable
  function t() { for (const x of this) {} } t();
                                 ^
  TypeError: this is not iterable
      at t (unnamed:1:32)
      at unnamed:1:43


This patch does not remove the existing cached version of
ThisExpression and instead creates a new one when required.

Bug: v8:6513
Change-Id: Idee4fe8946a9b821d06ff4a5e7eaefe54874ec59
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2345226
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Sathya Gunasekaran  <gsathya@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69300}
2020-08-10 09:07:35 +00:00
..
benchmarks Fix csuite compare command 2020-07-24 15:58:53 +00:00
cctest Revert "[wasm] Ensure that only TurboFan code is serialized" 2020-08-07 07:38:41 +00:00
common [wasm] Remove ExecutionTier::kInterpreter 2020-08-06 09:31:18 +00:00
debugger [nci] Check the isolate cache from within compiler.cc 2020-08-05 15:12:36 +00:00
debugging [Py3] Fix flake8 warnings 2020-07-10 16:57:15 +00:00
fuzzer [nci] Replace CompilationTarget with a new Code::Kind value 2020-08-05 12:27:22 +00:00
fuzzilli Integrate fuzzilli into v8 2020-06-03 09:53:24 +00:00
inspector [wasm][debug] Fix frame inspection at stack checks 2020-08-06 15:44:58 +00:00
intl [Intl] Define @@toStringTag for Intl namespace 2020-08-01 02:21:20 +00:00
js-perf-test Add micro-benchmark for toString(16) 2020-07-30 07:15:32 +00:00
memory
message [ast] Store correct source position on ThisExpression 2020-08-10 09:07:35 +00:00
mjsunit [tuboprop] Disable dynamic map checks for TurboProp 2020-08-07 15:14:57 +00:00
mkgrokdump [heap] Move BaseSpace into base-space.h 2020-06-19 09:38:24 +00:00
mozilla [Respect] Prefer inclusive terms 2020-06-22 18:11:23 +00:00
test262 Disallow \8 and \9 in strict mode and template literals 2020-08-03 18:05:14 +00:00
torque Reland "[torque] typed context slot access" 2020-08-06 11:32:38 +00:00
unittests [runtime] Move string table off-heap 2020-08-06 12:27:18 +00:00
wasm-api-tests [zone-compr] Fix WasmCapiTest, pt.2 2020-07-31 08:05:18 +00:00
wasm-js [wasm] Update wasm spec tests 2020-07-27 16:12:30 +00:00
wasm-spec-tests [wasm] Check size of tables dynamically 2020-08-06 11:50:43 +00:00
webkit Disallow \8 and \9 in strict mode and template literals 2020-08-03 18:05:14 +00:00
BUILD.gn Add google_benchmark depdendency 2020-07-02 20:11:29 +00:00
OWNERS