Thanks, Lasse. Made all changes. The fast path work is captured as an issue
1249.
The test you recommended - to check for prototype of the poison pill - revealed bug (no prototype on the poison pill function) which was trivial to fix - set the map of the poison pill function to the map with prototype. Since it was only
1 line change I am going proceeding to landing.

Thank you!
Martin


http://codereview.chromium.org/6691003/diff/1/src/arm/codegen-arm.cc
File src/arm/codegen-arm.cc (right):

http://codereview.chromium.org/6691003/diff/1/src/arm/codegen-arm.cc#newcode3118
src/arm/codegen-arm.cc:3118: !function_info->strict_mode()) {  // Strict
mode functions use slow path.
On 2011/03/14 12:20:15, Lasse Reichstein wrote:
We'll need a fast path for strict mode functions too, eventually.

Yep. Opening an issue on this.
http://code.google.com/p/v8/issues/detail?id=1249

http://codereview.chromium.org/6691003/diff/1/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/6691003/diff/1/src/objects.cc#newcode5549
src/objects.cc:5549: map() ==
context()->global_context()->function_map_strict()) ||
On 2011/03/14 12:20:15, Lasse Reichstein wrote:
Try splitting it into two asserts:
  ASSERT(!shared()->strict_mode() || map ==
....->function_map_strict());
  ASSERT(shared()->strict_mode() || map == ....->function_map());
It's easier to see which one fails, if it does.

(Why isn't logical implication an operator :)


Done.

http://codereview.chromium.org/6691003/diff/1/test/mjsunit/strict-mode.js
File test/mjsunit/strict-mode.js (right):

http://codereview.chromium.org/6691003/diff/1/test/mjsunit/strict-mode.js#newcode991
test/mjsunit/strict-mode.js:991:
On 2011/03/14 12:20:15, Lasse Reichstein wrote:
How about an inherited strictness:
   var athird = (function() { "use strict"; return function(){};})();
or do we consider it well tested that this generates a strict
function?

Done.

http://codereview.chromium.org/6691003/diff/1/test/mjsunit/strict-mode.js#newcode996
test/mjsunit/strict-mode.js:996: assertThrows(pill, TypeError);
On 2011/03/14 12:20:15, Lasse Reichstein wrote:
Should you check whether it has a .prototype property?

Good suggestion. Turns out there was a bug here. After I create the
JSFunction for poison pill I need to set its map to the strict map with
prototype. Made that 1 line change.

http://codereview.chromium.org/6691003/diff/1/test/mjsunit/strict-mode.js#newcode1004
test/mjsunit/strict-mode.js:1004: assertEquals(false,
descriptor.configurable);
On 2011/03/14 12:20:15, Lasse Reichstein wrote:
I think we have an assertFalse function.

Done.

http://codereview.chromium.org/6691003/

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to