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 4474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4485 | 4485 |
4486 bool Code::has_major_key() { | 4486 bool Code::has_major_key() { |
4487 return kind() == STUB || | 4487 return kind() == STUB || |
4488 kind() == HANDLER || | 4488 kind() == HANDLER || |
4489 kind() == BINARY_OP_IC || | 4489 kind() == BINARY_OP_IC || |
4490 kind() == COMPARE_IC || | 4490 kind() == COMPARE_IC || |
4491 kind() == COMPARE_NIL_IC || | 4491 kind() == COMPARE_NIL_IC || |
4492 kind() == LOAD_IC || | 4492 kind() == LOAD_IC || |
4493 kind() == KEYED_LOAD_IC || | 4493 kind() == KEYED_LOAD_IC || |
4494 kind() == STORE_IC || | 4494 kind() == STORE_IC || |
| 4495 kind() == CALL_IC || |
4495 kind() == KEYED_STORE_IC || | 4496 kind() == KEYED_STORE_IC || |
4496 kind() == TO_BOOLEAN_IC; | 4497 kind() == TO_BOOLEAN_IC; |
4497 } | 4498 } |
4498 | 4499 |
4499 | 4500 |
4500 bool Code::optimizable() { | 4501 bool Code::optimizable() { |
4501 ASSERT_EQ(FUNCTION, kind()); | 4502 ASSERT_EQ(FUNCTION, kind()); |
4502 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; | 4503 return READ_BYTE_FIELD(this, kOptimizableOffset) == 1; |
4503 } | 4504 } |
4504 | 4505 |
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5948 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 5949 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |
5949 ASSERT(kind() == FUNCTION); | 5950 ASSERT(kind() == FUNCTION); |
5950 set_raw_type_feedback_info(value, mode); | 5951 set_raw_type_feedback_info(value, mode); |
5951 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 5952 CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |
5952 value, mode); | 5953 value, mode); |
5953 } | 5954 } |
5954 | 5955 |
5955 | 5956 |
5956 int Code::stub_info() { | 5957 int Code::stub_info() { |
5957 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || | 5958 ASSERT(kind() == COMPARE_IC || kind() == COMPARE_NIL_IC || |
5958 kind() == BINARY_OP_IC || kind() == LOAD_IC); | 5959 kind() == BINARY_OP_IC || kind() == LOAD_IC || kind() == CALL_IC); |
5959 return Smi::cast(raw_type_feedback_info())->value(); | 5960 return Smi::cast(raw_type_feedback_info())->value(); |
5960 } | 5961 } |
5961 | 5962 |
5962 | 5963 |
5963 void Code::set_stub_info(int value) { | 5964 void Code::set_stub_info(int value) { |
5964 ASSERT(kind() == COMPARE_IC || | 5965 ASSERT(kind() == COMPARE_IC || |
5965 kind() == COMPARE_NIL_IC || | 5966 kind() == COMPARE_NIL_IC || |
5966 kind() == BINARY_OP_IC || | 5967 kind() == BINARY_OP_IC || |
5967 kind() == STUB || | 5968 kind() == STUB || |
5968 kind() == LOAD_IC || | 5969 kind() == LOAD_IC || |
| 5970 kind() == CALL_IC || |
5969 kind() == KEYED_LOAD_IC || | 5971 kind() == KEYED_LOAD_IC || |
5970 kind() == STORE_IC || | 5972 kind() == STORE_IC || |
5971 kind() == KEYED_STORE_IC); | 5973 kind() == KEYED_STORE_IC); |
5972 set_raw_type_feedback_info(Smi::FromInt(value)); | 5974 set_raw_type_feedback_info(Smi::FromInt(value)); |
5973 } | 5975 } |
5974 | 5976 |
5975 | 5977 |
5976 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) | 5978 ACCESSORS(Code, gc_metadata, Object, kGCMetadataOffset) |
5977 INT_ACCESSORS(Code, ic_age, kICAgeOffset) | 5979 INT_ACCESSORS(Code, ic_age, kICAgeOffset) |
5978 | 5980 |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7018 #undef READ_SHORT_FIELD | 7020 #undef READ_SHORT_FIELD |
7019 #undef WRITE_SHORT_FIELD | 7021 #undef WRITE_SHORT_FIELD |
7020 #undef READ_BYTE_FIELD | 7022 #undef READ_BYTE_FIELD |
7021 #undef WRITE_BYTE_FIELD | 7023 #undef WRITE_BYTE_FIELD |
7022 #undef NOBARRIER_READ_BYTE_FIELD | 7024 #undef NOBARRIER_READ_BYTE_FIELD |
7023 #undef NOBARRIER_WRITE_BYTE_FIELD | 7025 #undef NOBARRIER_WRITE_BYTE_FIELD |
7024 | 7026 |
7025 } } // namespace v8::internal | 7027 } } // namespace v8::internal |
7026 | 7028 |
7027 #endif // V8_OBJECTS_INL_H_ | 7029 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |