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

Side by Side Diff: src/ic.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased version. Created 9 years, 1 month 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
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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_strict_or_extended_mode() ||
439 function->IsBuiltin()) {
439 // Do not wrap receiver for strict mode functions or for builtins. 440 // Do not wrap receiver for strict mode functions or for builtins.
440 return; 441 return;
441 } 442 }
442 } 443 }
443 444
444 // And only wrap string, number or boolean. 445 // And only wrap string, number or boolean.
445 if (object->IsString() || object->IsNumber() || object->IsBoolean()) { 446 if (object->IsString() || object->IsNumber() || object->IsBoolean()) {
446 // Change the receiver to the result of calling ToObject on it. 447 // Change the receiver to the result of calling ToObject on it.
447 const int argc = this->target()->arguments_count(); 448 const int argc = this->target()->arguments_count();
448 StackFrameLocator locator; 449 StackFrameLocator locator;
(...skipping 1928 matching lines...) Expand 10 before | Expand all | Expand 10 after
2377 #undef ADDR 2378 #undef ADDR
2378 }; 2379 };
2379 2380
2380 2381
2381 Address IC::AddressFromUtilityId(IC::UtilityId id) { 2382 Address IC::AddressFromUtilityId(IC::UtilityId id) {
2382 return IC_utilities[id]; 2383 return IC_utilities[id];
2383 } 2384 }
2384 2385
2385 2386
2386 } } // namespace v8::internal 2387 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698