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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 2279005: Move assertions to not take case to check that it's safe to omit CheckPrototypes in this case. (Closed)
Patch Set: Created 10 years, 7 months 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
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 680
681 // Interceptor returned nothing for this property. Try to use cached 681 // Interceptor returned nothing for this property. Try to use cached
682 // constant function. 682 // constant function.
683 683
684 // Check that the maps from interceptor's holder to constant function's 684 // Check that the maps from interceptor's holder to constant function's
685 // holder haven't changed and thus we can use cached constant function. 685 // holder haven't changed and thus we can use cached constant function.
686 if (interceptor_holder != lookup->holder()) { 686 if (interceptor_holder != lookup->holder()) {
687 stub_compiler_->CheckPrototypes(interceptor_holder, receiver, 687 stub_compiler_->CheckPrototypes(interceptor_holder, receiver,
688 lookup->holder(), scratch1, 688 lookup->holder(), scratch1,
689 scratch2, name, depth2, miss); 689 scratch2, name, depth2, miss);
690 } else {
690 // CheckPrototypes has a side effect of fetching a 'holder' 691 // CheckPrototypes has a side effect of fetching a 'holder'
691 // for API (object which is instanceof for the signature). It's 692 // for API (object which is instanceof for the signature). It's
692 // safe to omit it here, as if present, it should be fetched 693 // safe to omit it here, as if present, it should be fetched
693 // by the previous CheckPrototypes. 694 // by the previous CheckPrototypes.
694 ASSERT((depth2 == kInvalidProtoDepth) || (depth1 != kInvalidProtoDepth)); 695 ASSERT(depth2 == kInvalidProtoDepth);
695 } 696 }
696 697
697 // Invoke function. 698 // Invoke function.
698 if (can_do_fast_api_call) { 699 if (can_do_fast_api_call) {
699 GenerateFastApiCall(masm, optimization, arguments_.immediate()); 700 GenerateFastApiCall(masm, optimization, arguments_.immediate());
700 } else { 701 } else {
701 __ InvokeFunction(optimization.constant_function(), arguments_, 702 __ InvokeFunction(optimization.constant_function(), arguments_,
702 JUMP_FUNCTION); 703 JUMP_FUNCTION);
703 } 704 }
704 705
(...skipping 1837 matching lines...) Expand 10 before | Expand all | Expand 10 after
2542 // Return the generated code. 2543 // Return the generated code.
2543 return GetCode(); 2544 return GetCode();
2544 } 2545 }
2545 2546
2546 2547
2547 #undef __ 2548 #undef __
2548 2549
2549 } } // namespace v8::internal 2550 } } // namespace v8::internal
2550 2551
2551 #endif // V8_TARGET_ARCH_IA32 2552 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/x64/stub-cache-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698