Not all parenthesized AssignmentExpressions whose components are valid
binding patterns are valid arrow function formal parameters. In
particular (a,b,c)() is not valid, and in general the existing code
wasn't catching the tail productions of ConditionalExpression,
BinaryExpression, PostfixExpression, LeftHandSideExpression,
and MemberExpression.
Thanks to Adrian Perez for the test case.
BUG=v8:4211
LOG=Y
R=rossberg@chromium.org
Review URL: https://codereview.chromium.org/1306583002
Cr-Commit-Position: refs/heads/master@{#30286}
We can use the script type to determine that instead. Script of type
TYPE_NATIVE are considered builtins, TYPE_NORMAL are not. The only exception
to this rule is the empty function, for which the script is TYPE_NATIVE
(observable by the debugger), but should be stringified to "function () {}"
instead of "function () { [native code] }". For this, I introduce a
hide_source flag on the script object.
We also use IsBuiltin and IsSubjectToDebugging interchangeably. For debugger,
we now use the latter, hiding the detail that only non-builtins are debuggable.
R=mstarzinger@chromium.org
Review URL: https://codereview.chromium.org/1292283004
Cr-Commit-Position: refs/heads/master@{#30285}
GC flags are now part of the {Heap} and should be respected by all
sub-components.
Also add a infrastructure to write tests accessing private methods.
Review URL: https://codereview.chromium.org/1301183002
Cr-Commit-Position: refs/heads/master@{#30281}
We currently have several ways to share symbols that are used in
both native scripts and the runtime. This change unifies this.
We do not use the symbols registry since we don't need the
registry any longer after bootstrapping, but the registry stays
alive afterwards.
R=mlippautz@chromium.org, rossberg@chromium.org
Review URL: https://codereview.chromium.org/1293493004
Cr-Commit-Position: refs/heads/master@{#30280}
This prevents leakage of the memory-reducer.h declarations inside of the
heap and prevents it from being exposed to the world. Protects private
state from being inadvertently mocked with.
R=mlippautz@chromium.org
Review URL: https://codereview.chromium.org/1288913003
Cr-Commit-Position: refs/heads/master@{#30277}
This prevents leakage of the gc-tracer.h declarations inside of the
heap and prevents it from being exposed to the world. Protects private
state from being inadvertently mocked with.
R=mlippautz@chromium.org
Review URL: https://codereview.chromium.org/1294763004
Cr-Commit-Position: refs/heads/master@{#30276}
Additionally, this CL moves a bit of code around to free up more memory before compaction starts.
BUG=
Review URL: https://codereview.chromium.org/1305733003
Cr-Commit-Position: refs/heads/master@{#30275}
Invalid slots in large objects can only occur when large objects became dead. These slots are filtered out already after marking.
BUG=
Review URL: https://codereview.chromium.org/1298183003
Cr-Commit-Position: refs/heads/master@{#30273}
This CL us a pure refactoring that makes an empty compilation unit
including just "snapshot.h" but not "objects-inl.h" compile without
warnings or errors. This is needed to further reduce the header
dependency tangle.
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/1287113010
Cr-Commit-Position: refs/heads/master@{#30270}
This make inclusion of unicode-inl.h in object.h absolete. Now most
compilation units don't require that header. It also breaks a cycle
within declarations of the scanner.h header.
This tries to remove includes of "-inl.h" headers from normal ".h"
headers, thereby reducing the chance of any cyclic dependencies and
decreasing the average size of our compilation units.
Note that this change still leaves 3 violations of that rule in the
code, checked with the "tools/check-inline-includes.sh" tool.
R=yangguo@chromium.org
Review URL: https://codereview.chromium.org/1287893006
Cr-Commit-Position: refs/heads/master@{#30268}
FlushICache should be NOP for Denver with part numbers 0x0, 0x1 and 0x2 only.
Instruction cache needs to flushed for future versions of denver.
Review URL: https://codereview.chromium.org/1287173004
Cr-Commit-Position: refs/heads/master@{#30262}
Rolling v8/third_party/android_tools to 4238a28593b7e6178c95431f91ca8c24e45fa7eb
Rolling v8/tools/clang to 1c7f9147c834d78b36787f31ecfc5c47f3c98da8
TBR=machenbach@chromium.org
Review URL: https://codereview.chromium.org/1293873004
Cr-Commit-Position: refs/heads/master@{#30261}
Embedders would use these for features which must be able to be turned
off at runtime, despite being compiled into V8. They can be turned on
and off by the embedder using the --experimental_extras flag, e.g. via
v8::SetFlagsFromString.
R=yangguo@chromium.org, mlippautz@chromium.org, hpayer@chromium.org
BUG=chromium:507137
LOG=Y
Review URL: https://codereview.chromium.org/1284413002
Cr-Commit-Position: refs/heads/master@{#30260}
JSObject::UnregisterPrototypeUser relies on the index of the weak
fixed array entry not to change.
See commit 1e65e2018.
There is no bug currently, because we would only re-allocate if there is no empty slot left. In which case there is no actual compaction going on during re-allocation.
R=jkummerow@chromium.org, mvstanton@chromium.org
Review URL: https://codereview.chromium.org/1294883004
Cr-Commit-Position: refs/heads/master@{#30251}
This mainly changes how we share ToBoolean, ToNumber and ToString between
native scripts. Instead of putting them on the js builtins object, we now
explicitly export and import those functions.
I also had to change the import/export mechanism slightly. Previously,
exports and imports are hooked up after all native scripts have been
executed. This means that imported functions cannot be called at the time
the native script is executed.
However, since ToBoolean (and also e.g. ObjectDefineProperties) is called
in v8natives.js, I changed the mechanism so that exports from previous
native scripts (runtime.js for ToBoolean) is imported immediately and can
be called.
R=cbruni@chromium.org
Review URL: https://codereview.chromium.org/1302533002
Cr-Commit-Position: refs/heads/master@{#30244}
port f4c079d450 (r30107).
original commit message:
There's no need to have one InstanceType per SIMD primitive type (this
will not scale long-term). Also reduce the amount of code duplication
and make it more robust wrt adding new SIMD types.
BUG=
Review URL: https://codereview.chromium.org/1286313003
Cr-Commit-Position: refs/heads/master@{#30241}
The ES6 spec for this function declares that ToLength
should only be called once. We were evaluating it multiple
times, so if length was an object with a valueOf method,
we could see effects take place multiple times.
R=littledan@chromium.org
LOG=N
BUG=v8:4218
Review URL: https://codereview.chromium.org/1237583005
Cr-Commit-Position: refs/heads/master@{#30240}
Use macros for SIMD get/set_lane, and print fns.
LOG=N
BUG=v8:4124
Review URL: https://codereview.chromium.org/1302513004
Cr-Commit-Position: refs/heads/master@{#30239}