| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 masm->set_allow_stub_calls(AllowsStubCalls()); | 53 masm->set_allow_stub_calls(AllowsStubCalls()); |
| 54 // Generate the code for the stub. | 54 // Generate the code for the stub. |
| 55 masm->set_generating_stub(true); | 55 masm->set_generating_stub(true); |
| 56 Generate(masm); | 56 Generate(masm); |
| 57 } | 57 } |
| 58 | 58 |
| 59 | 59 |
| 60 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { | 60 void CodeStub::RecordCodeGeneration(Code* code, MacroAssembler* masm) { |
| 61 code->set_major_key(MajorKey()); | 61 code->set_major_key(MajorKey()); |
| 62 | 62 |
| 63 // Add unresolved entries in the code to the fixup list. | |
| 64 Bootstrapper::AddFixup(code, masm); | |
| 65 | |
| 66 LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); | 63 LOG(CodeCreateEvent(Logger::STUB_TAG, code, GetName())); |
| 67 Counters::total_stubs_code_size.Increment(code->instruction_size()); | 64 Counters::total_stubs_code_size.Increment(code->instruction_size()); |
| 68 | 65 |
| 69 #ifdef ENABLE_DISASSEMBLER | 66 #ifdef ENABLE_DISASSEMBLER |
| 70 if (FLAG_print_code_stubs) { | 67 if (FLAG_print_code_stubs) { |
| 71 #ifdef DEBUG | 68 #ifdef DEBUG |
| 72 Print(); | 69 Print(); |
| 73 #endif | 70 #endif |
| 74 code->Disassemble(GetName()); | 71 code->Disassemble(GetName()); |
| 75 PrintF("\n"); | 72 PrintF("\n"); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 default: | 155 default: |
| 159 if (!allow_unknown_keys) { | 156 if (!allow_unknown_keys) { |
| 160 UNREACHABLE(); | 157 UNREACHABLE(); |
| 161 } | 158 } |
| 162 return NULL; | 159 return NULL; |
| 163 } | 160 } |
| 164 } | 161 } |
| 165 | 162 |
| 166 | 163 |
| 167 } } // namespace v8::internal | 164 } } // namespace v8::internal |
| OLD | NEW |