Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

SyntaxError occures during benchmark run #134

Closed
abodalevsky opened this issue Oct 17, 2016 · 7 comments
Closed

SyntaxError occures during benchmark run #134

abodalevsky opened this issue Oct 17, 2016 · 7 comments

Comments

@abodalevsky
Copy link

  • Version:v7.0.0-pre
  • Platform:Windows x64 v: 10.0.10240
  • Subsystem:

When I tried to execute benchmark test benchmark\buffers\buffer-compare-instance-method.js I got the following error:

SyntaxError: Syntax error                                                                                                                                                              
   at main (E:\Projects\Git\node-chakracore\benchmark\buffers\buffer-compare-instance-method.js:21:3)                                                                                  
   at Anonymous function (E:\Projects\Git\node-chakracore\benchmark\common.js:24:28)                                                                                                   
   at _combinedTickCallback (internal/process/next_tick.js:67:7)                                                                                                                       
   at _tickCallback (internal/process/next_tick.js:98:9)                                                                                                                               
   at Module.runMain (module.js:596:3)                                                                                                                                                 
   at run (bootstrap_node.js:382:7)                                                                                                                                                    
   at startup (bootstrap_node.js:137:9)                                                                                                                                                
   at Anonymous function (bootstrap_node.js:497:3) 

to reproduce, go to benchmark\buffers and run:

node buffer-compare-instance-method.js

The same test runs on node/v8 without issues

@digitalinfinity
Copy link
Contributor

Thanks @abodalevsky - I can repro this. I think the problem is that node-cc doesn't support some internal v8 methods today- the problem is this line in the benchmark:
eval('%OptimizeFunctionOnNextCall(b0.compare)');

%OptimizeFunctionOnNextCall appears to be an internal v8 method. node-chakracore doesn't support shimming v8 internal methods today (since they're supposed to be internal to v8).

@kunalspathak @jianchun - can you guys confirm this is the case?

@kunalspathak
Copy link
Member

That's correct. Most of these functions that are exposed using --allow_natives_syntax are not supported in chakrashim.

@matthargett
Copy link

Can those benchmarks be disabled in node-chakracore somehow?

@digitalinfinity
Copy link
Contributor

@joaocgreis can you help? Is it possible to disable these benchmarks in node-chakracore? Would the changes you made to CI recently help on this front?

@joaocgreis
Copy link
Member

@digitalinfinity The tests and the benchmarks use different runners, the benchmarks' runner is less complex and it's not possible to disable benchmarks. What we could do is add a if (process.jsEngine === 'chakracore') to the unsupported benchmarks to skip them.

For a rough comparison, those lines can probably be skipped, but it wouldn't be a truthful comparison then.

cc @bzoz

@matthargett
Copy link

As a user, I'd rather have something that just runs out of the box and I can compare the benchmarks that do actually run between v8 and chakracore, or between chakracore releases.

@bzoz
Copy link
Contributor

bzoz commented Mar 6, 2017

Fixed by nodejs/node#9615

@bzoz bzoz closed this as completed Mar 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants