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

Issue 11348133: Add JSNull, JSBool and JSFunction, and move toString into the new interceptor scheme. (Closed)

Created:
8 years, 1 month ago by ngeoffray
Modified:
8 years, 1 month ago
CC:
reviews_dartlang.org, erikcorry, Lasse Reichstein Nielsen
Visibility:
Public.

Description

Add JSNull, JSBool and JSFunction, and move toString into the new interceptor scheme. Committed: https://code.google.com/p/dart/source/detail?r=15142

Patch Set 1 : #

Total comments: 9

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -26 lines) Patch
M sdk/lib/_internal/compiler/implementation/js_backend/backend.dart View 1 5 chunks +28 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart View 1 2 chunks +8 lines, -5 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/interceptors.dart View 1 3 chunks +28 lines, -20 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_array.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_helper.dart View 1 1 chunk +2 lines, -1 line 2 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_number.dart View 1 1 chunk +8 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/lib/js_string.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
ngeoffray
8 years, 1 month ago (2012-11-19 17:50:11 UTC) #1
sra1
https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode957 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:957: if (message.contains('JSNull') || Will this work with --minify?
8 years, 1 month ago (2012-11-19 18:18:24 UTC) #2
ngeoffray
https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode957 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:957: if (message.contains('JSNull') || On 2012/11/19 18:18:24, sra1 wrote: > ...
8 years, 1 month ago (2012-11-20 08:45:45 UTC) #3
ngeoffray
8 years, 1 month ago (2012-11-20 09:02:45 UTC) #4
Johnni Winther
lgtm http://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): http://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1234 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1234: : 'this.$extraArg$joinedArgs'; Why the 'this.' prefix? http://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1235 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1235: ...
8 years, 1 month ago (2012-11-20 09:26:20 UTC) #5
ngeoffray
Thanks Johnni http://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): http://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1234 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1234: : 'this.$extraArg$joinedArgs'; On 2012/11/20 09:26:20, Johnni Winther ...
8 years, 1 month ago (2012-11-20 10:30:50 UTC) #6
karlklose
https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1235 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1235: boundClosureBuffer.add(" return this.self[this.target]($callArgs);"); On 2012/11/20 09:26:20, Johnni Winther wrote: ...
8 years, 1 month ago (2012-11-20 10:30:59 UTC) #7
ngeoffray
https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1235 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1235: boundClosureBuffer.add(" return this.self[this.target]($callArgs);"); On 2012/11/20 10:31:00, karlklose wrote: > ...
8 years, 1 month ago (2012-11-20 10:36:21 UTC) #8
karlklose
https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart File sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart (right): https://codereview.chromium.org/11348133/diff/4001/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart#newcode1235 sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart:1235: boundClosureBuffer.add(" return this.self[this.target]($callArgs);"); I thought about isInterceptor and hasArguments, ...
8 years, 1 month ago (2012-11-20 14:06:23 UTC) #9
karlklose
LGTM with one question: https://codereview.chromium.org/11348133/diff/5004/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right): https://codereview.chromium.org/11348133/diff/5004/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart#newcode947 sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:947: if (message.contains('JSNull') || Where does ...
8 years, 1 month ago (2012-11-20 14:09:12 UTC) #10
ngeoffray
8 years, 1 month ago (2012-11-20 14:15:17 UTC) #11
https://codereview.chromium.org/11348133/diff/5004/sdk/lib/_internal/compiler...
File sdk/lib/_internal/compiler/implementation/lib/js_helper.dart (right):

https://codereview.chromium.org/11348133/diff/5004/sdk/lib/_internal/compiler...
sdk/lib/_internal/compiler/implementation/lib/js_helper.dart:947: if
(message.contains('JSNull') ||
On 2012/11/20 14:09:12, karlklose wrote:
> Where does this come from?

Take the call foo.forEach(...). Since forEach is intercepted, we get an
interceptor object:
getInterceptor(foo).forEach(foo).

Now if 'foo' is null, we get a JSNull instance and call forEach on it. Since
JSNull does not have forEach, we get a message saying that "JSNull does not have
proprerty forEach' at runtime.

Powered by Google App Engine
This is Rietveld 408576698