| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 } | 123 } |
| 124 | 124 |
| 125 // Process any deferred code. | 125 // Process any deferred code. |
| 126 cgen.ProcessDeferred(); | 126 cgen.ProcessDeferred(); |
| 127 | 127 |
| 128 // Allocate and install the code. | 128 // Allocate and install the code. |
| 129 CodeDesc desc; | 129 CodeDesc desc; |
| 130 cgen.masm()->GetCode(&desc); | 130 cgen.masm()->GetCode(&desc); |
| 131 ScopeInfo<> sinfo(flit->scope()); | 131 ScopeInfo<> sinfo(flit->scope()); |
| 132 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); | 132 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); |
| 133 Handle<Code> code = Factory::NewCode(desc, &sinfo, flags); | 133 Handle<Code> code = Factory::NewCode(desc, |
| 134 &sinfo, |
| 135 flags, |
| 136 cgen.masm()->CodeObject()); |
| 134 | 137 |
| 135 // Add unresolved entries in the code to the fixup list. | 138 // Add unresolved entries in the code to the fixup list. |
| 136 Bootstrapper::AddFixup(*code, cgen.masm()); | 139 Bootstrapper::AddFixup(*code, cgen.masm()); |
| 137 | 140 |
| 138 #ifdef ENABLE_DISASSEMBLER | 141 #ifdef ENABLE_DISASSEMBLER |
| 139 if (print_code) { | 142 if (print_code) { |
| 140 // Print the source code if available. | 143 // Print the source code if available. |
| 141 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 144 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
| 142 PrintF("--- Raw source ---\n"); | 145 PrintF("--- Raw source ---\n"); |
| 143 StringInputBuffer stream(String::cast(script->source())); | 146 StringInputBuffer stream(String::cast(script->source())); |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 519 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
| 517 switch (type_) { | 520 switch (type_) { |
| 518 case READ_LENGTH: GenerateReadLength(masm); break; | 521 case READ_LENGTH: GenerateReadLength(masm); break; |
| 519 case READ_ELEMENT: GenerateReadElement(masm); break; | 522 case READ_ELEMENT: GenerateReadElement(masm); break; |
| 520 case NEW_OBJECT: GenerateNewObject(masm); break; | 523 case NEW_OBJECT: GenerateNewObject(masm); break; |
| 521 } | 524 } |
| 522 } | 525 } |
| 523 | 526 |
| 524 | 527 |
| 525 } } // namespace v8::internal | 528 } } // namespace v8::internal |
| OLD | NEW |