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

Side by Side Diff: src/code-stubs.cc

Issue 12385014: Hydrogen stubs for array constructors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More efficient code when number of arguments is known Created 7 years, 8 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
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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 // We don't allow setting a new entry hook over one that's 640 // We don't allow setting a new entry hook over one that's
641 // already active, as the hooks won't stack. 641 // already active, as the hooks won't stack.
642 if (entry_hook != 0 && entry_hook_ != 0) 642 if (entry_hook != 0 && entry_hook_ != 0)
643 return false; 643 return false;
644 644
645 entry_hook_ = entry_hook; 645 entry_hook_ = entry_hook;
646 return true; 646 return true;
647 } 647 }
648 648
649 649
650 static void InstallDescriptor(Isolate* isolate, HydrogenCodeStub* stub) {
651 int major_key = stub->MajorKey();
652 CodeStubInterfaceDescriptor* descriptor =
653 isolate->code_stub_interface_descriptor(major_key);
654 if (descriptor->register_param_count_ < 0) {
655 stub->InitializeInterfaceDescriptor(isolate, descriptor);
656 }
657 }
658
659
660 void ArrayConstructorStubBase::InstallDescriptors(Isolate* isolate) {
661 ArrayNoArgumentConstructorStub stub1(GetInitialFastElementsKind());
662 InstallDescriptor(isolate, &stub1);
663 ArraySingleArgumentConstructorStub stub2(GetInitialFastElementsKind());
664 InstallDescriptor(isolate, &stub2);
665 ArrayNArgumentsConstructorStub stub3(GetInitialFastElementsKind());
666 InstallDescriptor(isolate, &stub3);
667 }
668
669
650 } } // namespace v8::internal 670 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/code-stubs-hydrogen.cc » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698