| OLD | NEW |
| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 NoCurrentFrameScope scope(&masm); | 91 NoCurrentFrameScope scope(&masm); |
| 92 Generate(&masm); | 92 Generate(&masm); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Create the code object. | 95 // Create the code object. |
| 96 CodeDesc desc; | 96 CodeDesc desc; |
| 97 masm.GetCode(&desc); | 97 masm.GetCode(&desc); |
| 98 | 98 |
| 99 // Copy the generated code into a heap object. | 99 // Copy the generated code into a heap object. |
| 100 Code::Flags flags = Code::ComputeFlags( | 100 Code::Flags flags = Code::ComputeFlags( |
| 101 static_cast<Code::Kind>(GetCodeKind()), GetICState()); | 101 static_cast<Code::Kind>(GetCodeKind()), GetICState(), GetExtraICState()); |
| 102 Handle<Code> new_object = factory->NewCode( | 102 Handle<Code> new_object = factory->NewCode( |
| 103 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 103 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
| 104 return new_object; | 104 return new_object; |
| 105 } | 105 } |
| 106 | 106 |
| 107 | 107 |
| 108 Handle<Code> CodeStub::GetCode() { | 108 Handle<Code> CodeStub::GetCode() { |
| 109 Isolate* isolate = Isolate::Current(); | 109 Isolate* isolate = Isolate::Current(); |
| 110 Factory* factory = isolate->factory(); | 110 Factory* factory = isolate->factory(); |
| 111 Heap* heap = isolate->heap(); | 111 Heap* heap = isolate->heap(); |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 // already active, as the hooks won't stack. | 621 // already active, as the hooks won't stack. |
| 622 if (entry_hook != 0 && entry_hook_ != 0) | 622 if (entry_hook != 0 && entry_hook_ != 0) |
| 623 return false; | 623 return false; |
| 624 | 624 |
| 625 entry_hook_ = entry_hook; | 625 entry_hook_ = entry_hook; |
| 626 return true; | 626 return true; |
| 627 } | 627 } |
| 628 | 628 |
| 629 | 629 |
| 630 } } // namespace v8::internal | 630 } } // namespace v8::internal |
| OLD | NEW |