| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 // JavaScript builtins, we return uninitialized as the state to | 167 // JavaScript builtins, we return uninitialized as the state to |
| 168 // force the inline cache back to monomorphic state. | 168 // force the inline cache back to monomorphic state. |
| 169 if (receiver->IsJSBuiltinsObject()) { | 169 if (receiver->IsJSBuiltinsObject()) { |
| 170 return UNINITIALIZED; | 170 return UNINITIALIZED; |
| 171 } | 171 } |
| 172 | 172 |
| 173 return MONOMORPHIC; | 173 return MONOMORPHIC; |
| 174 } | 174 } |
| 175 | 175 |
| 176 | 176 |
| 177 RelocMode IC::ComputeMode() { | 177 RelocInfo::Mode IC::ComputeMode() { |
| 178 Address addr = address(); | 178 Address addr = address(); |
| 179 Code* code = Code::cast(Heap::FindCodeObject(addr)); | 179 Code* code = Code::cast(Heap::FindCodeObject(addr)); |
| 180 for (RelocIterator it(code, RelocInfo::kCodeTargetMask); | 180 for (RelocIterator it(code, RelocInfo::kCodeTargetMask); |
| 181 !it.done(); it.next()) { | 181 !it.done(); it.next()) { |
| 182 RelocInfo* info = it.rinfo(); | 182 RelocInfo* info = it.rinfo(); |
| 183 if (info->pc() == addr) return info->rmode(); | 183 if (info->pc() == addr) return info->rmode(); |
| 184 } | 184 } |
| 185 UNREACHABLE(); | 185 UNREACHABLE(); |
| 186 return no_reloc; | 186 return RelocInfo::NONE; |
| 187 } | 187 } |
| 188 | 188 |
| 189 | 189 |
| 190 Failure* IC::TypeError(const char* type, | 190 Failure* IC::TypeError(const char* type, |
| 191 Handle<Object> object, | 191 Handle<Object> object, |
| 192 Handle<String> name) { | 192 Handle<String> name) { |
| 193 HandleScope scope; | 193 HandleScope scope; |
| 194 Handle<Object> args[2] = { name, object }; | 194 Handle<Object> args[2] = { name, object }; |
| 195 Handle<Object> error = Factory::NewTypeError(type, HandleVector(args, 2)); | 195 Handle<Object> error = Factory::NewTypeError(type, HandleVector(args, 2)); |
| 196 return Top::Throw(*error); | 196 return Top::Throw(*error); |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1153 #undef ADDR | 1153 #undef ADDR |
| 1154 }; | 1154 }; |
| 1155 | 1155 |
| 1156 | 1156 |
| 1157 Address IC::AddressFromUtilityId(IC::UtilityId id) { | 1157 Address IC::AddressFromUtilityId(IC::UtilityId id) { |
| 1158 return IC_utilities[id]; | 1158 return IC_utilities[id]; |
| 1159 } | 1159 } |
| 1160 | 1160 |
| 1161 | 1161 |
| 1162 } } // namespace v8::internal | 1162 } } // namespace v8::internal |
| OLD | NEW |