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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 } | 276 } |
277 | 277 |
278 | 278 |
279 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( | 279 Handle<JSObject> TypeFeedbackOracle::GetPrototypeForPrimitiveCheck( |
280 CheckType check) { | 280 CheckType check) { |
281 JSFunction* function = NULL; | 281 JSFunction* function = NULL; |
282 switch (check) { | 282 switch (check) { |
283 case RECEIVER_MAP_CHECK: | 283 case RECEIVER_MAP_CHECK: |
284 UNREACHABLE(); | 284 UNREACHABLE(); |
285 break; | 285 break; |
286 case SYMBOL_CHECK: | |
287 return Handle<JSObject>(native_context_->symbol_delegate()); | |
288 case STRING_CHECK: | 286 case STRING_CHECK: |
289 function = native_context_->string_function(); | 287 function = native_context_->string_function(); |
290 break; | 288 break; |
| 289 case SYMBOL_CHECK: |
| 290 function = native_context_->symbol_function(); |
| 291 break; |
291 case NUMBER_CHECK: | 292 case NUMBER_CHECK: |
292 function = native_context_->number_function(); | 293 function = native_context_->number_function(); |
293 break; | 294 break; |
294 case BOOLEAN_CHECK: | 295 case BOOLEAN_CHECK: |
295 function = native_context_->boolean_function(); | 296 function = native_context_->boolean_function(); |
296 break; | 297 break; |
297 } | 298 } |
298 ASSERT(function != NULL); | 299 ASSERT(function != NULL); |
299 return Handle<JSObject>(JSObject::cast(function->instance_prototype())); | 300 return Handle<JSObject>(JSObject::cast(function->instance_prototype())); |
300 } | 301 } |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 USE(maybe_result); | 759 USE(maybe_result); |
759 #ifdef DEBUG | 760 #ifdef DEBUG |
760 Object* result = NULL; | 761 Object* result = NULL; |
761 // Dictionary has been allocated with sufficient size for all elements. | 762 // Dictionary has been allocated with sufficient size for all elements. |
762 ASSERT(maybe_result->ToObject(&result)); | 763 ASSERT(maybe_result->ToObject(&result)); |
763 ASSERT(*dictionary_ == result); | 764 ASSERT(*dictionary_ == result); |
764 #endif | 765 #endif |
765 } | 766 } |
766 | 767 |
767 } } // namespace v8::internal | 768 } } // namespace v8::internal |
OLD | NEW |