| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 if (cgen.HasStackOverflow()) { | 148 if (cgen.HasStackOverflow()) { |
| 149 ASSERT(!Top::has_pending_exception()); | 149 ASSERT(!Top::has_pending_exception()); |
| 150 return Handle<Code>::null(); | 150 return Handle<Code>::null(); |
| 151 } | 151 } |
| 152 | 152 |
| 153 // Allocate and install the code. | 153 // Allocate and install the code. |
| 154 CodeDesc desc; | 154 CodeDesc desc; |
| 155 cgen.masm()->GetCode(&desc); | 155 cgen.masm()->GetCode(&desc); |
| 156 ScopeInfo<> sinfo(flit->scope()); | 156 ScopeInfo<> sinfo(flit->scope()); |
| 157 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); | 157 Code::Flags flags = Code::ComputeFlags(Code::FUNCTION); |
| 158 Handle<Code> code = Factory::NewCode(desc, &sinfo, flags); | 158 Handle<Code> code = Factory::NewCode(desc, |
| 159 &sinfo, |
| 160 flags, |
| 161 cgen.masm()->CodeObject()); |
| 159 | 162 |
| 160 // Add unresolved entries in the code to the fixup list. | 163 // Add unresolved entries in the code to the fixup list. |
| 161 Bootstrapper::AddFixup(*code, cgen.masm()); | 164 Bootstrapper::AddFixup(*code, cgen.masm()); |
| 162 | 165 |
| 163 #ifdef ENABLE_DISASSEMBLER | 166 #ifdef ENABLE_DISASSEMBLER |
| 164 if (print_code) { | 167 if (print_code) { |
| 165 // Print the source code if available. | 168 // Print the source code if available. |
| 166 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 169 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
| 167 PrintF("--- Raw source ---\n"); | 170 PrintF("--- Raw source ---\n"); |
| 168 StringInputBuffer stream(String::cast(script->source())); | 171 StringInputBuffer stream(String::cast(script->source())); |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { | 571 void ArgumentsAccessStub::Generate(MacroAssembler* masm) { |
| 569 switch (type_) { | 572 switch (type_) { |
| 570 case READ_LENGTH: GenerateReadLength(masm); break; | 573 case READ_LENGTH: GenerateReadLength(masm); break; |
| 571 case READ_ELEMENT: GenerateReadElement(masm); break; | 574 case READ_ELEMENT: GenerateReadElement(masm); break; |
| 572 case NEW_OBJECT: GenerateNewObject(masm); break; | 575 case NEW_OBJECT: GenerateNewObject(masm); break; |
| 573 } | 576 } |
| 574 } | 577 } |
| 575 | 578 |
| 576 | 579 |
| 577 } } // namespace v8::internal | 580 } } // namespace v8::internal |
| OLD | NEW |