Changeset 207326 in webkit
- Timestamp:
- Oct 13, 2016 11:31:40 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChakraCore/test/Error/CallNonFunction_3.baseline-jsc
r205387 r207326 13 13 TypeError (undefined): 1 is not a constructor (evaluating 'new obj[1]()') 14 14 TypeError (undefined): null is not an object (evaluating 'n[1]') 15 TypeError (undefined): null is not an object (evaluating 'n ')15 TypeError (undefined): null is not an object (evaluating 'new n[1]') 16 16 TypeError (undefined): null is not an object (evaluating 'n.prop') 17 17 TypeError (undefined): null is not an object (evaluating 'new n.prop') -
trunk/JSTests/ChakraCore/test/Object/null.baseline-jsc
r205387 r207326 2 2 1 null is not an object (evaluating 'x.y = 5') 3 3 2 null is not an object (evaluating 'delete x.y') 4 3 null is not an object (evaluating 'x ')4 3 null is not an object (evaluating 'x[6]') 5 5 4 null is not an object (evaluating 'x[6] = 7') 6 6 5 null is not an object (evaluating 'delete x[6]') … … 8 8 7 undefined is not an object (evaluating 'x.y = 5') 9 9 8 undefined is not an object (evaluating 'delete x.y') 10 9 undefined is not an object (evaluating 'x ')10 9 undefined is not an object (evaluating 'x[6]') 11 11 10 undefined is not an object (evaluating 'x[6] = 7') 12 12 11 undefined is not an object (evaluating 'delete x[6]') … … 14 14 13 null is not an object (evaluating 'a[0].y = 5') 15 15 14 null is not an object (evaluating 'delete a[0].y') 16 15 null is not an object (evaluating 'a[0] ')16 15 null is not an object (evaluating 'a[0][6]') 17 17 16 null is not an object (evaluating 'a[0][6] = 7') 18 18 17 null is not an object (evaluating 'delete a[0][6]') … … 20 20 19 undefined is not an object (evaluating 'a[0].y = 5') 21 21 20 undefined is not an object (evaluating 'delete a[0].y') 22 21 undefined is not an object (evaluating 'a[0] ')22 21 undefined is not an object (evaluating 'a[0][6]') 23 23 22 undefined is not an object (evaluating 'a[0][6] = 7') 24 24 23 undefined is not an object (evaluating 'delete a[0][6]') … … 26 26 25 null is not an object (evaluating 'o.z.y = 5') 27 27 26 null is not an object (evaluating 'delete o.z.y') 28 27 null is not an object (evaluating 'o.z ')28 27 null is not an object (evaluating 'o.z[6]') 29 29 28 null is not an object (evaluating 'o.z[6] = 7') 30 30 29 null is not an object (evaluating 'delete o.z[6]') … … 32 32 31 undefined is not an object (evaluating 'o.z.y = 5') 33 33 32 undefined is not an object (evaluating 'delete o.z.y') 34 33 undefined is not an object (evaluating 'o.z ')34 33 undefined is not an object (evaluating 'o.z[6]') 35 35 34 undefined is not an object (evaluating 'o.z[6] = 7') 36 36 35 undefined is not an object (evaluating 'delete o.z[6]') -
trunk/JSTests/ChangeLog
r207322 r207326 1 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Exception message for expressions with multiple bracket accesses is inconsistent / incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=163426 5 6 Reviewed by Geoffrey Garen. 7 8 * ChakraCore/test/Error/CallNonFunction_3.baseline-jsc: 9 * ChakraCore/test/Object/null.baseline-jsc: 10 * stress/exception-in-to-property-key-should-be-handled-early.js: 11 Better exception messages. 12 1 13 2016-10-13 Mark Lam <mark.lam@apple.com> 2 14 -
trunk/JSTests/stress/exception-in-to-property-key-should-be-handled-early.js
r182057 r207326 134 134 throw new Error(called); 135 135 toStringCalled = false; 136 shouldThrow(function () { test(null, 20, propertyKey); }, "TypeError: null is not an object ( near '...for (var i = 0; i < length; ++i)...')");136 shouldThrow(function () { test(null, 20, propertyKey); }, "TypeError: null is not an object (evaluating 'array[property]')"); 137 137 if (toStringCalled) 138 138 throw new Error("toString is called."); -
trunk/LayoutTests/ChangeLog
r207321 r207326 1 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Exception message for expressions with multiple bracket accesses is inconsistent / incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=163426 5 6 Reviewed by Geoffrey Garen. 7 8 * js/exception-expression-offset-expected.txt: 9 * js/script-tests/exception-expression-offset.js: 10 (testException): 11 Correct existing tests and add new tests for multiple and intermixed 12 dot / bracket accesses. 13 1 14 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 15 -
trunk/LayoutTests/imported/w3c/ChangeLog
r207321 r207326 1 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Exception message for expressions with multiple bracket accesses is inconsistent / incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=163426 5 6 Reviewed by Geoffrey Garen. 7 8 * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt: 9 * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt: 10 * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt: 11 * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt: 12 * web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt: 13 Better expection messages. 14 1 15 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt
r205750 r207326 1 1 2 2 PASS TextTrackCue.endTime, script-created cue 3 FAIL TextTrackCue.endTime, parsed cue null is not an object (evaluating ' assert_equals')3 FAIL TextTrackCue.endTime, parsed cue null is not an object (evaluating 'c[0]') 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt
r205750 r207326 1 1 2 2 PASS TextTrackCue.id, script-created cue 3 FAIL TextTrackCue.id, parsed cue null is not an object (evaluating ' assert_equals')3 FAIL TextTrackCue.id, parsed cue null is not an object (evaluating 'c[0]') 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt
r205750 r207326 1 1 2 2 PASS TextTrackCue.pauseOnExit, script-created cue 3 FAIL TextTrackCue.pauseOnExit, parsed cue null is not an object (evaluating 't.track.cues ')3 FAIL TextTrackCue.pauseOnExit, parsed cue null is not an object (evaluating 't.track.cues[0]') 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt
r205750 r207326 1 1 2 2 PASS TextTrackCue.startTime, script-created cue 3 FAIL TextTrackCue.startTime, parsed cue null is not an object (evaluating ' assert_equals')3 FAIL TextTrackCue.startTime, parsed cue null is not an object (evaluating 'c[0]') 4 4 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt
r205750 r207326 1 1 2 2 PASS TextTrackCue.track, script-created cue 3 FAIL TextTrackCue.track, parsed cue null is not an object (evaluating 't.track.cues ')3 FAIL TextTrackCue.track, parsed cue null is not an object (evaluating 't.track.cues[0]') 4 4 -
trunk/LayoutTests/js/exception-expression-offset-expected.txt
r152871 r207326 6 6 7 7 Testing 'undefined.a++' 8 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.a')" should be true. Was false. 8 PASS ex.message is "undefined is not an object (evaluating 'undefined.a')" 9 9 10 10 Testing '++undefined.a' 11 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.a')" should be true. Was false. 11 PASS ex.message is "undefined is not an object (evaluating 'undefined.a')" 12 12 13 13 Testing 'undefined[0]++' 14 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0]')" should be true. Was false. 14 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 15 15 16 16 Testing '++undefined[1]' 17 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[1]')" should be true. Was false. 17 PASS ex.message is "undefined is not an object (evaluating 'undefined[1]')" 18 18 19 19 Testing 'undefined.b' 20 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.b')" should be true. Was false. 20 PASS ex.message is "undefined is not an object (evaluating 'undefined.b')" 21 21 22 22 Testing 'undefined[0]' 23 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0]')" should be true. Was false. 23 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 24 24 25 25 Testing 'undefined.b += 1' 26 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.b')" should be true. Was false. 26 PASS ex.message is "undefined is not an object (evaluating 'undefined.b')" 27 27 28 28 Testing 'undefined[0] += 1' 29 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0]')" should be true. Was false. 29 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 30 30 31 31 Testing 'undefined()' 32 FAIL ex.message == "'undefined' is not a function (evaluating 'undefined()')" should be true. Was false. 32 PASS ex.message is "undefined is not a function. (In 'undefined()', 'undefined' is undefined)" 33 33 34 34 Testing 'new undefined()' 35 FAIL ex.message == "'undefined' is not a constructor (evaluating 'new undefined()')" should be true. Was false. 35 PASS ex.message is "undefined is not a constructor (evaluating 'new undefined()')" 36 36 37 37 Testing '({}).b()' 38 FAIL ex.message == "'undefined' is not a function (evaluating '({}).b()')" should be true. Was false. 38 PASS ex.message is "({}).b is not a function. (In '({}).b()', '({}).b' is undefined)" 39 39 40 40 Testing 'new {}.b()' 41 FAIL ex.message == "'undefined' is not a constructor (evaluating 'new {}.b()')" should be true. Was false. 41 PASS ex.message is "undefined is not a constructor (evaluating 'new {}.b()')" 42 42 43 43 Testing '1()' 44 FAIL ex.message == "'1' is not a function (evaluating '1()')" should be true. Was false. 44 PASS ex.message is "1 is not a function. (In '1()', '1' is 1)" 45 45 46 46 Testing 'new 1()' 47 FAIL ex.message == "'1' is not a constructor (evaluating 'new 1()')" should be true. Was false. 47 PASS ex.message is "1 is not a constructor (evaluating 'new 1()')" 48 48 49 49 Testing 'throw { message : 'thrown object' }' 50 PASS ex.message == "thrown object" is true50 PASS ex.message is "thrown object" 51 51 52 52 Testing '1 in undefined' 53 FAIL ex.message == "'undefined' is not a valid argument for 'in' (evaluating '1 in undefined')" should be true. Was false. 53 PASS ex.message is "undefined is not an Object. (evaluating '1 in undefined')" 54 54 55 55 Testing '1 instanceof undefined' 56 FAIL ex.message == "'undefined' is not a valid argument for 'instanceof' (evaluating '1 instanceof undefined')" should be true. Was false. 56 PASS ex.message is "Right hand side of instanceof is not an object" 57 57 58 58 Testing 'for (undefined.b in [1]) {}' 59 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.b')" should be true. Was false. 59 PASS ex.message is "undefined is not an object (evaluating 'undefined.b')" 60 60 61 61 Testing 'for (undefined[0] in [1]) {}' 62 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0]')" should be true. Was false. 62 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 63 63 64 64 Testing 'undefined.a = 5' 65 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.a = 5')" should be true. Was false. 65 PASS ex.message is "undefined is not an object (evaluating 'undefined.a = 5')" 66 66 67 67 Testing 'undefined[0] = 5' 68 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0] = 5')" should be true. Was false. 68 PASS ex.message is "undefined is not an object (evaluating 'undefined[0] = 5')" 69 69 70 70 Testing '({b:undefined}).b.a = 5' 71 FAIL ex.message == "'undefined' is not an object (evaluating '({b:undefined}).b.a = 5')" should be true. Was false. 71 PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b.a = 5')" 72 72 73 73 Testing '({b:undefined}).b[0] = 5' 74 FAIL ex.message == "'undefined' is not an object (evaluating '({b:undefined}).b[0] = 5')" should be true. Was false. 74 PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b[0] = 5')" 75 75 76 76 Testing 'undefined.a += 5' 77 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined.a')" should be true. Was false. 77 PASS ex.message is "undefined is not an object (evaluating 'undefined.a')" 78 78 79 79 Testing 'undefined[0] += 5' 80 FAIL ex.message == "'undefined' is not an object (evaluating 'undefined[0]')" should be true. Was false. 80 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 81 81 82 82 Testing '({b:undefined}).b.a += 5' 83 FAIL ex.message == "'undefined' is not an object (evaluating '({b:undefined}).b.a')" should be true. Was false. 83 PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b.a')" 84 84 85 85 Testing '({b:undefined}).b[0] += 5' 86 FAIL ex.message == "'undefined' is not an object (evaluating '({b:undefined}).b[0]')" should be true. Was false. 86 PASS ex.message is "undefined is not an object (evaluating '({b:undefined}).b[0]')" 87 88 Testing '[].a.b.x' 89 PASS ex.message is "undefined is not an object (evaluating '[].a.b')" 90 91 Testing '[]['a']['b'].x' 92 PASS ex.message is "undefined is not an object (evaluating '[]['a']['b']')" 93 94 Testing '[].a['b'].x' 95 PASS ex.message is "undefined is not an object (evaluating '[].a['b']')" 96 97 Testing '[]['a'].b.x' 98 PASS ex.message is "undefined is not an object (evaluating '[]['a'].b')" 99 100 Testing 'func(undefined.x)' 101 PASS ex.message is "undefined is not an object (evaluating 'undefined.x')" 102 103 Testing 'func(null.x)' 104 PASS ex.message is "null is not an object (evaluating 'null.x')" 105 106 Testing 'func(undefined[0])' 107 PASS ex.message is "undefined is not an object (evaluating 'undefined[0]')" 108 109 Testing 'func(null[0])' 110 PASS ex.message is "null is not an object (evaluating 'null[0]')" 87 111 PASS successfullyParsed is true 88 112 -
trunk/LayoutTests/js/script-tests/exception-expression-offset.js
r98407 r207326 10 10 ex = e; 11 11 // begin/caret/end are not presently exposed in a web facing interface, so cannot be directly checked. 12 shouldBe True('ex.message == "' + message +'"');12 shouldBeEqualToString("ex.message", message); 13 13 } 14 14 } 15 15 16 testException("undefined.a++", 0, 9, 11, "'undefined' is not an object (evaluating 'undefined.a')"); 17 testException("++undefined.a", 2, 11, 13, "'undefined' is not an object (evaluating 'undefined.a')"); 18 testException("undefined[0]++", 0, 9, 12, "'undefined' is not an object (evaluating 'undefined[0]')"); 19 testException("++undefined[1]", 2, 11, 14, "'undefined' is not an object (evaluating 'undefined[1]')"); 20 testException("undefined.b", 0, 9, 11, "'undefined' is not an object (evaluating 'undefined.b')"); 21 testException("undefined[0]", 0, 9, 12, "'undefined' is not an object (evaluating 'undefined[0]')"); 22 testException("undefined.b += 1", 0, 9, 11, "'undefined' is not an object (evaluating 'undefined.b')"); 23 testException("undefined[0] += 1", 0, 9, 12, "'undefined' is not an object (evaluating 'undefined[0]')"); 24 testException("undefined()", 0, 9, 11, "'undefined' is not a function (evaluating 'undefined()')"); 25 testException("new undefined()", 0, 13, 15, "'undefined' is not a constructor (evaluating 'new undefined()')"); 26 testException("({}).b()", 0, 6, 8, "'undefined' is not a function (evaluating '({}).b()')"); 27 testException("new {}.b()", 0, 8, 10, "'undefined' is not a constructor (evaluating 'new {}.b()')"); 28 testException("1()", 0, 1, 3, "'1' is not a function (evaluating '1()')"); 29 testException("new 1()", 0, 5, 7, "'1' is not a constructor (evaluating 'new 1()')"); 16 function func() {} 17 18 testException("undefined.a++", 0, 9, 11, "undefined is not an object (evaluating 'undefined.a')"); 19 testException("++undefined.a", 2, 11, 13, "undefined is not an object (evaluating 'undefined.a')"); 20 testException("undefined[0]++", 0, 9, 12, "undefined is not an object (evaluating 'undefined[0]')"); 21 testException("++undefined[1]", 2, 11, 14, "undefined is not an object (evaluating 'undefined[1]')"); 22 testException("undefined.b", 0, 9, 11, "undefined is not an object (evaluating 'undefined.b')"); 23 testException("undefined[0]", 0, 9, 12, "undefined is not an object (evaluating 'undefined[0]')"); 24 testException("undefined.b += 1", 0, 9, 11, "undefined is not an object (evaluating 'undefined.b')"); 25 testException("undefined[0] += 1", 0, 9, 12, "undefined is not an object (evaluating 'undefined[0]')"); 26 testException("undefined()", 0, 9, 11, "undefined is not a function. (In 'undefined()', 'undefined' is undefined)"); 27 testException("new undefined()", 0, 13, 15, "undefined is not a constructor (evaluating 'new undefined()')"); 28 testException("({}).b()", 0, 6, 8, "({}).b is not a function. (In '({}).b()', '({}).b' is undefined)"); 29 testException("new {}.b()", 0, 8, 10, "undefined is not a constructor (evaluating 'new {}.b()')"); 30 testException("1()", 0, 1, 3, "1 is not a function. (In '1()', '1' is 1)"); 31 testException("new 1()", 0, 5, 7, "1 is not a constructor (evaluating 'new 1()')"); 30 32 testException("throw { message : 'thrown object' }", 0, undefined, 35, "thrown object"); 31 testException("1 in undefined", 0, 5, 14, "'undefined' is not a valid argument for 'in' (evaluating '1 in undefined')"); 32 testException("1 instanceof undefined", 0, 13, 22, "'undefined' is not a valid argument for 'instanceof' (evaluating '1 instanceof undefined')"); 33 testException("for (undefined.b in [1]) {}", 5, 14, 16, "'undefined' is not an object (evaluating 'undefined.b')"); 34 testException("for (undefined[0] in [1]) {}", 5, 14, 17, "'undefined' is not an object (evaluating 'undefined[0]')"); 35 testException("undefined.a = 5", 0, 9, 15, "'undefined' is not an object (evaluating 'undefined.a = 5')"); 36 testException("undefined[0] = 5", 0, 9, 16, "'undefined' is not an object (evaluating 'undefined[0] = 5')"); 37 testException("({b:undefined}).b.a = 5", 0, 17, 23, "'undefined' is not an object (evaluating '({b:undefined}).b.a = 5')"); 38 testException("({b:undefined}).b[0] = 5", 0, 17, 24, "'undefined' is not an object (evaluating '({b:undefined}).b[0] = 5')"); 39 testException("undefined.a += 5", 0, 9, 11, "'undefined' is not an object (evaluating 'undefined.a')"); 40 testException("undefined[0] += 5", 0, 9, 12, "'undefined' is not an object (evaluating 'undefined[0]')"); 41 testException("({b:undefined}).b.a += 5", 0, 17, 19, "'undefined' is not an object (evaluating '({b:undefined}).b.a')"); 42 testException("({b:undefined}).b[0] += 5", 0, 17, 20, "'undefined' is not an object (evaluating '({b:undefined}).b[0]')"); 33 testException("1 in undefined", 0, 5, 14, "undefined is not an Object. (evaluating '1 in undefined')"); 34 testException("1 instanceof undefined", 0, 13, 22, "Right hand side of instanceof is not an object"); 35 testException("for (undefined.b in [1]) {}", 5, 14, 16, "undefined is not an object (evaluating 'undefined.b')"); 36 testException("for (undefined[0] in [1]) {}", 5, 14, 17, "undefined is not an object (evaluating 'undefined[0]')"); 37 testException("undefined.a = 5", 0, 9, 15, "undefined is not an object (evaluating 'undefined.a = 5')"); 38 testException("undefined[0] = 5", 0, 9, 16, "undefined is not an object (evaluating 'undefined[0] = 5')"); 39 testException("({b:undefined}).b.a = 5", 0, 17, 23, "undefined is not an object (evaluating '({b:undefined}).b.a = 5')"); 40 testException("({b:undefined}).b[0] = 5", 0, 17, 24, "undefined is not an object (evaluating '({b:undefined}).b[0] = 5')"); 41 testException("undefined.a += 5", 0, 9, 11, "undefined is not an object (evaluating 'undefined.a')"); 42 testException("undefined[0] += 5", 0, 9, 12, "undefined is not an object (evaluating 'undefined[0]')"); 43 testException("({b:undefined}).b.a += 5", 0, 17, 19, "undefined is not an object (evaluating '({b:undefined}).b.a')"); 44 testException("({b:undefined}).b[0] += 5", 0, 17, 20, "undefined is not an object (evaluating '({b:undefined}).b[0]')"); 45 46 testException("[].a.b.x", 0, 4, 5, "undefined is not an object (evaluating '[].a.b')"); 47 testException("[]['a']['b'].x", 0, 7, 11, "undefined is not an object (evaluating '[]['a']['b']')"); 48 testException("[].a['b'].x", 0, 4, 8, "undefined is not an object (evaluating '[].a['b']')"); 49 testException("[]['a'].b.x", 0, 7, 8, "undefined is not an object (evaluating '[]['a'].b')"); 50 51 testException("func(undefined.x)", 5, 14, 15, "undefined is not an object (evaluating 'undefined.x')"); 52 testException("func(null.x)", 5, 9, 10, "null is not an object (evaluating 'null.x')"); 53 testException("func(undefined[0])", 5, 14, 16, "undefined is not an object (evaluating 'undefined[0]')"); 54 testException("func(null[0])", 5, 9, 11, "null is not an object (evaluating 'null[0]')"); -
trunk/Source/JavaScriptCore/ChangeLog
r207322 r207326 1 2016-10-13 Joseph Pecoraro <pecoraro@apple.com> 2 3 Exception message for expressions with multiple bracket accesses is inconsistent / incorrect 4 https://bugs.webkit.org/show_bug.cgi?id=163426 5 6 Reviewed by Geoffrey Garen. 7 8 * bytecompiler/NodesCodegen.cpp: 9 (JSC::BracketAccessorNode::emitBytecode): 10 It matters where emitExpressionInfo is called since it gathers 11 info about where we are in the instruction stream. We need to 12 emit it before the bytecode that we want to associate the data 13 with. In this case, before the getById / getByVal. 14 1 15 2016-10-13 Mark Lam <mark.lam@apple.com> 2 16 -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r207228 r207326 634 634 RefPtr<RegisterID> thisValue = generator.ensureThis(); 635 635 RefPtr<RegisterID> superBase = emitSuperBaseForCallee(generator); 636 636 637 if (isNonIndexStringElement(*m_subscript)) { 637 638 const Identifier& id = static_cast<StringNode*>(m_subscript)->value(); 639 generator.emitExpressionInfo(divot(), divotStart(), divotEnd()); 638 640 generator.emitGetById(finalDest.get(), superBase.get(), thisValue.get(), id); 639 641 } else { 640 642 RefPtr<RegisterID> subscript = generator.emitNode(m_subscript); 643 generator.emitExpressionInfo(divot(), divotStart(), divotEnd()); 641 644 generator.emitGetByVal(finalDest.get(), superBase.get(), thisValue.get(), subscript.get()); 642 645 } 643 646 644 generator.emitExpressionInfo(divot(), divotStart(), divotEnd());645 647 generator.emitProfileType(finalDest.get(), divotStart(), divotEnd()); 646 648 return finalDest.get(); … … 652 654 if (isNonIndexStringElement(*m_subscript)) { 653 655 RefPtr<RegisterID> base = generator.emitNode(m_base); 656 generator.emitExpressionInfo(divot(), divotStart(), divotEnd()); 654 657 ret = generator.emitGetById(finalDest.get(), base.get(), static_cast<StringNode*>(m_subscript)->value()); 655 658 } else { 656 659 RefPtr<RegisterID> base = generator.emitNodeForLeftHandSide(m_base, m_subscriptHasAssignments, m_subscript->isPure(generator)); 657 660 RegisterID* property = generator.emitNode(m_subscript); 661 generator.emitExpressionInfo(divot(), divotStart(), divotEnd()); 658 662 ret = generator.emitGetByVal(finalDest.get(), base.get(), property); 659 663 } 660 661 generator.emitExpressionInfo(divot(), divotStart(), divotEnd());662 664 663 665 generator.emitProfileType(finalDest.get(), divotStart(), divotEnd());
Note: See TracChangeset
for help on using the changeset viewer.