ES6, ES7, and beyond

Automotive
The V8 team places great importance on the evolution of JavaScript into an increasingly expressive and well-defined language that makes writing fast, safe, and correct web applications easy. In June 2015, the ES6 specification was ratified by the TC39 standards committee, making it the largest single update to the JavaScript language. New features include classes, arrow functions, promises, iterators / generators, proxies, well-known symbols, and additional syntactic sugar. TC39 has also increased the cadence of new specifications and released the candidate draft for ES7 in February 2016, to be ratified this summer. While not as expansive as the ES6 update due to the shorter release cycle, ES7 notably introduces the exponentiation operator and Array.prototype.includes().

Today we’ve reached an important milestone: V8 supports ES6 and ES7. You can use the new language features today in Chrome Canary, and they will ship by default in the M52 release of Chromium.

Given the nature of an evolving spec, the differences between various types of conformance tests, and the complexity of maintaining web compatibility, it can be difficult to determine when a certain version of ECMAScript is considered fully supported by a JavaScript engine. Read on for why spec support is more nuanced than version numbers, why proper tail calls are still under discussion, and what caveats remain at play.

An evolving spec

When TC39 decided to publish more frequent updates to the JavaScript specification, the most up-to-date version of the language became the master, draft version. Although versions of the ECMAScript spec are still produced yearly and ratified, V8 implements a combination of the most recently ratified version (e.g. ES6), certain features which are close enough to standardization that they are safe to implement (e.g. the exponentiation operator and Array.prototype.includes() from the ES7 candidate draft), and a collection of bug fixes and web compatibility amendments from more recent drafts. Part of the rationale for such an approach is that language implementations in browsers should match the specification, even if the it’s the specification that needs to be updated. In fact, the process of implementing a ratified version of the spec often uncovers many of the fixes and clarifications that comprise the next version of the spec.

Currently shipping parts of the evolving ECMAScript specification

For example, when implementing the ES6 RegExp sticky flag, the V8 team discovered that the semantics of the ES6 spec broke many existing sites (including all sites using versions 2.x.x of the the popular XRegExp library on npm). Since compatibility is a cornerstone of the web, engineers from the V8 and Safari JavaScriptCore teams proposed an amendment to the RegExp specification to fix the breakage, which was agreed upon by TC39. The amendment won't appear in a ratified version until ES8, but it's still a part of the ECMAScript language and we've implemented it in order to ship the RegExp sticky flag.

The continual refinement of the language specification and the fact that each version (including the yet-to-be-ratified draft) replaces, amends, and clarifies previous versions makes it tricky to understand the complexities behind ES6 and ES7 support. While it's impossible to state succinctly, it's perhaps most accurate to say that V8 supports compliance with the “continually maintained draft future ECMAScript standard”!

Measuring conformance

In an attempt to make sense of this specification complexity, there are a variety of ways to measure JavaScript engine compatibility with the ECMAScript standard. The V8 team, as well as other browser vendors, use the test262 test suite as the gold standard of conformance to the continually maintained draft future ECMAScript standard. This test suite is continually updated to match the spec and it provides 16,000 discrete functional tests for all the features and edge cases which make up a compatible, compliant implementation of JavaScript. Currently V8 passes approximately 98% of test262, and the remaining 2% are a handful of edge cases and future ES features not yet ready to be shipped.

Since it’s difficult to skim the enormous number of test262 tests, other conformance tests exist, such as the Kangax compatibility table. Kangax makes it easy to skim to see whether a particular feature (like arrow functions) has been implemented in a given engine, but doesn’t test all the conformance edge cases that test262 does. Currently, Chrome Canary scores a 98% on the Kangax table for ES6 and 100% on the sections of Kangax corresponding to ES7 (e.g. the sections labelled “2016 features” and “2016 misc” under the ESnext tab).

The remaining 2% of the Kangax ES6 table tests proper tail calls, a feature which has been implemented in V8, but deliberately turned off in Chrome Canary due to outstanding developer experience concerns detailed below. With the “Experimental JavaScript features” flag enabled, which forces this feature on, Canary scores 100% on the entirety of the Kangax table for ES6.

Proper Tail Calls

Proper tail calls have been implemented but not yet shipped given that a change to the feature is currently under discussion at TC39. ES6 specifies that strict mode function calls in tail position should never cause a stack overflow. While this is a useful guarantee for certain programming patterns, the current semantics have two problems. First, since the tail call elimination is implicit, it can be difficult for programmers to identify which functions are actually in tail call position. This means that developers may not discover misplaced attempted tail calls in their programs until they overflow the stack. Second, implementing proper tail calls requires eliding tail call stack frames from the stack, which loses information about execution flow. This in turn has two consequences:
  1. It makes it more difficult to understand during debugging how execution arrived at a certain point since the stack contains discontinuities and
  2. Error.prototype.stack contains less information about execution flow which may break telemetry software that collects and analyzes client-side errors.
Implementing a shadow stack can improve the readability of call stacks, but the V8 and DevTools teams believe that debugging is easiest, most reliable, and most accurate when the stack displayed during debugging is completely deterministic and always matches the true state of the actual virtual machine stack. Moreover, a shadow stack is too expensive performance-wise to turn on all the time.

For these reasons, the V8 team strongly support denoting proper tail calls by special syntax. There is a pending TC39 proposal called syntactic tail calls to specify this behavior, co-championed by committee members from Mozilla and Microsoft. We have implemented and staged proper tail calls as specified in ES6 and started implementing syntactic tail calls as specified in the new proposal. The V8 team plans to resolve the issue at the next TC39 meeting before shipping implicit proper tail calls or syntactic tail calls by default. You can test out each version in the meantime by using the V8 flags --harmony-tailcalls and --harmony-explicit-tailcalls.

Modules

One of the most exciting promises of ES6 is support for JavaScript modules to organize and separate different parts of an application into namespaces. ES6 specifies import and export declarations for modules, but not how modules are loaded into a JavaScript program. In the browser, loading behavior was recently specified by the new <script type="module"> tag. Although additional standardization work is needed to specify advanced dynamic module-loading APIs, Chromium support for module script tags is already in development. You can track implementation work on the launch bug and read more about experimental loader API ideas in the whatwg/loader repository.


ESnext and beyond

In the future, developers can expect ECMAScript updates to come in smaller, more frequent updates with shorter implementation cycles. The V8 team is already working to bring upcoming features such as async / await keywords, Object.values() / Object.entries(), String.prototype.padStart() / String.prototype.padEnd() and RegExp lookbehind to the runtime. Check back for more updates on our ESnext implementation progress and performance optimizations for existing ES6 and ES7 features.

We strive to continue evolving JavaScript and strike the right balance of implementing new features early, ensuring compatibility and stability of the existing web, and providing TC39 implementation feedback around design concerns. We look forward to seeing the incredible experiences developers will build with these new features.

-- Posted by the V8 team, ECMAScript Enthusiasts
Automotive
12:31:00 PM

Automotive technology

Automotive

Labels

1904 Columbus 1940 Ford 1964 Worlds Fair 1969 Camaro 1969 Dodge Coronet Super Bee 2014 2016 Sales 2017 The Bad 8 2017 The Good 12 3 wheeler 4 G 407 407 ex2 427 AC Cobra 440 six pack 442 4x 4x4 55 Chevy 57 Chevy 5th wheel AAR abandoned abs abuse by law enforcement AC Cobra Acadian accessories accident Acoustic processing Active noise control (ANC) Acura Acura Reviews adaptive cruise control ADAS Adobe AIR ads adventurers advertising aerodynamics Aircraft engines airlines airplane Airstream Alfa Alfa Romeo Alfa-Romeo All Cars Rankings All SUV Rankings All Vehicle Rankings Alpina Alpine AMBR winner ambulance AMC America's greatest photographers American LaFrance amphib AMX AMX-3 Andorra Andrew Poliak Android Andy Gryc anti lock braking system App World Apps Arab-Supercar area controller Ariel-Nomad ARM-based devices art Art Arfons Art Deco artist Asset management system Aston Martin Aston-Martin atv auction Audi Audi Reviews audio Augmented reality Austin Austin Healey Australia Austria Auto Accident Attorney auto car donate auto car donation Auto Donate Auto Donation California Auto hobby books Auto Sales By Brand auto show Auto Story in Pictures Wednesday auto taxi Autocar automobile automobile donation AUTOMOBILE INSURANCE automobile parts automobile safety system automobule donate Autonomous cars Awards awesome B 29 B 52 BAIC Baja racing Baker banners barn find barn finds barnfind barnfinds Barracuda Barris barum BatBerry Batman Batteries battery beautiful engine Beautiful paint before and after Belgium Bello's belly tanker Bentley Best Sellers Best Selling American Cars Best Selling Cars Best Selling Luxury Best Selling SUVs Best Selling Trucks Best Selling Vehicles bicycle bicycles Big 3 Swap Meet big wheel bike messengers bike rack biofuel biography BlackBerry BlackBerry Radar BlackBerry-QNX blink code blink code checkup blink code error blink code troubleshooting Blog blogs BMW BMW Audi Mercedes Benz Daimler jeep GM toyota Chrysler VW volkswagon nissan infiniti ford unique rare Bntley boardtrack Boats boattail Bonneville book review bookmobile Boss 302 Boss 429 brake brakes braking system Brand Marketshare brass era breedlove Brewster Brian Salisbury Bricklin bridge British Britten brochure Bugatti Buick Bulgaria burnout bus Buses buying selling cash tips money advice BYD c C-type Jag Cadillac Cadillac Reviews Camaro Can Am Canada Canada 2016 Sales Canada All Cars Rankings Canada All SUV Rankings Canada All Vehicle Rankings Canada Auto Sales Canada Auto Sales By Brand Canada Best Sellers Canada Compact Car Sales Canada December 2016 Canada Entry Luxury Car Sales Canada February 2017 Canada January 2017 Canada Large Car Sales Canada Large Luxury Car Sales Canada Large Luxury SUV Sales Canada Large SUV Sales Canada March 2017 Canada Midsize Car Sales Canada Midsize Luxury Car Sales Canada Midsize Luxury SUV Sales Canada Midsize SUV Sales Canada Minivan Sales Canada November 2016 Canada October 2016 Canada Premium Sporty Car Sales Canada September 2016 Canada Small Luxury SUV Sales Canada Small SUV Sales Canada Sporty Car Sales Canada Truck Sales Canada Van Sales Canada Worst Sellers car care car chase scene car clubs car collections car collectors Car Donate car donate california car donation Car Donations California Car or the Future car wash carbs carrozzeria cart caterpillar tracked vehicle CCS celebrities celebrity Certicom CES CESA 2012 CESA 3.0 Chademo Challenger Chaparral Charger Charity Charity auction charity car donation Charity Car Donation Program Charity Car With Your Credit Card cheating Checker Chery Chevelle Chevrolet Chevrolet Reviews Chevy 2 China chopper Christian Sobottka Christie Christmas Chrysler Citroen Citroën classics cleaning clip Cloud connectivity CO2 Cobra Cobra Daytona Coupe Cobra Mustang Cobra Torino COE Cogent collection collector College Colombia commercial common rail direct injection Compact Car Sales companies comparison compliment components components of anti-lock braking system concept Concept car Concept team Connected Car construction Consumer Electronics Show consumers Contest convertible Coronet Corvair corvette Corvettes Costa Rica coupe coventry cragar crash crde crdi Croatia Crosley crossover Cruise 4 Kids crypto cryptography CTS Cuda Cunningham Curtiss Aerocar Custom customer satisfaction cutaway display cycle car Cyclone Cyprus Czech Republic dacia Daihatsu Dan Gurney dart Datsun Daytona ddis DDS dealers Dealership Dean Martin December 2016 Degree delivery truck Delorean Delphi Demon Denmark Derek Kuhn design deuce devices Dick Landy dicor Digital instrument clusters digital spark ignition Diner with car theme direction injection Disney display diy Dodge domain controller Donate Donate A Car Tax Deduction Donate Automobile To Charity Donate Car To Charity Tax Deduction Donate Vehicles To Charity donation donation auto car donation vehicles to charity Doug Newcomb Drag racing drag strip Dragonsnake dragsters DREAM drifting Driven Driver distraction driving assistance drunk driver DS dtsi dual carbs dual engined dualie Ducati dump truck dvla E-type Jag ECC economy ECU Ecuador electric electric car Electric cars electromagnetic brake Elliptic Curve Cryptography EMF Emil Dautovic Endurance racing engine engine accessories Engine sound enhancement engines Entry Luxury Car Sales enzo Erskine Essex estate Estonia etc EUCAR Europe EV Business Case Evel Knievel event experience experiment extreme sports video F1 Factor-Aurelio Factory lightweight Factory race car Fairlane Falcon Fast boot Fast-Charging FCA FCEV February 2017 Ferrari Fiat Fiat Botafogo finance Finland fips fire engine fire fighting fire trucks Firebird Firestone firetrucks Fisker flamejob fleet management Ford ford escort Ford Reviews Fordson tractor Forecasts FOTA found around the neighborhood France Franklin Free Car Donation Freescale french fuel fuel injection fuel injection system Fuel Tanker fuel-cell fun Funny car Futurliner gadgets Galpin Ford game garage garner gas mileage gas stations Gasser Gauges GCBC Awards GCBC Most Popular Geely Gene Winfield General Motors German Germany give your car to charity GM GM MyLink GNX Go cart good news Goodwood Goodyear gourmet food vans GPU Graham Gran Prix Grand National Roadster Show 2017 Grand Sport Corvette Graph Great Wall Motors Greece green Green car Gremlin GT GT 350 GT 40 GT 500 gt40 GTO GTX Gulf race car Gullwing Guy Martin Hands-free systems Harley Harley Davidson hauler Hawaii helicopter hemi hemmings Hennessey Henry J hero Hertz hire Hispano-Suiza historical history HMIs Holden Hollywood Holman Moody Honda Honda Reviews Honda Sales Hong Kong Hood ornaments hood scoops Horizon 2020 horse carriage horse wagon host blog info about auto Hot rods Hot Wheels Housekeeping How To Donate How To Donate A Car For Tax Deduction How To Donate Car To Charity how to donation car to charity HRM HTML5 Hudson Hummer humor humour Humvee Hungary Hupmobile Hurst Hurst SC Rambler hybrid Hybrid cars hydrogen hypervisor Hyundai Hyundai Reviews Ian Roussel Iceland ID4 Car ignition IIoT immitation Impala india Indian Indianapolis industry news infiniti Infiniti Reviews Info infographic informative Infotainment Injury Lawyer Innotrans innova innovation innovative instrument panel insurance intake Intel interior International Harvester Internet of Things Internet radio invitation IoT Ireland iris iris details iris engine details iris technical Isetta Iskenderian Isky Isle of Man ISO 26262 Israel issues Isuzu Italian Italy ITS ITU IVI Jaguar January 2017 Japan Japanese Javelin Jay Leno Jean-François Tarabbia Jeep Jeep Wrangler JLR John D'Agostino John Deere John Wall Justin Moon jv Kaivan Karimi Kandi kawasaki Ken Block Kerry Johnson Kia kids Kim Cairns Kissel Kombi Kroy Zeviar Kurtis La Carrera Panamerica lace paint Lamborghini Lamborghini Revuelto Lancia Land Cruiser Land Rover Land Rover Sales land speed record holder Land-Rover Large Car Sales Large Luxury Car Sales Large Luxury SUV Sales Large SUV Sales Larry Wood LaSalle Latvia launch law enforcement lawnmower laws Le Mans legends Leno Lexus license plates Lidar Life Insurance limited Lincoln Lincoln MKZ Linda Campbell Linda Vaughn links lists Lithuania live Loans Locomobile logging train logging trucks Lola London to Brighton Looking for EV's Los Angeles Lotus lowrider LSR Luxembourg luxury Lyft Lynn Gayowski Mach 1 machine shop Mack Mad Max magazine magazines magic iris mags Malaysia March 2017 Mario Andretti Mark Donohue marketing Marketshare Maserati Matt Watson Maverick Mazda Mazda Reviews MB McLaren mechanic Megan Alink meme Memory Lane Men Micro Mercedes Mercedes Benz Mercedes-Benz Mercer Cobra Mercury Metallica Metro Mexico Miata microkernal Midsize Car Sales Midsize Luxury Car Sales Midsize Luxury SUV Sales Midsize SUV Sales Military Miller race car mini mini bike miniature Minivan Sales MirrorLink mission-critical Mitsubishi Miura MMI Mobile connectivity Mobile World Congress mod top Model Model A model T modifications Momo Monaco Monster Truck Moon Moon eyes Mopar Mopar parts Morgan Morocco morons mot Motor shows motor wheel Motorcycle Motorcycles motorhomes Mouse movie movies mpv Multicore Munsters Muntz muscle cars musclecars museum music video Mustang NAIAS Nancy Young Nascar Nash Navigation naza neglec neglected Netherlands new tv show New York New Zealand news ni Nissan Nissan Reviews Nomad Norway nos nose art Nova November 2016 Nurburgring Object Management group October 2016 off roading offenhauser Oldsmobile OMG Online College OnStar Opel Open source Open standards OpenGL ES option orders original owner Ormond Beach land speed racing pace car Packard Pagani Paige pamphlet panel paint Paris to Peking race parking parts Patryk Fournier Paul Leroux Paul Newman Paul Sykes Pebble Beach pedal car perodua personal Peter McCarthy petrol petroliana Peugeot Phoenix Injury photographer photography pics pictures Pierce Arrow Pike's Peak Pinin Farina pinstriping Pit row Pits Pixar PKI plank road PlayBook Plymouth Point Grey Camera Poland pole wheel police Polysynch Pontiac Porsche Porsche 917 Porsche Carrera Portugal POSIX pre 1930's gas station Premium Sporty Car Sales President of the USA Preview prices prius project prooject Proton prototype PSA Peugeot Citroen public key cryptography Pullman QNX QNX CAR QNX Garage QNX OS Qualcomm quiz quote race cars racing racing. LSR Radar radio Raid Data rail railcars railroad ralliart Rally rallying Ram range rover rant Rapid Transit System advertsing rare Real time Innovations recall recommended shop record setter Red Bull Sports Reference vehicle Reliability Rémi Bastien RemoteLink Renault Renesas Renntransporter rentals REO repair reports resarch research restoration restoration shop review Richard Bishop Ridler Award Winner rims river bank cars road and highway Road Runner roadster Robot OS Robot wars Roewe Roger Penske Rolls Royce Romain Saha Romania ROS Roth RTI RTI Connext rumble seat Russia Ruxton RV Safety Safety systems safety-certified sales Sales By Model Sales Stats samba sampan Saoutchik Satellite satnav Scaglietti scallops Scat Pack SCCA racecar School bus sci-fi Scooter SCORE Baja trucks Scott Pennock Scout sculpture Security sedan segway semi sensor extension cable sensor fusion September 2016 service service repair automotive vehicle car buying selling mission statement blog free broker shay drive locomotive Shelby shifter shop Show cars sidecars signs skateboarding Skoda slicks slingshot dragster Slovakia Slovenia Small Luxury SUV Sales Small SUV Sales Smart Smartphones snow machines snowmobile Soapbox South Africa South Korea Sox and Martin Spain spare tire spark ignition spark plug spark plugs Spatial auditory displays special edition Mustangs Speech interfaces speed limit Speed Record speedfest speedster sports car sports cars Sporty Car Sales spy shots spyker Sri Lanka SS SS/AH Stagecoach Stanley Station Wagon steam locomotive steam powered steam shovel steampunk steering wheel Steve McQueen Stig Stirling Moss Stolen streamliner street cars Street Van studebaker stunt stunts Stutz Stutz Blackhawk Subaru Sunbeam Super Bee Super Stock Superbird Supercar supercharger survey suv Suzuki Sweden Swift Switzerland System development Life Cycle Tablets Tach takeover tank tata tata magic iris tata vehicles tax Tax Deduction For Car Donation taxi taxi cab TCS tdi teardrop technical technology Telematics Telematics Detroit Telematics Update tempo Tempo Matador Terlingua Racing Team Terry Staycer Tesla test testdrive Texas Instruments The Race Of Gentlemen Thomas Bloor thoughts three wheeler Thunderbird ticket Tiger Tim Neil Tina Jeffrey tips tires tool tool kit toolbox tools Top Gear top ten list Torino tour bus tourbus towtruck Toyota Toyota Entune Toyota Reviews tractor trailer train train wreck trains Trans Am transmission Transporter Traval trike Triumph trivia trolley Troy Trepanier truck Truck Sales trucking trucks Tucker turbocharger turbojet turbonique Turkey tv tv cars twin spark type 1 type 2 tyres UAE Uber UK UK Auto Sales UK Best Sellers uk market Ukraine Unimog unique University of Waterloo Unser unusual unveil upgrade US US 2016 Sales US All Cars Rankings US All SUV Rankings US All Vehicle Rankings US Auto Sales US Auto Sales By Brand US Best Sellers US Compact Car Sales US December 2016 US Entry Luxury Car Sales US February 2017 US January 2017 US Large Car Sales US Large Luxury Car Sales US Large Luxury SUV Sales US Large SUV Sales US March 2017 US Midsize Car Sales US Midsize Luxury Car Sales US Midsize Luxury SUV Sales US Midsize SUV Sales US Minivan Sales US Navy US November 2016 US October 2016 US September 2016 US Small Luxury SUV Sales US Small SUV Sales US Sporty Car Sales US Truck Sales US US Auto Sales US Van Sales US Worst Sellers USA used cars V2X van Van Sales vauxhall VeDeCoM Vehicle Donation California Velodyne Vespa Video vintage vintage racing Virtual mechanic Virtualization VOIP Guide Volkswagen Volkswagen Reviews Volkswagen Sales Volvo Von Dutch vote VW VW bug W3C wagon train wall of death washer washer fluid Watson's Webinars website what is donation what is it wheel speed sensor wheelchair White williams Willys windshield washer wing Wireless framework women woodlight headlights Woody work truck working principle of anti-lock braking system workshop World Worst Sellers wreck Wrongful Death WW1 WW2 XK SS Yoram Berholtz Yoshiki Chubachi Z 11 Z-28 Z28 zamboni ZL1 Zotye