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

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: Addressed more comments. 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
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698