|
Ensure correct boxing of values when calling functions on them
When a function is called with a value type as the receiver this is now boxed as an object.
This is a low-impact solution where the receiver is only boxed when required. For IC calls to the V8 builtins values are not boxed and as most of the functions on String.prototype, Number.prototype and Boolean.prototype are sitting there most IC calls on values will not need any boxing of the receiver.
For calls which are not IC calls but calls through the CallFunctionStub a flag is used to determine whether the receiver might be a value and only when that is the case will the receiver be boxed.
No changtes to Function.call and Function.apply - they already boxed values. According to the ES5 spec the receiver should not be boxed for these functions, but current browsers have not adopted that change yet.
BUG= 223
TEST=test/mjsunit/value-wrapper.js
TEST=test/mjsunit/regress/regress-crbug-3184.js
Committed: http://code.google.com/p/v8/source/detail?r=3617
Total comments: 12
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+547 lines, -268 lines) |
Patch |
|
M |
src/arm/codegen-arm.h
|
View
|
1
2
|
2 chunks |
+3 lines, -22 lines |
0 comments
|
Download
|
|
M |
src/arm/codegen-arm.cc
|
View
|
1
2
|
7 chunks |
+34 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/arm/fast-codegen-arm.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/arm/stub-cache-arm.cc
|
View
|
1
2
|
1 chunk |
+52 lines, -37 lines |
0 comments
|
Download
|
|
M |
src/codegen.h
|
View
|
1
2
3
|
1 chunk |
+58 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/debug.cc
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/globals.h
|
View
|
1
2
|
1 chunk |
+6 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ia32/codegen-ia32.h
|
View
|
1
2
|
3 chunks |
+4 lines, -35 lines |
0 comments
|
Download
|
|
M |
src/ia32/codegen-ia32.cc
|
View
|
1
2
|
8 chunks |
+34 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/ia32/fast-codegen-ia32.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/ia32/stub-cache-ia32.cc
|
View
|
1
2
|
1 chunk |
+52 lines, -37 lines |
0 comments
|
Download
|
|
M |
src/ic.h
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/ic.cc
|
View
|
1
2
|
2 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/x64/codegen-x64.h
|
View
|
1
2
|
2 chunks |
+3 lines, -41 lines |
0 comments
|
Download
|
|
M |
src/x64/codegen-x64.cc
|
View
|
1
2
|
8 chunks |
+33 lines, -6 lines |
0 comments
|
Download
|
|
M |
src/x64/fast-codegen-x64.cc
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/x64/stub-cache-x64.cc
|
View
|
1
2
|
1 chunk |
+49 lines, -34 lines |
0 comments
|
Download
|
|
D |
test/mjsunit/bugs/bug-223.js
|
View
|
1
2
|
1 chunk |
+0 lines, -39 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/regress/regress-crbug-3184.js
|
View
|
|
1 chunk |
+56 lines, -0 lines |
0 comments
|
Download
|
|
A |
test/mjsunit/value-wrapper.js
|
View
|
1
3
|
1 chunk |
+138 lines, -0 lines |
1 comment
|
Download
|
Total messages: 4 (0 generated)
|