OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2717 Object* result; | 2717 Object* result; |
2718 if (!maybe_result->ToObject(&result)) return maybe_result; | 2718 if (!maybe_result->ToObject(&result)) return maybe_result; |
2719 | 2719 |
2720 // Initialize the object | 2720 // Initialize the object |
2721 HeapObject::cast(result)->set_map(code_map()); | 2721 HeapObject::cast(result)->set_map(code_map()); |
2722 Code* code = Code::cast(result); | 2722 Code* code = Code::cast(result); |
2723 ASSERT(!CodeRange::exists() || CodeRange::contains(code->address())); | 2723 ASSERT(!CodeRange::exists() || CodeRange::contains(code->address())); |
2724 code->set_instruction_size(desc.instr_size); | 2724 code->set_instruction_size(desc.instr_size); |
2725 code->set_relocation_info(ByteArray::cast(reloc_info)); | 2725 code->set_relocation_info(ByteArray::cast(reloc_info)); |
2726 code->set_flags(flags); | 2726 code->set_flags(flags); |
| 2727 if (code->is_call_stub() || code->is_keyed_call_stub()) { |
| 2728 code->set_check_type(RECEIVER_MAP_CHECK); |
| 2729 } |
2727 code->set_deoptimization_data(empty_fixed_array()); | 2730 code->set_deoptimization_data(empty_fixed_array()); |
2728 // Allow self references to created code object by patching the handle to | 2731 // Allow self references to created code object by patching the handle to |
2729 // point to the newly allocated Code object. | 2732 // point to the newly allocated Code object. |
2730 if (!self_reference.is_null()) { | 2733 if (!self_reference.is_null()) { |
2731 *(self_reference.location()) = code; | 2734 *(self_reference.location()) = code; |
2732 } | 2735 } |
2733 // Migrate generated code. | 2736 // Migrate generated code. |
2734 // The generated code can contain Object** values (typically from handles) | 2737 // The generated code can contain Object** values (typically from handles) |
2735 // that are dereferenced during the copy to point directly to the actual heap | 2738 // that are dereferenced during the copy to point directly to the actual heap |
2736 // objects. These pointers can include references to the code object itself, | 2739 // objects. These pointers can include references to the code object itself, |
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5536 void ExternalStringTable::TearDown() { | 5539 void ExternalStringTable::TearDown() { |
5537 new_space_strings_.Free(); | 5540 new_space_strings_.Free(); |
5538 old_space_strings_.Free(); | 5541 old_space_strings_.Free(); |
5539 } | 5542 } |
5540 | 5543 |
5541 | 5544 |
5542 List<Object*> ExternalStringTable::new_space_strings_; | 5545 List<Object*> ExternalStringTable::new_space_strings_; |
5543 List<Object*> ExternalStringTable::old_space_strings_; | 5546 List<Object*> ExternalStringTable::old_space_strings_; |
5544 | 5547 |
5545 } } // namespace v8::internal | 5548 } } // namespace v8::internal |
OLD | NEW |