| 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 2591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2602 int Code::major_key() { | 2602 int Code::major_key() { |
| 2603 ASSERT(kind() == STUB || | 2603 ASSERT(kind() == STUB || |
| 2604 kind() == TYPE_RECORDING_BINARY_OP_IC || | 2604 kind() == TYPE_RECORDING_BINARY_OP_IC || |
| 2605 kind() == COMPARE_IC); | 2605 kind() == COMPARE_IC); |
| 2606 return READ_BYTE_FIELD(this, kStubMajorKeyOffset); | 2606 return READ_BYTE_FIELD(this, kStubMajorKeyOffset); |
| 2607 } | 2607 } |
| 2608 | 2608 |
| 2609 | 2609 |
| 2610 void Code::set_major_key(int major) { | 2610 void Code::set_major_key(int major) { |
| 2611 ASSERT(kind() == STUB || | 2611 ASSERT(kind() == STUB || |
| 2612 kind() == TYPE_RECORDING_UNARY_OP_IC || |
| 2612 kind() == TYPE_RECORDING_BINARY_OP_IC || | 2613 kind() == TYPE_RECORDING_BINARY_OP_IC || |
| 2613 kind() == COMPARE_IC); | 2614 kind() == COMPARE_IC); |
| 2614 ASSERT(0 <= major && major < 256); | 2615 ASSERT(0 <= major && major < 256); |
| 2615 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); | 2616 WRITE_BYTE_FIELD(this, kStubMajorKeyOffset, major); |
| 2616 } | 2617 } |
| 2617 | 2618 |
| 2618 | 2619 |
| 2619 bool Code::optimizable() { | 2620 bool Code::optimizable() { |
| 2620 ASSERT(kind() == FUNCTION); | 2621 ASSERT(kind() == FUNCTION); |
| 2621 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; | 2622 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2710 return static_cast<ExternalArrayType>(type); | 2711 return static_cast<ExternalArrayType>(type); |
| 2711 } | 2712 } |
| 2712 | 2713 |
| 2713 | 2714 |
| 2714 void Code::set_external_array_type(ExternalArrayType value) { | 2715 void Code::set_external_array_type(ExternalArrayType value) { |
| 2715 ASSERT(is_external_array_load_stub() || is_external_array_store_stub()); | 2716 ASSERT(is_external_array_load_stub() || is_external_array_store_stub()); |
| 2716 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value); | 2717 WRITE_BYTE_FIELD(this, kExternalArrayTypeOffset, value); |
| 2717 } | 2718 } |
| 2718 | 2719 |
| 2719 | 2720 |
| 2721 byte Code::type_recording_unary_op_type() { |
| 2722 ASSERT(is_type_recording_unary_op_stub()); |
| 2723 return READ_BYTE_FIELD(this, kUnaryOpTypeOffset); |
| 2724 } |
| 2725 |
| 2726 |
| 2727 void Code::set_type_recording_unary_op_type(byte value) { |
| 2728 ASSERT(is_type_recording_unary_op_stub()); |
| 2729 WRITE_BYTE_FIELD(this, kUnaryOpTypeOffset, value); |
| 2730 } |
| 2731 |
| 2732 |
| 2720 byte Code::type_recording_binary_op_type() { | 2733 byte Code::type_recording_binary_op_type() { |
| 2721 ASSERT(is_type_recording_binary_op_stub()); | 2734 ASSERT(is_type_recording_binary_op_stub()); |
| 2722 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset); | 2735 return READ_BYTE_FIELD(this, kBinaryOpTypeOffset); |
| 2723 } | 2736 } |
| 2724 | 2737 |
| 2725 | 2738 |
| 2726 void Code::set_type_recording_binary_op_type(byte value) { | 2739 void Code::set_type_recording_binary_op_type(byte value) { |
| 2727 ASSERT(is_type_recording_binary_op_stub()); | 2740 ASSERT(is_type_recording_binary_op_stub()); |
| 2728 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value); | 2741 WRITE_BYTE_FIELD(this, kBinaryOpTypeOffset, value); |
| 2729 } | 2742 } |
| (...skipping 1462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4192 #undef WRITE_INT_FIELD | 4205 #undef WRITE_INT_FIELD |
| 4193 #undef READ_SHORT_FIELD | 4206 #undef READ_SHORT_FIELD |
| 4194 #undef WRITE_SHORT_FIELD | 4207 #undef WRITE_SHORT_FIELD |
| 4195 #undef READ_BYTE_FIELD | 4208 #undef READ_BYTE_FIELD |
| 4196 #undef WRITE_BYTE_FIELD | 4209 #undef WRITE_BYTE_FIELD |
| 4197 | 4210 |
| 4198 | 4211 |
| 4199 } } // namespace v8::internal | 4212 } } // namespace v8::internal |
| 4200 | 4213 |
| 4201 #endif // V8_OBJECTS_INL_H_ | 4214 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |