| OLD | NEW |
| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 | 428 |
| 429 | 429 |
| 430 void CallICBase::ReceiverToObjectIfRequired(Handle<Object> callee, | 430 void CallICBase::ReceiverToObjectIfRequired(Handle<Object> callee, |
| 431 Handle<Object> object) { | 431 Handle<Object> object) { |
| 432 while (callee->IsJSFunctionProxy()) { | 432 while (callee->IsJSFunctionProxy()) { |
| 433 callee = Handle<Object>(JSFunctionProxy::cast(*callee)->call_trap()); | 433 callee = Handle<Object>(JSFunctionProxy::cast(*callee)->call_trap()); |
| 434 } | 434 } |
| 435 | 435 |
| 436 if (callee->IsJSFunction()) { | 436 if (callee->IsJSFunction()) { |
| 437 Handle<JSFunction> function = Handle<JSFunction>::cast(callee); | 437 Handle<JSFunction> function = Handle<JSFunction>::cast(callee); |
| 438 if (function->shared()->strict_mode() || function->IsBuiltin()) { | 438 if (!function->shared()->is_classic_mode() || function->IsBuiltin()) { |
| 439 // Do not wrap receiver for strict mode functions or for builtins. | 439 // Do not wrap receiver for strict mode functions or for builtins. |
| 440 return; | 440 return; |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 | 443 |
| 444 // And only wrap string, number or boolean. | 444 // And only wrap string, number or boolean. |
| 445 if (object->IsString() || object->IsNumber() || object->IsBoolean()) { | 445 if (object->IsString() || object->IsNumber() || object->IsBoolean()) { |
| 446 // Change the receiver to the result of calling ToObject on it. | 446 // Change the receiver to the result of calling ToObject on it. |
| 447 const int argc = this->target()->arguments_count(); | 447 const int argc = this->target()->arguments_count(); |
| 448 StackFrameLocator locator; | 448 StackFrameLocator locator; |
| (...skipping 1939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2388 #undef ADDR | 2388 #undef ADDR |
| 2389 }; | 2389 }; |
| 2390 | 2390 |
| 2391 | 2391 |
| 2392 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2392 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 2393 return IC_utilities[id]; | 2393 return IC_utilities[id]; |
| 2394 } | 2394 } |
| 2395 | 2395 |
| 2396 | 2396 |
| 2397 } } // namespace v8::internal | 2397 } } // namespace v8::internal |
| OLD | NEW |