Skip to content
Permalink
Browse files
Unreviewed, rolling out r192876.
It broke a lot of JSC and layout tests for GTK and EFL

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/192876

Canonical link: https://commits.webkit.org/169832@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Dec 1, 2015
1 parent f2d86fb commit fb082d9a7b5b6fe604301d7093ca3bd24d472b62
Showing with 330 additions and 1,356 deletions.
  1. +13 −0 LayoutTests/ChangeLog
  2. +0 −27 LayoutTests/js/arrowfunction-supercall-expected.txt
  3. +0 −10 LayoutTests/js/arrowfunction-supercall.html
  4. +0 −8 LayoutTests/js/arrowfunction-tdz-expected.txt
  5. +0 −151 LayoutTests/js/script-tests/arrowfunction-supercall.js
  6. +3 −69 LayoutTests/js/script-tests/arrowfunction-tdz.js
  7. +13 −0 Source/JavaScriptCore/ChangeLog
  8. +1 −1 Source/JavaScriptCore/builtins/BuiltinExecutables.cpp
  9. +2 −1 Source/JavaScriptCore/bytecode/BytecodeList.json
  10. +2 −0 Source/JavaScriptCore/bytecode/BytecodeUseDef.h
  11. +7 −1 Source/JavaScriptCore/bytecode/CodeBlock.cpp
  12. +3 −3 Source/JavaScriptCore/bytecode/EvalCodeCache.h
  13. +1 −7 Source/JavaScriptCore/bytecode/ExecutableInfo.h
  14. +0 −2 Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
  15. +0 −4 Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h
  16. +2 −3 Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.cpp
  17. +3 −5 Source/JavaScriptCore/bytecode/UnlinkedFunctionExecutable.h
  18. +22 −146 Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
  19. +4 −30 Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
  20. +6 −39 Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
  21. +1 −1 Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
  22. +9 −0 Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
  23. +24 −9 Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
  24. +1 −0 Source/JavaScriptCore/dfg/DFGCapabilities.cpp
  25. +1 −0 Source/JavaScriptCore/dfg/DFGClobberize.h
  26. +1 −0 Source/JavaScriptCore/dfg/DFGDoesGC.cpp
  27. +5 −0 Source/JavaScriptCore/dfg/DFGFixupPhase.cpp
  28. +1 −0 Source/JavaScriptCore/dfg/DFGNodeType.h
  29. +21 −2 Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
  30. +4 −0 Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.cpp
  31. +4 −0 Source/JavaScriptCore/dfg/DFGPromotedHeapLocation.cpp
  32. +2 −1 Source/JavaScriptCore/dfg/DFGPromotedHeapLocation.h
  33. +1 −0 Source/JavaScriptCore/dfg/DFGSafeToExecute.h
  34. +9 −0 Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
  35. +1 −0 Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
  36. +4 −0 Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
  37. +4 −0 Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
  38. +1 −0 Source/JavaScriptCore/ftl/FTLCapabilities.cpp
  39. +8 −0 Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
  40. +9 −1 Source/JavaScriptCore/ftl/FTLOperations.cpp
  41. +1 −1 Source/JavaScriptCore/interpreter/Interpreter.cpp
  42. +1 −0 Source/JavaScriptCore/jit/JIT.cpp
  43. +1 −0 Source/JavaScriptCore/jit/JIT.h
  44. +25 −1 Source/JavaScriptCore/jit/JITOpcodes.cpp
  45. +8 −0 Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
  46. +3 −2 Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
  47. +1 −1 Source/JavaScriptCore/llint/LowLevelInterpreter.asm
  48. +10 −0 Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm
  49. +10 −2 Source/JavaScriptCore/llint/LowLevelInterpreter64.asm
  50. +1 −2 Source/JavaScriptCore/parser/ASTBuilder.h
  51. +0 −1 Source/JavaScriptCore/parser/Nodes.h
  52. +2 −2 Source/JavaScriptCore/parser/Parser.cpp
  53. +11 −13 Source/JavaScriptCore/parser/ParserModes.h
  54. +8 −8 Source/JavaScriptCore/runtime/CodeCache.cpp
  55. +2 −2 Source/JavaScriptCore/runtime/CodeCache.h
  56. +0 −3 Source/JavaScriptCore/runtime/CommonIdentifiers.h
  57. +1 −1 Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
  58. +12 −12 Source/JavaScriptCore/runtime/Executable.cpp
  59. +6 −12 Source/JavaScriptCore/runtime/Executable.h
  60. +2 −2 Source/JavaScriptCore/runtime/JSGlobalObject.cpp
  61. +1 −1 Source/JavaScriptCore/runtime/JSGlobalObject.h
  62. +1 −1 Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
  63. +1 −1 Source/JavaScriptCore/tests/es6.yaml
  64. +1 −1 Source/JavaScriptCore/tests/stress/arrowfunction-activation-sink-osrexit.js
  65. +1 −1 Source/JavaScriptCore/tests/stress/arrowfunction-activation-sink.js
  66. +0 −78 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-newtarget.js
  67. +0 −67 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-supercall-1.js
  68. +0 −176 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-supercall-2.js
  69. +0 −52 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-supercall-3.js
  70. +0 −80 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-supercall-4.js
  71. +0 −2 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-this-1.js
  72. +0 −24 Source/JavaScriptCore/tests/stress/arrowfunction-lexical-bind-this-7.js
  73. +0 −31 Source/JavaScriptCore/tests/stress/arrowfunction-tdz-1.js
  74. +0 −32 Source/JavaScriptCore/tests/stress/arrowfunction-tdz-2.js
  75. +0 −177 Source/JavaScriptCore/tests/stress/arrowfunction-tdz-3.js
  76. +0 −46 Source/JavaScriptCore/tests/stress/arrowfunction-tdz-4.js
  77. +27 −0 Source/JavaScriptCore/tests/stress/arrowfunction-tdz.js
@@ -1,3 +1,16 @@
2015-12-01 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed, rolling out r192876.

It broke a lot of JSC and layout tests for GTK and EFL

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/192876

2015-12-01 Youenn Fablet <youenn.fablet@crf.canon.fr>

[Streams API] pull function of tee should call readFromReadableStreamReader directly

This file was deleted.

This file was deleted.

@@ -4,14 +4,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE


PASS isReferenceError is true
PASS isReferenceError is true
PASS d.id is 'a'
PASS e.id is 'a'
PASS f.id is 'a'
PASS isReferenceError is true
PASS g.id is 'a'
PASS h.id is 'a'
PASS i.id is 'a'
PASS successfullyParsed is true

TEST COMPLETE

This file was deleted.

@@ -1,20 +1,13 @@
description('Tests for ES6 arrow function test tdz');

var A = class A {
constructor() {
this.id = 'a';
}
};

var A = class A { };
var B = class B extends A {
constructor(accessThisBeforeSuper) {
var f = () => this;
if (accessThisBeforeSuper) {
f();
var f = () => this;
super();
} else {
super();
f();
}
}
};
@@ -28,65 +21,6 @@ try {

shouldBe('isReferenceError', 'true');

var a = new B(false);

var D = class D extends A {
constructor(accessThisBeforeSuper, returnThis) {
var f = () => returnThis ? this : {};
if (accessThisBeforeSuper) {
let val = f();
super();
} else {
super();
let val = f();
}
}
};

isReferenceError = false;
try {
new D(true, true);
} catch (e) {
isReferenceError = e instanceof ReferenceError;
}

shouldBe('isReferenceError', 'true');

var d = new D(false, true);
shouldBe('d.id', "'a'");
var e = new D(false, false);
shouldBe('e.id', "'a'");
var f = new D(true, false);
shouldBe('f.id', "'a'");

var G = class G extends A {
constructor(accessThisBeforeSuper, returnThis) {
var f = () => returnThis ? (() => this ) : (()=>{});
let af = f();
if (accessThisBeforeSuper) {
let result = af();
super();
} else {
super();
let result = af();
}
}
};

try {
new G(true, true);
} catch (e) {
exception = e;
isReferenceError = e instanceof ReferenceError;
}

shouldBe('isReferenceError', 'true');

var g = new G(false, true);
shouldBe('g.id', "'a'");
var h = new G(false, false);
shouldBe('h.id', "'a'");
var i = new G(true, false);
shouldBe('i.id', "'a'");
var e = new B(false);

var successfullyParsed = true;
@@ -1,3 +1,16 @@
2015-12-01 Carlos Garcia Campos <cgarcia@igalia.com>

Unreviewed, rolling out r192876.

It broke a lot of JSC and layout tests for GTK and EFL

Reverted changeset:

"[ES6] "super" and "this" should be lexically bound inside an
arrow function and should live in a JSLexicalEnvironment"
https://bugs.webkit.org/show_bug.cgi?id=149338
http://trac.webkit.org/changeset/192876

2015-12-01 Aleksandr Skachkov <gskachkov@gmail.com>

[ES6] "super" and "this" should be lexically bound inside an arrow function and should live in a JSLexicalEnvironment
@@ -115,7 +115,7 @@ UnlinkedFunctionExecutable* createExecutableInternal(VM& vm, const SourceCode& s
}
metadata->overrideName(name);
VariableEnvironment dummyTDZVariables;
UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, kind, constructAbility, dummyTDZVariables, false, WTF::move(sourceOverride));
UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, metadata, kind, constructAbility, dummyTDZVariables, WTF::move(sourceOverride));
functionExecutable->setNameValue(vm, jsString(&vm, name.string()));
return functionExecutable;
}
@@ -90,7 +90,7 @@
{ "name" : "op_switch_string", "length" : 4 },
{ "name" : "op_new_func", "length" : 4 },
{ "name" : "op_new_func_exp", "length" : 4 },
{ "name" : "op_new_arrow_func_exp", "length" : 4 },
{ "name" : "op_new_arrow_func_exp", "length" : 5 },
{ "name" : "op_call", "length" : 9 },
{ "name" : "op_tail_call", "length" : 9 },
{ "name" : "op_call_eval", "length" : 9 },
@@ -127,6 +127,7 @@
{ "name" : "op_enumerator_structure_pname", "length" : 4 },
{ "name" : "op_enumerator_generic_pname", "length" : 4 },
{ "name" : "op_to_index_string", "length" : 3 },
{ "name" : "op_load_arrowfunction_this", "length" : 2 },
{ "name" : "op_assert", "length" : 3 },
{ "name" : "op_copy_rest", "length": 4 },
{ "name" : "op_get_rest_length", "length": 3 }
@@ -57,6 +57,7 @@ void computeUsesForBytecodeOffset(
return;
case op_assert:
case op_get_scope:
case op_load_arrowfunction_this:
case op_to_this:
case op_check_tdz:
case op_profile_will_call:
@@ -370,6 +371,7 @@ void computeDefsForBytecodeOffset(CodeBlock* codeBlock, unsigned bytecodeOffset,
case op_to_this:
case op_check_tdz:
case op_get_scope:
case op_load_arrowfunction_this:
case op_create_direct_arguments:
case op_create_scoped_arguments:
case op_create_out_of_band_arguments:
@@ -757,6 +757,11 @@ void CodeBlock::dumpBytecode(
printLocationOpAndRegisterOperand(out, exec, location, it, "get_scope", r0);
break;
}
case op_load_arrowfunction_this: {
int r0 = (++it)->u.operand;
printLocationOpAndRegisterOperand(out, exec, location, it, "load_arrowfunction_this", r0);
break;
}
case op_create_direct_arguments: {
int r0 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "create_direct_arguments");
@@ -1302,8 +1307,9 @@ void CodeBlock::dumpBytecode(
int r0 = (++it)->u.operand;
int r1 = (++it)->u.operand;
int f0 = (++it)->u.operand;
int r2 = (++it)->u.operand;
printLocationAndOp(out, exec, location, it, "op_new_arrow_func_exp");
out.printf("%s, %s, f%d", registerName(r0).data(), registerName(r1).data(), f0);
out.printf("%s, %s, f%d, %s", registerName(r0).data(), registerName(r1).data(), f0, registerName(r2).data());
break;
}
case op_new_func_exp: {

0 comments on commit fb082d9

Please sign in to comment.