Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: test/mjsunit/strong/functions.js

Issue 1199983002: [strong] Implement strong property access semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add TODOs Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/strong/load-builtins.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --strong-mode 5 // Flags: --strong-mode
6 6
7 'use strong'; 7 'use strong';
8 8
9 function f() {} 9 function f() {}
10 function* g() {} 10 function* g() {}
(...skipping 29 matching lines...) Expand all
40 (function NoCallee() { 40 (function NoCallee() {
41 assertFalse("callee" in f); 41 assertFalse("callee" in f);
42 assertFalse("callee" in g); 42 assertFalse("callee" in g);
43 assertThrows(function(){ f.callee = 0 }, TypeError); 43 assertThrows(function(){ f.callee = 0 }, TypeError);
44 assertThrows(function(){ g.callee = 0 }, TypeError); 44 assertThrows(function(){ g.callee = 0 }, TypeError);
45 })(); 45 })();
46 46
47 (function LexicalBindings(global) { 47 (function LexicalBindings(global) {
48 assertEquals('function', typeof f); 48 assertEquals('function', typeof f);
49 assertEquals('function', typeof g); 49 assertEquals('function', typeof g);
50 assertEquals(undefined, global.f); 50 assertFalse(global.hasOwnProperty("f"));
51 assertEquals(undefined, global.g); 51 assertFalse(global.hasOwnProperty("g"));
52 })(this); 52 })(this);
53 53
54 (function ImmutableBindings() { 54 (function ImmutableBindings() {
55 function f2() {} 55 function f2() {}
56 function* g2() {} 56 function* g2() {}
57 assertThrows(function(){ f = 0 }, TypeError); 57 assertThrows(function(){ f = 0 }, TypeError);
58 assertThrows(function(){ g = 0 }, TypeError); 58 assertThrows(function(){ g = 0 }, TypeError);
59 assertThrows(function(){ f2 = 0 }, TypeError); 59 assertThrows(function(){ f2 = 0 }, TypeError);
60 assertThrows(function(){ g2 = 0 }, TypeError); 60 assertThrows(function(){ g2 = 0 }, TypeError);
61 assertEquals('function', typeof f); 61 assertEquals('function', typeof f);
(...skipping 16 matching lines...) Expand all
78 assertFalse(g.hasOwnProperty("prototype")); 78 assertFalse(g.hasOwnProperty("prototype"));
79 assertThrows(function(){ f.prototype = 0 }, TypeError); 79 assertThrows(function(){ f.prototype = 0 }, TypeError);
80 assertThrows(function(){ g.prototype = 0 }, TypeError); 80 assertThrows(function(){ g.prototype = 0 }, TypeError);
81 assertThrows(function(){ f.prototype.a = 0 }, TypeError); 81 assertThrows(function(){ f.prototype.a = 0 }, TypeError);
82 })(); 82 })();
83 83
84 (function NonConstructor() { 84 (function NonConstructor() {
85 assertThrows(function(){ new f }, TypeError); 85 assertThrows(function(){ new f }, TypeError);
86 assertThrows(function(){ new g }, TypeError); 86 assertThrows(function(){ new g }, TypeError);
87 })(); 87 })();
OLDNEW
« no previous file with comments | « src/x87/lithium-codegen-x87.cc ('k') | test/mjsunit/strong/load-builtins.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698