| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 { | 133 } else { |
| 134 ASSERT(IsPregenerated() == code->is_pregenerated()); | 134 CHECK(IsPregenerated() == code->is_pregenerated()); |
| 135 } | 135 } |
| 136 | 136 |
| 137 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); | 137 ASSERT(!NeedsImmovableCode() || heap->lo_space()->Contains(code)); |
| 138 return Handle<Code>(code, isolate); | 138 return Handle<Code>(code, isolate); |
| 139 } | 139 } |
| 140 | 140 |
| 141 | 141 |
| 142 MaybeObject* CodeStub::TryGetCode() { | 142 MaybeObject* CodeStub::TryGetCode() { |
| 143 Code* code; | 143 Code* code; |
| 144 if (!FindCodeInCache(&code)) { | 144 if (!FindCodeInCache(&code)) { |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 } | 404 } |
| 405 | 405 |
| 406 | 406 |
| 407 bool ToBooleanStub::Types::CanBeUndetectable() const { | 407 bool ToBooleanStub::Types::CanBeUndetectable() const { |
| 408 return Contains(ToBooleanStub::SPEC_OBJECT) | 408 return Contains(ToBooleanStub::SPEC_OBJECT) |
| 409 || Contains(ToBooleanStub::STRING); | 409 || Contains(ToBooleanStub::STRING); |
| 410 } | 410 } |
| 411 | 411 |
| 412 | 412 |
| 413 } } // namespace v8::internal | 413 } } // namespace v8::internal |
| OLD | NEW |