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

Issue 2028983002: Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) (Closed)

Created:
4 years, 6 months ago by Camillo Bruni
Modified:
4 years, 6 months ago
CC:
Hannes Payer (out of office), oth, rmcilroy, ulan, v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Introduce IsUndefined(Isolate*) and IsTheHole(Isolate*) Passing in the isolate and pointer compare the instnance against the corresponding constant is always faster than decoding the instance types. BUG= Committed: https://crrev.com/bc0798ca1a7e28eb82f03f40184b3b252f389fc4 Cr-Commit-Position: refs/heads/master@{#36744}

Patch Set 1 #

Patch Set 2 : fixing wrongly wrapped lines #

Total comments: 3

Patch Set 3 : making things worse #

Patch Set 4 : fixup #

Patch Set 5 : fixing arm #

Patch Set 6 : reducing old cmpare patterns #

Total comments: 2

Patch Set 7 : restoring original fast path comparisons #

Patch Set 8 : rebasing #

Patch Set 9 : doing proper rebase #

Total comments: 11

Patch Set 10 : addressing nits except HeapObject methods #

Patch Set 11 : adding todo #

Patch Set 12 : rebase master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+754 lines, -630 lines) Patch
M src/accessors.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 6 11 chunks +13 lines, -14 lines 0 comments Download
M src/api-arguments.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/api-natives.cc View 1 2 12 chunks +23 lines, -18 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/ast/ast.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/ast/prettyprinter.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M src/ast/prettyprinter.cc View 1 2 4 chunks +4 lines, -2 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 8 chunks +14 lines, -10 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 5 6 7 8 9 10 11 21 chunks +26 lines, -25 lines 0 comments Download
M src/code-stubs.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/code-stubs.cc View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M src/codegen.cc View 1 2 2 chunks +8 lines, -6 lines 0 comments Download
M src/compilation-cache.cc View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M src/compiler/js-call-reducer.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/js-context-specialization.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/js-graph.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler/pipeline.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M src/contexts.cc View 1 2 7 chunks +12 lines, -10 lines 0 comments Download
M src/contexts-inl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +9 lines, -8 lines 0 comments Download
M src/crankshaft/hydrogen-instructions.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/crankshaft/hydrogen-types.cc View 1 2 3 4 5 1 chunk +12 lines, -10 lines 0 comments Download
M src/d8-posix.cc View 3 1 chunk +5 lines, -8 lines 0 comments Download
M src/debug/debug.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +12 lines, -13 lines 0 comments Download
M src/debug/debug-evaluate.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/debug/debug-frames.cc View 1 2 4 chunks +6 lines, -4 lines 0 comments Download
M src/debug/debug-scopes.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M src/debug/liveedit.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M src/deoptimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +14 lines, -11 lines 0 comments Download
M src/elements.cc View 1 2 3 6 15 chunks +19 lines, -18 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 4 chunks +4 lines, -4 lines 0 comments Download
M src/frames.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/full-codegen.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/ppc/full-codegen-ppc.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/s390/full-codegen-s390.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/full-codegen/x87/full-codegen-x87.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -6 lines 0 comments Download
M src/heap/heap-inl.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M src/heap/incremental-marking.cc View 1 2 3 4 5 6 7 2 chunks +3 lines, -3 lines 0 comments Download
M src/heap/mark-compact.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M src/heap/mark-compact-inl.h View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/heap/objects-visiting.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/heap/objects-visiting-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/ic/arm/handler-compiler-arm.cc View 1 2 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/arm64/handler-compiler-arm64.cc View 1 2 3 4 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/call-optimization.cc View 1 2 2 chunks +10 lines, -7 lines 0 comments Download
M src/ic/handler-compiler.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/ic/ia32/handler-compiler-ia32.cc View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M src/ic/ic.cc View 1 2 3 4 5 6 7 11 chunks +14 lines, -13 lines 0 comments Download
M src/ic/ic-state.h View 1 2 3 4 5 1 chunk +4 lines, -3 lines 0 comments Download
M src/ic/ic-state.cc View 1 2 3 4 5 4 chunks +8 lines, -7 lines 0 comments Download
M src/ic/mips/handler-compiler-mips.cc View 1 2 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/mips64/handler-compiler-mips64.cc View 1 2 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/ppc/handler-compiler-ppc.cc View 1 2 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/s390/handler-compiler-s390.cc View 1 2 5 chunks +7 lines, -6 lines 0 comments Download
M src/ic/x64/handler-compiler-x64.cc View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M src/ic/x87/handler-compiler-x87.cc View 1 2 5 chunks +8 lines, -8 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 13 chunks +15 lines, -14 lines 0 comments Download
M src/isolate-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/json-parser.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M src/json-stringifier.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/keys.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/log.cc View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M src/log-utils.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/lookup.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/messages.cc View 1 2 4 chunks +5 lines, -4 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +9 lines, -2 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 84 chunks +147 lines, -121 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 24 chunks +53 lines, -44 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 21 chunks +48 lines, -27 lines 0 comments Download
M src/objects-printer.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M src/ppc/code-stubs-ppc.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/profiler/heap-snapshot-generator.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M src/property-descriptor.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-array.cc View 1 2 3 4 5 2 chunks +3 lines, -4 lines 0 comments Download
M src/runtime/runtime-classes.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-collections.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M src/runtime/runtime-debug.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +8 lines, -6 lines 0 comments Download
M src/runtime/runtime-function.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-i18n.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-internal.cc View 3 chunks +5 lines, -4 lines 0 comments Download
M src/runtime/runtime-literals.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -3 lines 0 comments Download
M src/runtime/runtime-liveedit.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime-object.cc View 1 2 6 chunks +10 lines, -9 lines 0 comments Download
M src/runtime/runtime-proxy.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/runtime/runtime-scopes.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M src/runtime/runtime-symbol.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/s390/code-stubs-s390.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/partial-serializer.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/snapshot/serializer.cc View 1 chunk +2 lines, -1 line 0 comments Download
M src/snapshot/serializer-common.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/string-stream.cc View 1 2 3 4 5 3 chunks +8 lines, -7 lines 0 comments Download
M src/type-info.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/typing-asm.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/wasm/wasm-js.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 4 chunks +7 lines, -5 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -4 lines 0 comments Download
M src/x87/code-stubs-x87.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/heap/test-heap.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/test-api.h View 1 2 3 2 chunks +5 lines, -5 lines 0 comments Download
M test/unittests/interpreter/constant-array-builder-unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 46 (15 generated)
Camillo Bruni
ula@ PTAL heap/* verwaest@ PTAL the rest.
4 years, 6 months ago (2016-06-01 08:23:42 UTC) #2
ulan
Is the performance difference measurable? In the old implementation we do two loads obj->map()->instance_type() and ...
4 years, 6 months ago (2016-06-01 08:35:58 UTC) #3
Yang
On 2016/06/01 08:35:58, ulan wrote: > Is the performance difference measurable? > > In the ...
4 years, 6 months ago (2016-06-01 08:39:24 UTC) #4
Camillo Bruni
On 2016/06/01 at 08:39:24, yangguo wrote: > On 2016/06/01 08:35:58, ulan wrote: > > Is ...
4 years, 6 months ago (2016-06-01 10:31:27 UTC) #5
ulan
Thanks. Heap part lgtm.
4 years, 6 months ago (2016-06-01 10:52:44 UTC) #6
Toon Verwaest
Thanks, LGTM (with a comment for another CL) Also we should migrate places where we ...
4 years, 6 months ago (2016-06-01 12:36:17 UTC) #7
Yang
LGTM. Also agree with Toon's comment. We've got tons of places where we manually do ...
4 years, 6 months ago (2016-06-01 12:46:02 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028983002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2028983002/60001
4 years, 6 months ago (2016-06-01 15:07:40 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm64_rel_ng on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm64_rel_ng/builds/2438)
4 years, 6 months ago (2016-06-01 15:16:51 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028983002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2028983002/100001
4 years, 6 months ago (2016-06-01 17:04:16 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-01 17:34:03 UTC) #17
ulan
heap changes still look good, but I think we are going to regress hash table ...
4 years, 6 months ago (2016-06-01 19:01:44 UTC) #18
Yang
On 2016/06/01 19:01:44, ulan wrote: > heap changes still look good, but I think we ...
4 years, 6 months ago (2016-06-02 04:33:44 UTC) #19
Camillo Bruni
> heap->isolate->heap is a no-op. Heap is a member of isolate. We get from the ...
4 years, 6 months ago (2016-06-02 09:13:00 UTC) #20
Camillo Bruni
On 2016/06/02 at 09:13:00, Camillo Bruni wrote: As discussed offline, I will change back the ...
4 years, 6 months ago (2016-06-02 10:56:44 UTC) #21
Camillo Bruni
PTAL again... :D https://codereview.chromium.org/2028983002/diff/20001/src/debug/debug.cc File src/debug/debug.cc (right): https://codereview.chromium.org/2028983002/diff/20001/src/debug/debug.cc#newcode2104 src/debug/debug.cc:2104: if (!callback->IsUndefined(isolate_) && !callback->IsNull()) { On ...
4 years, 6 months ago (2016-06-02 11:48:36 UTC) #22
ulan
lgtm, thank you
4 years, 6 months ago (2016-06-03 08:51:24 UTC) #23
Camillo Bruni
On 2016/06/03 at 08:51:24, ulan wrote: > lgtm, thank you thanks for spending your time ...
4 years, 6 months ago (2016-06-03 09:41:38 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028983002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2028983002/160001
4 years, 6 months ago (2016-06-03 12:47:00 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-03 13:16:27 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028983002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2028983002/160001
4 years, 6 months ago (2016-06-03 13:28:57 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/16470)
4 years, 6 months ago (2016-06-03 13:33:45 UTC) #33
Camillo Bruni
mstarzinger@ PTAL (ast/.*)|(compiler/.*)|(interpreter/.*) ahaas@ PTAL wasm/.*
4 years, 6 months ago (2016-06-03 13:38:27 UTC) #35
ahaas
lgtm
4 years, 6 months ago (2016-06-03 13:45:00 UTC) #36
Michael Starzinger
LGTM with comments. https://codereview.chromium.org/2028983002/diff/160001/src/compiler/pipeline.cc File src/compiler/pipeline.cc (right): https://codereview.chromium.org/2028983002/diff/160001/src/compiler/pipeline.cc#newcode537 src/compiler/pipeline.cc:537: Isolate* isolate = script->GetIsolate(); nit: info->isolate() ...
4 years, 6 months ago (2016-06-06 08:55:08 UTC) #37
Camillo Bruni
https://codereview.chromium.org/2028983002/diff/160001/src/compiler/pipeline.cc File src/compiler/pipeline.cc (right): https://codereview.chromium.org/2028983002/diff/160001/src/compiler/pipeline.cc#newcode537 src/compiler/pipeline.cc:537: Isolate* isolate = script->GetIsolate(); On 2016/06/06 at 08:55:08, Michael ...
4 years, 6 months ago (2016-06-06 12:27:49 UTC) #38
Camillo Bruni
Leaving the duplicated methods on HeapObject in place for now. Followup CLs will do further ...
4 years, 6 months ago (2016-06-06 12:28:34 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2028983002/220001
4 years, 6 months ago (2016-06-06 12:28:47 UTC) #42
Michael Starzinger
https://codereview.chromium.org/2028983002/diff/160001/src/objects-inl.h File src/objects-inl.h (right): https://codereview.chromium.org/2028983002/diff/160001/src/objects-inl.h#newcode2296 src/objects-inl.h:2296: if (IsSmi()) return; On 2016/06/06 12:27:49, Camillo Bruni wrote: ...
4 years, 6 months ago (2016-06-06 12:29:26 UTC) #43
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 6 months ago (2016-06-06 12:58:20 UTC) #44
commit-bot: I haz the power
4 years, 6 months ago (2016-06-06 13:00:57 UTC) #46
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/bc0798ca1a7e28eb82f03f40184b3b252f389fc4
Cr-Commit-Position: refs/heads/master@{#36744}

Powered by Google App Engine
This is Rietveld 408576698