OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2091 } | 2091 } |
2092 } | 2092 } |
2093 if (type == TRBinaryOpIC::INT32 && | 2093 if (type == TRBinaryOpIC::INT32 && |
2094 previous_type == TRBinaryOpIC::INT32) { | 2094 previous_type == TRBinaryOpIC::INT32) { |
2095 // We must be here because an operation on two INT32 types overflowed. | 2095 // We must be here because an operation on two INT32 types overflowed. |
2096 result_type = TRBinaryOpIC::HEAP_NUMBER; | 2096 result_type = TRBinaryOpIC::HEAP_NUMBER; |
2097 } | 2097 } |
2098 | 2098 |
2099 Handle<Code> code = GetTypeRecordingBinaryOpStub(key, type, result_type); | 2099 Handle<Code> code = GetTypeRecordingBinaryOpStub(key, type, result_type); |
2100 if (!code.is_null()) { | 2100 if (!code.is_null()) { |
2101 TRBinaryOpIC ic; | |
2102 ic.patch(*code); | |
2103 if (FLAG_trace_ic) { | 2101 if (FLAG_trace_ic) { |
2104 PrintF("[TypeRecordingBinaryOpIC (%s->(%s->%s))#%s]\n", | 2102 PrintF("[TypeRecordingBinaryOpIC (%s->(%s->%s))#%s]\n", |
2105 TRBinaryOpIC::GetName(previous_type), | 2103 TRBinaryOpIC::GetName(previous_type), |
2106 TRBinaryOpIC::GetName(type), | 2104 TRBinaryOpIC::GetName(type), |
2107 TRBinaryOpIC::GetName(result_type), | 2105 TRBinaryOpIC::GetName(result_type), |
2108 Token::Name(op)); | 2106 Token::Name(op)); |
2109 } | 2107 } |
| 2108 TRBinaryOpIC ic; |
| 2109 ic.patch(*code); |
2110 | 2110 |
2111 // Activate inlined smi code. | 2111 // Activate inlined smi code. |
2112 if (previous_type == TRBinaryOpIC::UNINITIALIZED) { | 2112 if (previous_type == TRBinaryOpIC::UNINITIALIZED) { |
2113 PatchInlinedSmiCode(ic.address()); | 2113 PatchInlinedSmiCode(ic.address()); |
2114 } | 2114 } |
2115 } | 2115 } |
2116 | 2116 |
2117 Handle<JSBuiltinsObject> builtins = Top::builtins(); | 2117 Handle<JSBuiltinsObject> builtins = Top::builtins(); |
2118 Object* builtin = NULL; // Initialization calms down the compiler. | 2118 Object* builtin = NULL; // Initialization calms down the compiler. |
2119 switch (op) { | 2119 switch (op) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2230 #undef ADDR | 2230 #undef ADDR |
2231 }; | 2231 }; |
2232 | 2232 |
2233 | 2233 |
2234 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 2234 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
2235 return IC_utilities[id]; | 2235 return IC_utilities[id]; |
2236 } | 2236 } |
2237 | 2237 |
2238 | 2238 |
2239 } } // namespace v8::internal | 2239 } } // namespace v8::internal |
OLD | NEW |