| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_IC_INL_H_ | 5 #ifndef V8_IC_INL_H_ |
| 6 #define V8_IC_INL_H_ | 6 #define V8_IC_INL_H_ |
| 7 | 7 |
| 8 #include "src/ic.h" | 8 #include "src/ic.h" |
| 9 | 9 |
| 10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return PROTOTYPE_MAP; | 146 return PROTOTYPE_MAP; |
| 147 } | 147 } |
| 148 return OWN_MAP; | 148 return OWN_MAP; |
| 149 } | 149 } |
| 150 | 150 |
| 151 | 151 |
| 152 Handle<Map> IC::GetCodeCacheHolder(InlineCacheHolderFlag flag, | 152 Handle<Map> IC::GetCodeCacheHolder(InlineCacheHolderFlag flag, |
| 153 HeapType* type, | 153 HeapType* type, |
| 154 Isolate* isolate) { | 154 Isolate* isolate) { |
| 155 if (flag == PROTOTYPE_MAP) { | 155 if (flag == PROTOTYPE_MAP) { |
| 156 Context* context = isolate->context()->native_context(); | 156 Context* context = *isolate->native_context(); |
| 157 JSFunction* constructor; | 157 JSFunction* constructor; |
| 158 if (type->Is(HeapType::Boolean())) { | 158 if (type->Is(HeapType::Boolean())) { |
| 159 constructor = context->boolean_function(); | 159 constructor = context->boolean_function(); |
| 160 } else if (type->Is(HeapType::Number())) { | 160 } else if (type->Is(HeapType::Number())) { |
| 161 constructor = context->number_function(); | 161 constructor = context->number_function(); |
| 162 } else if (type->Is(HeapType::String())) { | 162 } else if (type->Is(HeapType::String())) { |
| 163 constructor = context->string_function(); | 163 constructor = context->string_function(); |
| 164 } else { | 164 } else { |
| 165 ASSERT(type->Is(HeapType::Symbol())); | 165 ASSERT(type->Is(HeapType::Symbol())); |
| 166 constructor = context->symbol_function(); | 166 constructor = context->symbol_function(); |
| 167 } | 167 } |
| 168 return handle(JSObject::cast(constructor->instance_prototype())->map()); | 168 return handle(JSObject::cast(constructor->instance_prototype())->map()); |
| 169 } | 169 } |
| 170 return TypeToMap(type, isolate); | 170 return TypeToMap(type, isolate); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | 173 |
| 174 } } // namespace v8::internal | 174 } } // namespace v8::internal |
| 175 | 175 |
| 176 #endif // V8_IC_INL_H_ | 176 #endif // V8_IC_INL_H_ |
| OLD | NEW |