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

Side by Side Diff: src/hydrogen.cc

Issue 17155010: Use type feedback for Array (non-constructor) call sites. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Nit fixin' Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « src/bootstrapper.cc ('k') | src/ia32/stub-cache-ia32.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 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 8730 matching lines...) Expand 10 before | Expand all | Expand 10 after
8741 PrintF("\n"); 8741 PrintF("\n");
8742 } 8742 }
8743 return; 8743 return;
8744 } 8744 }
8745 if (TryInlineCall(expr)) return; 8745 if (TryInlineCall(expr)) return;
8746 8746
8747 if (expr->target().is_identical_to(current_info()->closure())) { 8747 if (expr->target().is_identical_to(current_info()->closure())) {
8748 graph()->MarkRecursive(); 8748 graph()->MarkRecursive();
8749 } 8749 }
8750 8750
8751 call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(), 8751 if (CallStubCompiler::HasCustomCallGenerator(expr->target())) {
8752 // When the target has a custom call IC generator, use the IC,
8753 // because it is likely to generate better code.
8754 HValue* context = environment()->LookupContext();
8755 call = PreProcessCall(
8756 new(zone()) HCallNamed(context, var->name(), argument_count));
8757 } else {
8758 call = PreProcessCall(new(zone()) HCallKnownGlobal(expr->target(),
8752 argument_count)); 8759 argument_count));
8760 }
8753 } else { 8761 } else {
8754 HValue* context = environment()->LookupContext(); 8762 HValue* context = environment()->LookupContext();
8755 HGlobalObject* receiver = new(zone()) HGlobalObject(context); 8763 HGlobalObject* receiver = new(zone()) HGlobalObject(context);
8756 AddInstruction(receiver); 8764 AddInstruction(receiver);
8757 PushAndAdd(new(zone()) HPushArgument(receiver)); 8765 PushAndAdd(new(zone()) HPushArgument(receiver));
8758 CHECK_ALIVE(VisitArgumentList(expr->arguments())); 8766 CHECK_ALIVE(VisitArgumentList(expr->arguments()));
8759 8767
8760 call = new(zone()) HCallGlobal(context, var->name(), argument_count); 8768 call = new(zone()) HCallGlobal(context, var->name(), argument_count);
8761 Drop(argument_count); 8769 Drop(argument_count);
8762 } 8770 }
(...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after
11637 } 11645 }
11638 } 11646 }
11639 11647
11640 #ifdef DEBUG 11648 #ifdef DEBUG
11641 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11649 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11642 if (allocator_ != NULL) allocator_->Verify(); 11650 if (allocator_ != NULL) allocator_->Verify();
11643 #endif 11651 #endif
11644 } 11652 }
11645 11653
11646 } } // namespace v8::internal 11654 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698