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

Issue 293023: Added infrastructure for optimizing new CanvasArray types in WebGL... (Closed)

Created:
11 years, 2 months ago by Ken Russell (switch to Gerrit)
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Added infrastructure for optimizing new CanvasArray types in WebGL specification under development. The optimizations are patterned after those previously done for CanvasPixelArray. This CL adds all of the necessary framework but continues to use the generic KeyedLoadIC and KeyedStoreIC code, to create a baseline for benchmarking purposes. The next CL will add the optimized ICs to ic-ia32.cc and ic-x64.cc. These new CanvasArray types have different semantics than CanvasPixelArray; out-of-range values are clamped via C cast semantics, which is cheaper than the clamping behavior specified by CanvasPixelArray. Out-of-range indices raise exceptions instead of being silently ignored. As part of this work, pulled FloatingPointHelper::AllocateHeapNumber up to MacroAssembler on ia32 and x64 platforms. Slightly refactored KeyedLoadIC and KeyedStoreIC. Fixed encoding for fistp_d on x64 and added a few more instructions that are needed for the new ICs. The test cases in test-api.cc have been verified by hand to exercise all of the generated code paths in the forthcoming specialized ICs. Committed: http://code.google.com/p/v8/source/detail?r=3096

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 57

Patch Set 4 : '' #

Total comments: 5

Patch Set 5 : '' #

Patch Set 6 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1971 lines, -161 lines) Patch
M include/v8.h View 1 2 3 4 5 2 chunks +21 lines, -0 lines 0 comments Download
M src/api.cc View 1 2 3 4 5 1 chunk +24 lines, -0 lines 0 comments Download
M src/arm/ic-arm.cc View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 4 5 1 chunk +52 lines, -38 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 5 2 chunks +76 lines, -0 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 2 chunks +10 lines, -1 line 0 comments Download
M src/factory.cc View 1 2 3 4 5 2 chunks +20 lines, -0 lines 0 comments Download
M src/handles.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M src/heap.h View 1 2 3 4 5 3 chunks +20 lines, -0 lines 0 comments Download
M src/heap.cc View 1 2 3 4 5 3 chunks +89 lines, -0 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 2 3 4 5 7 chunks +8 lines, -44 lines 0 comments Download
M src/ia32/ic-ia32.cc View 1 2 3 4 5 4 chunks +15 lines, -9 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
M src/ic.h View 1 2 3 4 5 4 chunks +16 lines, -0 lines 0 comments Download
M src/ic.cc View 1 2 3 4 5 3 chunks +67 lines, -2 lines 0 comments Download
M src/messages.js View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 7 chunks +243 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 3 4 5 22 chunks +345 lines, -16 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 4 chunks +132 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 chunks +246 lines, -2 lines 0 comments Download
M src/runtime.cc View 1 2 3 4 5 5 chunks +108 lines, -1 line 0 comments Download
M src/v8-counters.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/x64/assembler-x64.h View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 2 3 4 5 4 chunks +40 lines, -1 line 0 comments Download
M src/x64/codegen-x64.cc View 1 2 3 4 5 6 chunks +6 lines, -36 lines 0 comments Download
M src/x64/ic-x64.cc View 1 2 3 4 5 4 chunks +15 lines, -9 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 2 chunks +14 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 3 chunks +32 lines, -0 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 3 4 5 3 chunks +321 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Ken Russell (switch to Gerrit)
Please review. Thanks.
11 years, 2 months ago (2009-10-20 10:45:28 UTC) #1
Christian Plesner Hansen
Whew, big one. Overall lgtm, with comments. http://codereview.chromium.org/293023/diff/1043/47 File include/v8.h (right): http://codereview.chromium.org/293023/diff/1043/47#newcode1300 Line 1300: int ...
11 years, 2 months ago (2009-10-20 11:38:42 UTC) #2
William Hesse
Perhaps you should also check the movw instructions on ia32, to make sure they are ...
11 years, 2 months ago (2009-10-20 12:56:39 UTC) #3
Kevin Millikin (Chromium)
Some style comments. I think the approach looks OK. I'm eager to see the IC ...
11 years, 2 months ago (2009-10-20 13:35:08 UTC) #4
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/293023/diff/1043/47 File include/v8.h (right): http://codereview.chromium.org/293023/diff/1043/47#newcode1300 Line 1300: int length); On 2009/10/20 11:38:42, Christian Plesner Hansen ...
11 years, 2 months ago (2009-10-20 14:35:13 UTC) #5
Christian Plesner Hansen
http://codereview.chromium.org/293023/diff/1043/58 File src/runtime.cc (right): http://codereview.chromium.org/293023/diff/1043/58#newcode2583 Line 2583: // If the target object is a JSObject ...
11 years, 2 months ago (2009-10-20 14:54:09 UTC) #6
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/293023/diff/1043/58 File src/runtime.cc (right): http://codereview.chromium.org/293023/diff/1043/58#newcode2583 Line 2583: // If the target object is a JSObject ...
11 years, 2 months ago (2009-10-20 15:08:39 UTC) #7
William Hesse
LGTM, with changes. http://codereview.chromium.org/293023/diff/5013/4029 File src/x64/assembler-x64.cc (right): http://codereview.chromium.org/293023/diff/5013/4029#newcode1261 Line 1261: emit_rex_32(src, dst); Use emit_optional_rex_32. Ox66 ...
11 years, 2 months ago (2009-10-20 15:09:47 UTC) #8
Ken Russell (switch to Gerrit)
http://codereview.chromium.org/293023/diff/5013/4029 File src/x64/assembler-x64.cc (right): http://codereview.chromium.org/293023/diff/5013/4029#newcode1261 Line 1261: emit_rex_32(src, dst); On 2009/10/20 15:09:47, William Hesse wrote: ...
11 years, 2 months ago (2009-10-20 15:22:28 UTC) #9
Christian Plesner Hansen
http://codereview.chromium.org/293023/diff/1043/58 File src/runtime.cc (right): http://codereview.chromium.org/293023/diff/1043/58#newcode2583 Line 2583: // If the target object is a JSObject ...
11 years, 2 months ago (2009-10-20 16:19:20 UTC) #10
Erik Corry
Worse than that: x = 0 x = -x foo[x] // Won't work, x is ...
11 years, 2 months ago (2009-10-20 18:32:59 UTC) #11
Christian Plesner Hansen
What makes this not work? As far as I can tell everything but error reporting ...
11 years, 2 months ago (2009-10-21 04:32:09 UTC) #12
Erik Corry
11 years, 2 months ago (2009-10-21 07:56:56 UTC) #13
Good point.  I was just kibitzing without having read the previous conversation
properly.

My point, if I still have one, is that you can get non-Smi integers without
using obviously non-integer operations like division.

Powered by Google App Engine
This is Rietveld 408576698