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(), GetExtraICState()); | 101 static_cast<Code::Kind>(GetCodeKind()), |
| 102 GetICState(), |
| 103 GetExtraICState(), |
| 104 GetStubType()); |
102 Handle<Code> new_object = factory->NewCode( | 105 Handle<Code> new_object = factory->NewCode( |
103 desc, flags, masm.CodeObject(), NeedsImmovableCode()); | 106 desc, flags, masm.CodeObject(), NeedsImmovableCode()); |
104 return new_object; | 107 return new_object; |
105 } | 108 } |
106 | 109 |
107 | 110 |
108 Handle<Code> CodeStub::GetCode(Isolate* isolate) { | 111 Handle<Code> CodeStub::GetCode(Isolate* isolate) { |
109 Factory* factory = isolate->factory(); | 112 Factory* factory = isolate->factory(); |
110 Heap* heap = isolate->heap(); | 113 Heap* heap = isolate->heap(); |
111 Code* code; | 114 Code* code; |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 // already active, as the hooks won't stack. | 629 // already active, as the hooks won't stack. |
627 if (entry_hook != 0 && entry_hook_ != 0) | 630 if (entry_hook != 0 && entry_hook_ != 0) |
628 return false; | 631 return false; |
629 | 632 |
630 entry_hook_ = entry_hook; | 633 entry_hook_ = entry_hook; |
631 return true; | 634 return true; |
632 } | 635 } |
633 | 636 |
634 | 637 |
635 } } // namespace v8::internal | 638 } } // namespace v8::internal |
OLD | NEW |