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

Side by Side Diff: test/mjsunit/strict-mode-implicit-receiver.js

Issue 7086029: Fix a number of IC stubs to correctly set the call kind. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Load global object from rsi on x64. Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/bugs/bug-1412.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 outer_eval_conversion3(return_this, 'object'); 167 outer_eval_conversion3(return_this, 'object');
168 outer_eval_conversion3(strict_eval, 'undefined'); 168 outer_eval_conversion3(strict_eval, 'undefined');
169 outer_eval_conversion3(non_strict_eval, 'object'); 169 outer_eval_conversion3(non_strict_eval, 'object');
170 170
171 // TODO(ager): I'm not sure this is in accordance with the spec. At 171 // TODO(ager): I'm not sure this is in accordance with the spec. At
172 // the moment, any call to eval where eval is not bound in the global 172 // the moment, any call to eval where eval is not bound in the global
173 // context is treated as an indirect call to eval which means that the 173 // context is treated as an indirect call to eval which means that the
174 // global context is used and the global object is passed as the 174 // global context is used and the global object is passed as the
175 // receiver. 175 // receiver.
176 outer_eval_conversion3(eval, 'object'); 176 outer_eval_conversion3(eval, 'object');
177
178 function test_constant_function() {
179 var o = { f: function() { "use strict"; return this; } };
180 this.__proto__ = o;
181 for (var i = 0; i < 10; i++) assertEquals(void 0, f());
182 }
183 test_constant_function();
184
185 function test_field() {
186 var o = { };
187 o.f = function() {};
188 o.f = function() { "use strict"; return this; };
189 this.__proto__ = o;
190 for (var i = 0; i < 10; i++) assertEquals(void 0, f());
191 }
192 test_field();
OLDNEW
« no previous file with comments | « test/mjsunit/bugs/bug-1412.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698