OLD | NEW |
---|---|
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
102 | 102 |
103 // Copy the generated code into a heap object. | 103 // Copy the generated code into a heap object. |
104 Code::Flags flags = Code::ComputeFlags( | 104 Code::Flags flags = Code::ComputeFlags( |
105 static_cast<Code::Kind>(GetCodeKind()), | 105 static_cast<Code::Kind>(GetCodeKind()), |
106 InLoop(), | 106 InLoop(), |
107 GetICState()); | 107 GetICState()); |
108 Handle<Code> new_object = Factory::NewCode(desc, flags, masm.CodeObject()); | 108 Handle<Code> new_object = Factory::NewCode(desc, flags, masm.CodeObject()); |
109 RecordCodeGeneration(*new_object, &masm); | 109 RecordCodeGeneration(*new_object, &masm); |
110 FinishCode(*new_object); | 110 FinishCode(*new_object); |
111 | 111 |
112 { | |
Vyacheslav Egorov (Chromium)
2011/01/25 12:50:11
Do we really need this piece of code?
The code s
| |
113 ZoneScope uinfo(DELETE_ON_EXIT); | |
114 uintptr_t begin = reinterpret_cast<uintptr_t> | |
115 (new_object->instruction_start()); | |
116 uintptr_t size = new_object->instruction_size(); | |
117 | |
118 // This is to prevent compiler errors about begin and end not being | |
119 // used when SET_UNWIND_INFO_STUB is empty. | |
120 | |
121 (void) begin; | |
122 (void) size; | |
123 SET_UNWIND_INFO_STUB(begin, size); | |
124 } | |
125 | |
112 // Update the dictionary and the root in Heap. | 126 // Update the dictionary and the root in Heap. |
113 Handle<NumberDictionary> dict = | 127 Handle<NumberDictionary> dict = |
114 Factory::DictionaryAtNumberPut( | 128 Factory::DictionaryAtNumberPut( |
115 Handle<NumberDictionary>(Heap::code_stubs()), | 129 Handle<NumberDictionary>(Heap::code_stubs()), |
116 GetKey(), | 130 GetKey(), |
117 new_object); | 131 new_object); |
118 Heap::public_set_code_stubs(*dict); | 132 Heap::public_set_code_stubs(*dict); |
119 | 133 |
120 code = *new_object; | 134 code = *new_object; |
121 } | 135 } |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
225 OS::SNPrintF(Vector<char>(name_, kMaxNameLength), | 239 OS::SNPrintF(Vector<char>(name_, kMaxNameLength), |
226 "InstanceofStub%s%s%s", | 240 "InstanceofStub%s%s%s", |
227 args, | 241 args, |
228 inline_check, | 242 inline_check, |
229 return_true_false_object); | 243 return_true_false_object); |
230 return name_; | 244 return name_; |
231 } | 245 } |
232 | 246 |
233 | 247 |
234 } } // namespace v8::internal | 248 } } // namespace v8::internal |
OLD | NEW |