The general direction looks fine, I just made a few remarks about the
granularity of intrinsics. The general direction should be that we only provide what can't be expressed in JavaScript, avoiding the need for hundreds of highly
specialized intrinsics.


https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.cc#newcode1628
src/hydrogen.cc:1628: HValue*
HGraphBuilder::BuildComputeIntegerHash(HValue* value,
I think this can be expressed purely in JavaScript.

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.cc#newcode12104
src/hydrogen.cc:12104: void
HOptimizedGraphBuilder::GenerateFixedArraySetTheHole(CallRuntime* call)
{
Hmmm, perhaps a %_Hole() intrinsic is nicer, you could use a combination
of this with the %_FixedArraySet intrinsic above then. As it is, this
looks a bit too specialized.

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.cc#newcode12117
src/hydrogen.cc:12117: void
HOptimizedGraphBuilder::GenerateJSCollectionGetTable(CallRuntime* call)
{
We can leave it as it is for now, but I think that in the future we will
have something more general like %_GetInternalField.

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.cc#newcode12151
src/hydrogen.cc:12151: IfBuilder string_checker(this);
As a general rule of thumb, we should not have any non-trivial control
flow in intrinsics. This should be expressed on the JavaScript level.

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.h
File src/hydrogen.h (right):

https://codereview.chromium.org/947683002/diff/20001/src/hydrogen.h#newcode1852
src/hydrogen.h:1852: HValue* BuildElementIndexHash(HValue* index) {
When we have %_HashSeed() (for isolate()->heap()->HashSeed()), this can
be expressed purely in JavaScript. As it is, it is too specialized.

https://codereview.chromium.org/947683002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to