Reviewers: Sven Panne, Yang,

Description:
[turbofan] Unify Math.floor / Math.ceil optimization.

Provide an intrinsic %MathFloor / %_MathFloor that is used to optimize
both Math.ceil and Math.floor, and use the JS inlining mechanism to
inline Math.ceil into TurboFan code. Although we need to touch code
outside of TurboFan to make this work, this does not affect the way we
handle Math.ceil and/or Math.floor in CrankShaft, because for CrankShaft
the old-style builtin function id based inlining still kicks in first.

Once this solution is stabilized, we can use it for Math.floor as well.
And once that is settled, we can establish it as the unified way to
inline builtins, and get rid of the specialized builtin function id
based inlining at some point.

Note that "builtin" applies to basically every piece of internal
JavaScript/intrinsics based code, so this also applies to the yet to be
defined JavaScript based code stubs and handlers.

BUG=v8:3953
LOG=n
[email protected],[email protected]

Please review this at https://codereview.chromium.org/990963003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+181, -245 lines):
  M src/compiler/arm/code-generator-arm.cc
  M src/compiler/arm/instruction-codes-arm.h
  M src/compiler/arm/instruction-selector-arm.cc
  M src/compiler/arm64/code-generator-arm64.cc
  M src/compiler/arm64/instruction-codes-arm64.h
  M src/compiler/arm64/instruction-selector-arm64.cc
  M src/compiler/ia32/code-generator-ia32.cc
  M src/compiler/ia32/instruction-codes-ia32.h
  M src/compiler/ia32/instruction-selector-ia32.cc
  M src/compiler/instruction-selector.cc
  M src/compiler/js-builtin-reducer.h
  M src/compiler/js-builtin-reducer.cc
  M src/compiler/js-intrinsic-lowering.h
  M src/compiler/js-intrinsic-lowering.cc
  M src/compiler/machine-operator.h
  M src/compiler/machine-operator.cc
  M src/compiler/opcodes.h
  M src/compiler/raw-machine-assembler.h
  M src/compiler/simplified-lowering.cc
  M src/compiler/typer.cc
  M src/compiler/verifier.cc
  M src/compiler/x64/code-generator-x64.cc
  M src/compiler/x64/instruction-codes-x64.h
  M src/compiler/x64/instruction-selector-x64.cc
  M src/hydrogen.cc
  M src/ia32/assembler-ia32.h
  M src/ia32/lithium-codegen-ia32.cc
  M src/math.js
  M src/runtime/runtime.h
  M src/runtime/runtime-maths.cc
  M src/x64/assembler-x64.h
  M src/x64/assembler-x64.cc
  M src/x64/lithium-codegen-x64.cc
  M test/cctest/compiler/test-run-machops.cc
  M test/unittests/compiler/js-builtin-reducer-unittest.cc
  M test/unittests/compiler/machine-operator-unittest.cc
  M test/unittests/compiler/node-test-utils.h
  M test/unittests/compiler/node-test-utils.cc
  M tools/check-name-clashes.py


--
--
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