OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 Loading... |
640 g(&masm, functions[i].name); | 640 g(&masm, functions[i].name); |
641 // Move the code into the object heap. | 641 // Move the code into the object heap. |
642 CodeDesc desc; | 642 CodeDesc desc; |
643 masm.GetCode(&desc); | 643 masm.GetCode(&desc); |
644 Code::Flags flags = functions[i].flags; | 644 Code::Flags flags = functions[i].flags; |
645 Object* code; | 645 Object* code; |
646 { | 646 { |
647 // During startup it's OK to always allocate and defer GC to later. | 647 // During startup it's OK to always allocate and defer GC to later. |
648 // This simplifies things because we don't need to retry. | 648 // This simplifies things because we don't need to retry. |
649 AlwaysAllocateScope __scope__; | 649 AlwaysAllocateScope __scope__; |
650 code = Heap::CreateCode(desc, NULL, flags); | 650 code = Heap::CreateCode(desc, NULL, flags, NULL); |
651 if (code->IsFailure()) { | 651 if (code->IsFailure()) { |
652 v8::internal::V8::FatalProcessOutOfMemory("CreateCode"); | 652 v8::internal::V8::FatalProcessOutOfMemory("CreateCode"); |
653 } | 653 } |
654 } | 654 } |
655 // Add any unresolved jumps or calls to the fixup list in the | 655 // Add any unresolved jumps or calls to the fixup list in the |
656 // bootstrapper. | 656 // bootstrapper. |
657 Bootstrapper::AddFixup(Code::cast(code), &masm); | 657 Bootstrapper::AddFixup(Code::cast(code), &masm); |
658 // Log the event and add the code to the builtins array. | 658 // Log the event and add the code to the builtins array. |
659 LOG(CodeCreateEvent("Builtin", Code::cast(code), functions[i].s_name)); | 659 LOG(CodeCreateEvent("Builtin", Code::cast(code), functions[i].s_name)); |
660 builtins_[i] = code; | 660 builtins_[i] = code; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 if (entry->contains(pc)) { | 694 if (entry->contains(pc)) { |
695 return names_[i]; | 695 return names_[i]; |
696 } | 696 } |
697 } | 697 } |
698 } | 698 } |
699 return NULL; | 699 return NULL; |
700 } | 700 } |
701 | 701 |
702 | 702 |
703 } } // namespace v8::internal | 703 } } // namespace v8::internal |
OLD | NEW |