| 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 3438 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3449   return ExtractArgumentsCountFromFlags(flags()); |  3449   return ExtractArgumentsCountFromFlags(flags()); | 
|  3450 } |  3450 } | 
|  3451  |  3451  | 
|  3452  |  3452  | 
|  3453 int Code::major_key() { |  3453 int Code::major_key() { | 
|  3454   ASSERT(kind() == STUB || |  3454   ASSERT(kind() == STUB || | 
|  3455          kind() == COMPILED_STUB || |  3455          kind() == COMPILED_STUB || | 
|  3456          kind() == UNARY_OP_IC || |  3456          kind() == UNARY_OP_IC || | 
|  3457          kind() == BINARY_OP_IC || |  3457          kind() == BINARY_OP_IC || | 
|  3458          kind() == COMPARE_IC || |  3458          kind() == COMPARE_IC || | 
 |  3459          kind() == LOAD_IC || | 
 |  3460          kind() == KEYED_LOAD_IC || | 
|  3459          kind() == TO_BOOLEAN_IC); |  3461          kind() == TO_BOOLEAN_IC); | 
|  3460   return StubMajorKeyField::decode( |  3462   return StubMajorKeyField::decode( | 
|  3461       READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); |  3463       READ_UINT32_FIELD(this, kKindSpecificFlags2Offset)); | 
|  3462 } |  3464 } | 
|  3463  |  3465  | 
|  3464  |  3466  | 
|  3465 void Code::set_major_key(int major) { |  3467 void Code::set_major_key(int major) { | 
|  3466   ASSERT(kind() == STUB || |  3468   ASSERT(kind() == STUB || | 
|  3467          kind() == COMPILED_STUB || |  3469          kind() == COMPILED_STUB || | 
|  3468          kind() == UNARY_OP_IC || |  3470          kind() == UNARY_OP_IC || | 
|  3469          kind() == BINARY_OP_IC || |  3471          kind() == BINARY_OP_IC || | 
|  3470          kind() == COMPARE_IC || |  3472          kind() == COMPARE_IC || | 
 |  3473          kind() == LOAD_IC || | 
 |  3474          kind() == KEYED_LOAD_IC || | 
|  3471          kind() == TO_BOOLEAN_IC); |  3475          kind() == TO_BOOLEAN_IC); | 
|  3472   ASSERT(0 <= major && major < 256); |  3476   ASSERT(0 <= major && major < 256); | 
|  3473   int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); |  3477   int previous = READ_UINT32_FIELD(this, kKindSpecificFlags2Offset); | 
|  3474   int updated = StubMajorKeyField::update(previous, major); |  3478   int updated = StubMajorKeyField::update(previous, major); | 
|  3475   WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); |  3479   WRITE_UINT32_FIELD(this, kKindSpecificFlags2Offset, updated); | 
|  3476 } |  3480 } | 
|  3477  |  3481  | 
|  3478  |  3482  | 
|  3479 bool Code::is_pregenerated() { |  3483 bool Code::is_pregenerated() { | 
|  3480   return kind() == STUB && IsPregeneratedField::decode(flags()); |  3484   return kind() == STUB && IsPregeneratedField::decode(flags()); | 
| (...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4840  |  4844  | 
|  4841 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { |  4845 void Code::set_type_feedback_info(Object* value, WriteBarrierMode mode) { | 
|  4842   ASSERT(kind() == FUNCTION); |  4846   ASSERT(kind() == FUNCTION); | 
|  4843   WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |  4847   WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); | 
|  4844   CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, |  4848   CONDITIONAL_WRITE_BARRIER(GetHeap(), this, kTypeFeedbackInfoOffset, | 
|  4845                             value, mode); |  4849                             value, mode); | 
|  4846 } |  4850 } | 
|  4847  |  4851  | 
|  4848  |  4852  | 
|  4849 int Code::stub_info() { |  4853 int Code::stub_info() { | 
|  4850   ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC); |  4854   ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC || kind() == LOAD_IC); | 
|  4851   Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); |  4855   Object* value = READ_FIELD(this, kTypeFeedbackInfoOffset); | 
|  4852   return Smi::cast(value)->value(); |  4856   return Smi::cast(value)->value(); | 
|  4853 } |  4857 } | 
|  4854  |  4858  | 
|  4855  |  4859  | 
|  4856 void Code::set_stub_info(int value) { |  4860 void Code::set_stub_info(int value) { | 
|  4857   ASSERT(kind() == COMPARE_IC || kind() == BINARY_OP_IC); |  4861   ASSERT(kind() == COMPARE_IC || | 
 |  4862          kind() == BINARY_OP_IC || | 
 |  4863          kind() == LOAD_IC || | 
 |  4864          kind() == KEYED_LOAD_IC); | 
|  4858   WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); |  4865   WRITE_FIELD(this, kTypeFeedbackInfoOffset, Smi::FromInt(value)); | 
|  4859 } |  4866 } | 
|  4860  |  4867  | 
|  4861  |  4868  | 
|  4862 void Code::set_deoptimizing_functions(Object* value) { |  4869 void Code::set_deoptimizing_functions(Object* value) { | 
|  4863   ASSERT(kind() == OPTIMIZED_FUNCTION); |  4870   ASSERT(kind() == OPTIMIZED_FUNCTION); | 
|  4864   WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); |  4871   WRITE_FIELD(this, kTypeFeedbackInfoOffset, value); | 
|  4865 } |  4872 } | 
|  4866  |  4873  | 
|  4867  |  4874  | 
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5810 #undef WRITE_UINT32_FIELD |  5817 #undef WRITE_UINT32_FIELD | 
|  5811 #undef READ_SHORT_FIELD |  5818 #undef READ_SHORT_FIELD | 
|  5812 #undef WRITE_SHORT_FIELD |  5819 #undef WRITE_SHORT_FIELD | 
|  5813 #undef READ_BYTE_FIELD |  5820 #undef READ_BYTE_FIELD | 
|  5814 #undef WRITE_BYTE_FIELD |  5821 #undef WRITE_BYTE_FIELD | 
|  5815  |  5822  | 
|  5816  |  5823  | 
|  5817 } }  // namespace v8::internal |  5824 } }  // namespace v8::internal | 
|  5818  |  5825  | 
|  5819 #endif  // V8_OBJECTS_INL_H_ |  5826 #endif  // V8_OBJECTS_INL_H_ | 
| OLD | NEW |