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

Issue 1350113002: [runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare. (Closed)

Created:
5 years, 3 months ago by Benedikt Meurer
Modified:
5 years, 3 months ago
Reviewers:
conradw, Jarin
CC:
v8-reviews_googlegroups.com, rmcilroy, oth
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[runtime] Replace COMPARE/COMPARE_STRONG with proper Object::Compare. This removes the weird COMPARE and COMPARE_STRONG JavaScript builtins and replaces them with a proper C++ implementation in Object::Compare and appropriate wrappers Object::LessThan, Object::GreaterThan, and friends that are intended to be used by a true/false returning CompareIC in the future, as well as the interpreter. As a short-term solution we provide %Compare and %Compare_Strong entry points for the current CompareIC that return the appropriate integer values expected by fullcodegen currently. Now the Abstract Relational Comparison is also using the correct ToPrimitive implementation, which properly supports @@toPrimitive. BUG=v8:4307 LOG=n Committed: https://crrev.com/593c655a3c814277283f9fa1520d5ce59d6b019c Cr-Commit-Position: refs/heads/master@{#30816}

Patch Set 1 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+310 lines, -188 lines) Patch
M src/arm/code-stubs-arm.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M src/contexts.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/full-codegen/full-codegen.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/full-codegen/full-codegen.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M src/hydrogen.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/hydrogen.cc View 1 chunk +0 lines, -10 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M src/objects.h View 5 chunks +39 lines, -0 lines 0 comments Download
M src/objects.cc View 4 chunks +115 lines, -0 lines 4 comments Download
M src/objects-inl.h View 1 chunk +72 lines, -0 lines 0 comments Download
M src/runtime.js View 2 chunks +0 lines, -53 lines 0 comments Download
M src/runtime/runtime.h View 2 chunks +2 lines, -1 line 0 comments Download
M src/runtime/runtime-numbers.cc View 2 chunks +0 lines, -20 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 chunk +52 lines, -0 lines 0 comments Download
M src/runtime/runtime-strings.cc View 1 chunk +12 lines, -60 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 chunk +3 lines, -7 lines 0 comments Download

Messages

Total messages: 25 (12 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1350113002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1350113002/1
5 years, 3 months ago (2015-09-17 18:23:41 UTC) #2
Benedikt Meurer
Orion, Ross: FYI
5 years, 3 months ago (2015-09-17 18:23:58 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/8120) v8_linux64_avx2_rel on ...
5 years, 3 months ago (2015-09-17 18:26:20 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1350113002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1350113002/20001
5 years, 3 months ago (2015-09-18 02:06:18 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1350113002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1350113002/60001
5 years, 3 months ago (2015-09-18 02:20:59 UTC) #12
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/4480)
5 years, 3 months ago (2015-09-18 02:31:29 UTC) #14
Benedikt Meurer
Hey Jaro, The last spec operation builtin gone! Woohoo! Please take a look. Thanks, Benedikt
5 years, 3 months ago (2015-09-18 04:22:58 UTC) #17
Jarin
lgtm
5 years, 3 months ago (2015-09-18 06:34:06 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1350113002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1350113002/80001
5 years, 3 months ago (2015-09-18 06:34:20 UTC) #20
commit-bot: I haz the power
Committed patchset #1 (id:80001)
5 years, 3 months ago (2015-09-18 06:35:43 UTC) #21
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/593c655a3c814277283f9fa1520d5ce59d6b019c Cr-Commit-Position: refs/heads/master@{#30816}
5 years, 3 months ago (2015-09-18 06:35:58 UTC) #22
conradw
https://codereview.chromium.org/1350113002/diff/80001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1350113002/diff/80001/src/objects.cc#newcode202 src/objects.cc:202: Strength strength) { We've been trying to use the ...
5 years, 3 months ago (2015-09-18 08:59:22 UTC) #24
Benedikt Meurer
5 years, 3 months ago (2015-09-18 09:52:03 UTC) #25
Message was sent while issue was closed.
https://codereview.chromium.org/1350113002/diff/80001/src/objects.cc
File src/objects.cc (right):

https://codereview.chromium.org/1350113002/diff/80001/src/objects.cc#newcode202
src/objects.cc:202: Strength strength) {
On 2015/09/18 08:59:22, conradw wrote:
> We've been trying to use the Strength enum only for weak vs strong mode
objects
> (the name could possibly be reverted back to ObjectStrength), rather than for
> messaging the current language mode, see Runtime_GetProperty. Using the
> LanguageMode enum here instead would fit better with that.

Hm, that was totally non obvious from the comment on enum class Strength?!

https://codereview.chromium.org/1350113002/diff/80001/src/objects.cc#newcode223
src/objects.cc:223: Isolate* const isolate =
Handle<HeapObject>::cast(x)->GetIsolate();
On 2015/09/18 08:59:22, conradw wrote:
> Can the isolates ever be different here?

No, but either x or y can be a Smi and therefore the cast would fail.

Powered by Google App Engine
This is Rietveld 408576698