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 4421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4432 | 4432 |
4433 bool Code::has_major_key() { | 4433 bool Code::has_major_key() { |
4434 return kind() == STUB || | 4434 return kind() == STUB || |
4435 kind() == HANDLER || | 4435 kind() == HANDLER || |
4436 kind() == BINARY_OP_IC || | 4436 kind() == BINARY_OP_IC || |
4437 kind() == COMPARE_IC || | 4437 kind() == COMPARE_IC || |
4438 kind() == COMPARE_NIL_IC || | 4438 kind() == COMPARE_NIL_IC || |
4439 kind() == LOAD_IC || | 4439 kind() == LOAD_IC || |
4440 kind() == KEYED_LOAD_IC || | 4440 kind() == KEYED_LOAD_IC || |
4441 kind() == STORE_IC || | 4441 kind() == STORE_IC || |
4442 kind() == CALL_IC || | |
4443 kind() == KEYED_STORE_IC || | 4442 kind() == KEYED_STORE_IC || |
4444 kind() == TO_BOOLEAN_IC; | 4443 kind() == TO_BOOLEAN_IC; |
4445 } | 4444 } |
4446 | 4445 |
4447 | 4446 |
4448 bool Code::optimizable() { | 4447 bool Code::optimizable() { |
4449 ASSERT_EQ(FUNCTION, kind()); | 4448 ASSERT_EQ(FUNCTION, kind()); |
4450 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; | 4449 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; |
4451 } | 4450 } |
4452 | 4451 |
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5888 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 5887 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |
5889 ASSERT(kind() == FUNCTION); | 5888 ASSERT(kind() == FUNCTION); |
5890 set_raw_type_feedback_info(value, mode); | 5889 set_raw_type_feedback_info(value, mode); |
5891 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 5890 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
5892 value, mode); | 5891 value, mode); |
5893 } | 5892 } |
5894 | 5893 |
5895 | 5894 |
5896 int Code::stub_info() { | 5895 int Code::stub_info() { |
5897 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || | 5896 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || |
5898 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC); | 5897 kind() == BINARY_OP_IC || kind() == LOAD_IC); |
5899 return Smi::cast(raw_type_feedback_info())->value(); | 5898 return Smi::cast(raw_type_feedback_info())->value(); |
5900 } | 5899 } |
5901 | 5900 |
5902 | 5901 |
5903 void Code::set_stub_info(int value) { | 5902 void Code::set_stub_info(int value) { |
5904 ASSERT(kind() == COMPARE_IC || | 5903 ASSERT(kind() == COMPARE_IC || |
5905 kind() == COMPARE_NIL_IC || | 5904 kind() == COMPARE_NIL_IC || |
5906 kind() == BINARY_OP_IC || | 5905 kind() == BINARY_OP_IC || |
5907 kind() == STUB || | 5906 kind() == STUB || |
5908 kind() == LOAD_IC || | 5907 kind() == LOAD_IC || |
5909 kind() == CALL_IC || | |
5910 kind() == KEYED_LOAD_IC || | 5908 kind() == KEYED_LOAD_IC || |
5911 kind() == STORE_IC || | 5909 kind() == STORE_IC || |
5912 kind() == KEYED_STORE_IC); | 5910 kind() == KEYED_STORE_IC); |
5913 set_raw_type_feedback_info(Smi::FromInt(value)); | 5911 set_raw_type_feedback_info(Smi::FromInt(value)); |
5914 } | 5912 } |
5915 | 5913 |
5916 | 5914 |
5917 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) | 5915 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) |
5918 INT_ACCESSORS(Code, ic_age, kICAgeOffset) | 5916 INT_ACCESSORS(Code, ic_age, kICAgeOffset) |
5919 | 5917 |
(...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6943 #undef READ_UINT32_FIELD | 6941 #undef READ_UINT32_FIELD |
6944 #undef WRITE_UINT32_FIELD | 6942 #undef WRITE_UINT32_FIELD |
6945 #undef READ_SHORT_FIELD | 6943 #undef READ_SHORT_FIELD |
6946 #undef WRITE_SHORT_FIELD | 6944 #undef WRITE_SHORT_FIELD |
6947 #undef READ_BYTE_FIELD | 6945 #undef READ_BYTE_FIELD |
6948 #undef WRITE_BYTE_FIELD | 6946 #undef WRITE_BYTE_FIELD |
6949 | 6947 |
6950 } } // namespace v8::internal | 6948 } } // namespace v8::internal |
6951 | 6949 |
6952 #endif // V8_OBJECTS_INL_H_ | 6950 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |