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

Side by Side Diff: test/mjsunit/regress/regress-667061.js

Issue 8888006: Make more JS files beter match the coding standard. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/regress/regress-646.js ('k') | test/mjsunit/regress/regress-687.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 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 caught = true; 49 caught = true;
50 } 50 }
51 assertTrue(caught); 51 assertTrue(caught);
52 52
53 53
54 // Test monomorphic case. 54 // Test monomorphic case.
55 function g(o) { 55 function g(o) {
56 return o.x(); 56 return o.x();
57 } 57 }
58 58
59 function O(x) { this.x = x; }; 59 function O(x) { this.x = x; }
60 var o = new O(function() { return 1; }); 60 var o = new O(function() { return 1; });
61 assertEquals(1, g(o)); // go monomorphic 61 assertEquals(1, g(o)); // go monomorphic
62 assertEquals(1, g(o)); // stay monomorphic 62 assertEquals(1, g(o)); // stay monomorphic
63 63
64 var caught = false; 64 var caught = false;
65 try { 65 try {
66 g(new O(3)); 66 g(new O(3));
67 } catch (o) { 67 } catch (o) {
68 assertTrue(o instanceof TypeError); 68 assertTrue(o instanceof TypeError);
69 caught = true; 69 caught = true;
(...skipping 11 matching lines...) Expand all
81 assertEquals(3, f({ x: function () { return 3; }})); // stay megamorphic 81 assertEquals(3, f({ x: function () { return 3; }})); // stay megamorphic
82 82
83 var caught = false; 83 var caught = false;
84 try { 84 try {
85 f({ x: 4 }); 85 f({ x: 4 });
86 } catch (o) { 86 } catch (o) {
87 assertTrue(o instanceof TypeError); 87 assertTrue(o instanceof TypeError);
88 caught = true; 88 caught = true;
89 } 89 }
90 assertTrue(caught); 90 assertTrue(caught);
OLDNEW
« no previous file with comments | « test/mjsunit/regress/regress-646.js ('k') | test/mjsunit/regress/regress-687.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698