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

Issue 12033056: Implement "one-shot" interceptors. (Closed)

Created:
7 years, 11 months ago by ngeoffray
Modified:
7 years, 11 months ago
Reviewers:
sra1, kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement "one-shot" interceptors. Committed: https://code.google.com/p/dart/source/detail?r=17558

Patch Set 1 : #

Total comments: 16

Patch Set 2 : #

Total comments: 9

Patch Set 3 : #

Patch Set 4 : #

Messages

Total messages: 7 (0 generated)
ngeoffray
7 years, 11 months ago (2013-01-23 16:52:29 UTC) #1
ahe
What is a one-shot interceptor?
7 years, 11 months ago (2013-01-23 20:06:56 UTC) #2
sra1
https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2100 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2100: for (Selector selector in backend.oneShotInterceptors) { These need to ...
7 years, 11 months ago (2013-01-23 21:21:30 UTC) #3
kasperl
https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2098 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2098: void emitOneShotInterceptors(CodeBuffer buffer) { How difficult would it be ...
7 years, 11 months ago (2013-01-24 07:19:14 UTC) #4
ngeoffray
Thanks all. PTAL. https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/12033056/diff/10/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode2098 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:2098: void emitOneShotInterceptors(CodeBuffer buffer) { On 2013/01/24 ...
7 years, 11 months ago (2013-01-24 08:39:15 UTC) #5
kasperl
LGTM. https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart File sdk/lib/_internal/compiler/implementation/js_backend/backend.dart (right): https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart#newcode674 sdk/lib/_internal/compiler/implementation/js_backend/backend.dart:674: final Set<Selector> oneShotInterceptors; One option would be to ...
7 years, 11 months ago (2013-01-24 09:03:51 UTC) #6
ngeoffray
7 years, 11 months ago (2013-01-24 10:41:30 UTC) #7
Thanks Kasper.

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/js_backend/namer.dart (right):

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/js_backend/namer.dart:31: final
Map<Selector, String> oneShotInterceptorNames;
On 2013/01/24 09:03:51, kasperl wrote:
> If you used a SelectorMap in the emitter, it might make sense to store the
names
> there? Not quite sure. It feels a little bit weird that we need to mappings
for
> the one shot interceptors.

As discussed, let's keep it here for now to make it consistent of how codegen
and emitter use the namer, and think about removing state in the namer.

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (right):

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/codegen.dart:1634: if
(node.isInterceptorCall) {
On 2013/01/24 09:03:51, kasperl wrote:
> Use ?: to avoid having an uninitialized valueType variable.

Done.

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart (right):

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart:57: if
(user.bothNotInLoopOrInSameLoop(input)) {
On 2013/01/24 09:03:51, kasperl wrote:
> With this name, it seems weird to call this one of the arguments. Maybe change
> this to user.hasSameLoopHeaderAs(input)?

Done.

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (right):

https://codereview.chromium.org/12033056/diff/5002/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1167: bool
bothNotInLoopOrInSameLoop(HInstruction other) {
On 2013/01/24 09:03:51, kasperl wrote:
> hasSameLoopHeaderAs

Done.

Powered by Google App Engine
This is Rietveld 408576698