Bug 147287

Summary: [ES6] Add Reflect namespace and add Reflect.deleteProperty
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, commit-queue, darin, fpizlo, ggaren, joepeck, oliver, ossy, peavo, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Yusuke Suzuki 2015-07-24 18:21:01 PDT
Let's implement ES6 Reflect APIs.
Comment 1 Yusuke Suzuki 2015-07-24 18:26:55 PDT
As the first step, just add the namespace.
Comment 2 Yusuke Suzuki 2015-07-24 18:28:10 PDT
Generally, Reflect APIs are easy to implement.
One concern is Reflect.construct. It may replace the newTarget.
Comment 3 Yusuke Suzuki 2015-07-24 19:03:10 PDT
Created attachment 257502 [details]
Patch
Comment 4 Yusuke Suzuki 2015-07-24 19:08:36 PDT
Created attachment 257503 [details]
Patch
Comment 5 Yusuke Suzuki 2015-07-24 19:34:38 PDT
Created attachment 257504 [details]
Patch
Comment 6 Yusuke Suzuki 2015-07-24 19:36:11 PDT
Since the current Reflect JS builtins are empty, it generates empty C array and it becomes compiling error.
So I'll add one easy method.
Comment 7 Yusuke Suzuki 2015-07-24 20:15:38 PDT
Created attachment 257508 [details]
Patch
Comment 8 Yusuke Suzuki 2015-07-24 20:16:55 PDT
Let's implement it as a side project :)
Comment 9 Yusuke Suzuki 2015-07-25 21:25:09 PDT
Comment on attachment 257508 [details]
Patch

Thanks! Reflect is also needed for Reflect.Loader impl in modules.
Comment 10 WebKit Commit Bot 2015-07-25 22:13:50 PDT
Comment on attachment 257508 [details]
Patch

Clearing flags on attachment: 257508

Committed r187401: <http://trac.webkit.org/changeset/187401>
Comment 11 WebKit Commit Bot 2015-07-25 22:13:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Csaba Osztrogonác 2015-07-27 03:39:39 PDT
(In reply to comment #10)
> Comment on attachment 257508 [details]
> Patch
> 
> Clearing flags on attachment: 257508
> 
> Committed r187401: <http://trac.webkit.org/changeset/187401>

It broke the WinCairo build:

C:\Users\Alex\Documents\WinCairoBot\win-cairo-release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject.lut.h(27): error C2065: 'reflectObjectApply' : undeclared identifier [C:\Users\Alex\Documents\WinCairoBot\win-cairo-release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj]
C:\Users\Alex\Documents\WinCairoBot\win-cairo-release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject.lut.h(32): error C2065: 'reflectObjectDeleteProperty' : undeclared identifier [C:\Users\Alex\Documents\WinCairoBot\win-cairo-release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.vcxproj]


cc-ing WinCairo maintainers
Comment 13 Yusuke Suzuki 2015-07-27 07:55:05 PDT
(In reply to comment #12)
> (In reply to comment #10)
> > Comment on attachment 257508 [details]
> > Patch
> > 
> > Clearing flags on attachment: 257508
> > 
> > Committed r187401: <http://trac.webkit.org/changeset/187401>
> 
> It broke the WinCairo build:
> 
> C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject
> .lut.h(27): error C2065: 'reflectObjectApply' : undeclared identifier
> [C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.
> vcxproj]
> C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject
> .lut.h(32): error C2065: 'reflectObjectDeleteProperty' : undeclared
> identifier
> [C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.
> vcxproj]
> 
> 
> cc-ing WinCairo maintainers

I guess it is caused because DerivedSource JSCBuiltins.* are not updsted.
Could you peform the clean build?
Comment 14 Yusuke Suzuki 2015-07-27 07:56:35 PDT
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #10)
> > > Comment on attachment 257508 [details]
> > > Patch
> > > 
> > > Clearing flags on attachment: 257508
> > > 
> > > Committed r187401: <http://trac.webkit.org/changeset/187401>
> > 
> > It broke the WinCairo build:
> > 
> > C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> > release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject
> > .lut.h(27): error C2065: 'reflectObjectApply' : undeclared identifier
> > [C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> > release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.
> > vcxproj]
> > C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> > release\build\WebKitBuild\Release\DerivedSources\JavaScriptCore\ReflectObject
> > .lut.h(32): error C2065: 'reflectObjectDeleteProperty' : undeclared
> > identifier
> > [C:\Users\Alex\Documents\WinCairoBot\win-cairo-
> > release\build\WebKitBuild\Release\Source\JavaScriptCore\JavaScriptCore.
> > vcxproj]
> > 
> > 
> > cc-ing WinCairo maintainers
> .
> I guess it is caused because DerivedSource JSCBuiltins.* are not updsted.
> Could you peform the clean build?

I'll check this.
Comment 15 Csaba Osztrogonác 2015-07-27 08:01:14 PDT
I triggered clean build on the WinCairo bot, let's see if it helps:
https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/47678
Comment 16 Csaba Osztrogonác 2015-07-27 08:04:05 PDT
(In reply to comment #15)
> I triggered clean build on the WinCairo bot, let's see if it helps:
> https://build.webkit.org/builders/WinCairo%2064-Bit%20Release/builds/47678

It didn't help and now the bot is completely broken:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Configuring incomplete, errors occurred!
See also "C:/Users/Alex/Documents/WinCairoBot/win-cairo-release/build/WebKitBuild/Release/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Alex/Documents/WinCairoBot/win-cairo-release/build/WebKitBuild/Release/CMakeFiles/CMakeError.log".
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_C_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.


CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Comment 17 Alex Christensen 2015-07-27 09:57:27 PDT
(In reply to comment #16)
> It didn't help and now the bot is completely broken:
That's because I installed ninja and haven't landed https://bugs.webkit.org/show_bug.cgi?id=147228 yet.  I'll uninstall ninja and do another clean build.
Comment 18 Yusuke Suzuki 2015-07-27 16:46:34 PDT
WinCairo bot becomes green :D