OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
583 | 583 |
584 if (callee->IsJSFunction()) { | 584 if (callee->IsJSFunction()) { |
585 Handle<JSFunction> function = Handle<JSFunction>::cast(callee); | 585 Handle<JSFunction> function = Handle<JSFunction>::cast(callee); |
586 if (!function->shared()->is_classic_mode() || function->IsBuiltin()) { | 586 if (!function->shared()->is_classic_mode() || function->IsBuiltin()) { |
587 // Do not wrap receiver for strict mode functions or for builtins. | 587 // Do not wrap receiver for strict mode functions or for builtins. |
588 return; | 588 return; |
589 } | 589 } |
590 } | 590 } |
591 | 591 |
592 // And only wrap string, number or boolean. | 592 // And only wrap string, number or boolean. |
593 if (object->IsString() || object->IsNumber() || object->IsBoolean()) { | 593 if (object->IsString() || object->IsNumber() || object->IsBoolean() || |
| 594 object->IsFloat32x4() || object->IsInt32x4()) { |
594 // Change the receiver to the result of calling ToObject on it. | 595 // Change the receiver to the result of calling ToObject on it. |
595 const int argc = this->target()->arguments_count(); | 596 const int argc = this->target()->arguments_count(); |
596 StackFrameLocator locator(isolate()); | 597 StackFrameLocator locator(isolate()); |
597 JavaScriptFrame* frame = locator.FindJavaScriptFrame(0); | 598 JavaScriptFrame* frame = locator.FindJavaScriptFrame(0); |
598 int index = frame->ComputeExpressionsCount() - (argc + 1); | 599 int index = frame->ComputeExpressionsCount() - (argc + 1); |
599 frame->SetExpression(index, *isolate()->factory()->ToObject(object)); | 600 frame->SetExpression(index, *isolate()->factory()->ToObject(object)); |
600 } | 601 } |
601 } | 602 } |
602 | 603 |
603 | 604 |
(...skipping 2174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 #undef ADDR | 2779 #undef ADDR |
2779 }; | 2780 }; |
2780 | 2781 |
2781 | 2782 |
2782 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2783 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2783 return IC_utilities[id]; | 2784 return IC_utilities[id]; |
2784 } | 2785 } |
2785 | 2786 |
2786 | 2787 |
2787 } } // namespace v8::internal | 2788 } } // namespace v8::internal |
OLD | NEW |