| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4301 | 4301 |
| 4302 bool Code::has_major_key() { | 4302 bool Code::has_major_key() { |
| 4303 return kind() == STUB || | 4303 return kind() == STUB || |
| 4304 kind() == HANDLER || | 4304 kind() == HANDLER || |
| 4305 kind() == BINARY_OP_IC || | 4305 kind() == BINARY_OP_IC || |
| 4306 kind() == COMPARE_IC || | 4306 kind() == COMPARE_IC || |
| 4307 kind() == COMPARE_NIL_IC || | 4307 kind() == COMPARE_NIL_IC || |
| 4308 kind() == LOAD_IC || | 4308 kind() == LOAD_IC || |
| 4309 kind() == KEYED_LOAD_IC || | 4309 kind() == KEYED_LOAD_IC || |
| 4310 kind() == STORE_IC || | 4310 kind() == STORE_IC || |
| 4311 kind() == CALL_IC || |
| 4311 kind() == KEYED_STORE_IC || | 4312 kind() == KEYED_STORE_IC || |
| 4312 kind() == TO_BOOLEAN_IC; | 4313 kind() == TO_BOOLEAN_IC; |
| 4313 } | 4314 } |
| 4314 | 4315 |
| 4315 | 4316 |
| 4316 bool Code::optimizable() { | 4317 bool Code::optimizable() { |
| 4317 ASSERT_EQ(FUNCTION, kind()); | 4318 ASSERT_EQ(FUNCTION, kind()); |
| 4318 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; | 4319 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; |
| 4319 } | 4320 } |
| 4320 | 4321 |
| (...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5769 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { | 5770 void Code::set_next_code_link(Object* value, WriteBarrierMode mode) { |
| 5770 CHECK(kind() == OPTIMIZED_FUNCTION); | 5771 CHECK(kind() == OPTIMIZED_FUNCTION); |
| 5771 set_raw_type_feedback_info(value); | 5772 set_raw_type_feedback_info(value); |
| 5772 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 5773 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
| 5773 value, mode); | 5774 value, mode); |
| 5774 } | 5775 } |
| 5775 | 5776 |
| 5776 | 5777 |
| 5777 int Code::stub_info() { | 5778 int Code::stub_info() { |
| 5778 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || | 5779 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || |
| 5779 kind() == BINARY_OP_IC || kind() == LOAD_IC); | 5780 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC); |
| 5780 return Smi::cast(raw_type_feedback_info())->value(); | 5781 return Smi::cast(raw_type_feedback_info())->value(); |
| 5781 } | 5782 } |
| 5782 | 5783 |
| 5783 | 5784 |
| 5784 void Code::set_stub_info(int value) { | 5785 void Code::set_stub_info(int value) { |
| 5785 ASSERT(kind() == COMPARE_IC || | 5786 ASSERT(kind() == COMPARE_IC || |
| 5786 kind() == COMPARE_NIL_IC || | 5787 kind() == COMPARE_NIL_IC || |
| 5787 kind() == BINARY_OP_IC || | 5788 kind() == BINARY_OP_IC || |
| 5788 kind() == STUB || | 5789 kind() == STUB || |
| 5789 kind() == LOAD_IC || | 5790 kind() == LOAD_IC || |
| 5791 kind() == CALL_IC || |
| 5790 kind() == KEYED_LOAD_IC || | 5792 kind() == KEYED_LOAD_IC || |
| 5791 kind() == STORE_IC || | 5793 kind() == STORE_IC || |
| 5792 kind() == KEYED_STORE_IC); | 5794 kind() == KEYED_STORE_IC); |
| 5793 set_raw_type_feedback_info(Smi::FromInt(value)); | 5795 set_raw_type_feedback_info(Smi::FromInt(value)); |
| 5794 } | 5796 } |
| 5795 | 5797 |
| 5796 | 5798 |
| 5797 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) | 5799 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) |
| 5798 INT_ACCESSORS(Code, ic_age, kICAgeOffset) | 5800 INT_ACCESSORS(Code, ic_age, kICAgeOffset) |
| 5799 | 5801 |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6809 #undef READ_UINT32_FIELD | 6811 #undef READ_UINT32_FIELD |
| 6810 #undef WRITE_UINT32_FIELD | 6812 #undef WRITE_UINT32_FIELD |
| 6811 #undef READ_SHORT_FIELD | 6813 #undef READ_SHORT_FIELD |
| 6812 #undef WRITE_SHORT_FIELD | 6814 #undef WRITE_SHORT_FIELD |
| 6813 #undef READ_BYTE_FIELD | 6815 #undef READ_BYTE_FIELD |
| 6814 #undef WRITE_BYTE_FIELD | 6816 #undef WRITE_BYTE_FIELD |
| 6815 | 6817 |
| 6816 } } // namespace v8::internal | 6818 } } // namespace v8::internal |
| 6817 | 6819 |
| 6818 #endif // V8_OBJECTS_INL_H_ | 6820 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |