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