Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dart2js doesn't generate code compatible with strict mode #1686

Closed
DartBot opened this issue Feb 14, 2012 · 13 comments
Closed

dart2js doesn't generate code compatible with strict mode #1686

DartBot opened this issue Feb 14, 2012 · 13 comments
Labels
closed-duplicate Closed in favor of an existing report P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug web-dart2js

Comments

@DartBot
Copy link

DartBot commented Feb 14, 2012

This issue was originally filed by @Kaliber


It isn't really a bug, but a feature request.
Code generated by frog should begin with 'use strict'. To achive that a few bugs needs to be fixed in JavaScript generator (e.g. missing var, name collision for variable 'arguments')

@anders-sandholm
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Frog, Triaged labels.

@rakudrama
Copy link
Member

What is the strict-mode code pattern for defining a variable is it has not been defined, but augmenting it if it is defined (by another <script> tag) ?

@anders-sandholm
Copy link
Contributor

Removed Area-Frog label.
Added Area-Dart2JS, FromAreaFrog labels.

@kasperl
Copy link

kasperl commented Jun 12, 2012

This makes sense to consider for dart2js too.


Removed FromAreaFrog label.
Changed the title to: "dart2js doesn't generate code compatible with strict mode".

@kasperl
Copy link

kasperl commented Sep 3, 2012

Added this to the Later milestone.

@kasperl
Copy link

kasperl commented Oct 17, 2012

Removed this from the Later milestone.

@kasperl
Copy link

kasperl commented Oct 17, 2012

Added this to the Later milestone.

@kasperl
Copy link

kasperl commented May 23, 2013

Added TriageForM5 label.

@kasperl
Copy link

kasperl commented May 28, 2013

Removed TriageForM5 label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Removed this from the Later milestone.
Added Oldschool-Milestone-Later label.

@kasperl
Copy link

kasperl commented Aug 4, 2014

Removed Oldschool-Milestone-Later label.

@peter-ahe-google
Copy link
Contributor

I made "reflection data parser" strict, and it was really helpful.

However, all the generated code isn't strict yet.

I don't think it would take much to start using strict everywhere, only issue is that we sometimes use this trick: (function() { return this })() to compute the global object. But most of that code has been updated to use "self".

@kevmoo kevmoo added P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug and removed triaged labels Feb 29, 2016
@sigmundch
Copy link
Member

duplicate of #15432

@sigmundch sigmundch added the closed-duplicate Closed in favor of an existing report label Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report P2 A bug or feature request we're likely to work on type-enhancement A request for a change that isn't a bug web-dart2js
Projects
None yet
Development

No branches or pull requests

7 participants