OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 // Update the dictionary and the root in Heap. | 124 // Update the dictionary and the root in Heap. |
125 Handle<NumberDictionary> dict = | 125 Handle<NumberDictionary> dict = |
126 factory->DictionaryAtNumberPut( | 126 factory->DictionaryAtNumberPut( |
127 Handle<NumberDictionary>(heap->code_stubs()), | 127 Handle<NumberDictionary>(heap->code_stubs()), |
128 GetKey(), | 128 GetKey(), |
129 new_object); | 129 new_object); |
130 heap->public_set_code_stubs(*dict); | 130 heap->public_set_code_stubs(*dict); |
131 code = *new_object; | 131 code = *new_object; |
132 Activate(code); | 132 Activate(code); |
| 133 } else { |
| 134 ASSERT(IsPregenerated() == code->is_pregenerated()); |
133 } | 135 } |
134 | 136 |
135 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); | 137 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); |
136 return Handle<Code>(code, isolate); | 138 return Handle<Code>(code, isolate); |
137 } | 139 } |
138 | 140 |
139 | 141 |
140 MaybeObject* CodeStub::TryGetCode() { | 142 MaybeObject* CodeStub::TryGetCode() { |
141 Code* code; | 143 Code* code; |
142 if (!FindCodeInCache(&code)) { | 144 if (!FindCodeInCache(&code)) { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 } | 404 } |
403 | 405 |
404 | 406 |
405 bool ToBooleanStub::Types::CanBeUndetectable() const { | 407 bool ToBooleanStub::Types::CanBeUndetectable() const { |
406 return Contains(ToBooleanStub::SPEC_OBJECT) | 408 return Contains(ToBooleanStub::SPEC_OBJECT) |
407 || Contains(ToBooleanStub::STRING); | 409 || Contains(ToBooleanStub::STRING); |
408 } | 410 } |
409 | 411 |
410 | 412 |
411 } } // namespace v8::internal | 413 } } // namespace v8::internal |
OLD | NEW |