OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 10078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10089 return true; | 10089 return true; |
10090 } | 10090 } |
10091 if (filter[filter.length() - 1] == '*' && | 10091 if (filter[filter.length() - 1] == '*' && |
10092 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { | 10092 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { |
10093 return true; | 10093 return true; |
10094 } | 10094 } |
10095 return false; | 10095 return false; |
10096 } | 10096 } |
10097 | 10097 |
10098 | 10098 |
10099 void Oddball::Initialize(Isolate* isolate, | 10099 MaybeObject* Oddball::Initialize(Heap* heap, |
10100 Handle<Oddball> oddball, | 10100 const char* to_string, |
10101 const char* to_string, | 10101 Object* to_number, |
10102 Handle<Object> to_number, | 10102 byte kind) { |
10103 byte kind) { | 10103 String* internalized_to_string; |
10104 Handle<String> internalized_to_string = | 10104 { MaybeObject* maybe_string = |
10105 isolate->factory()->InternalizeUtf8String(CStrVector(to_string)); | 10105 heap->InternalizeUtf8String( |
10106 oddball->set_to_string(*internalized_to_string); | 10106 CStrVector(to_string)); |
10107 oddball->set_to_number(*to_number); | 10107 if (!maybe_string->To(&internalized_to_string)) return maybe_string; |
10108 oddball->set_kind(kind); | 10108 } |
| 10109 set_to_string(internalized_to_string); |
| 10110 set_to_number(to_number); |
| 10111 set_kind(kind); |
| 10112 return this; |
10109 } | 10113 } |
10110 | 10114 |
10111 | 10115 |
10112 String* SharedFunctionInfo::DebugName() { | 10116 String* SharedFunctionInfo::DebugName() { |
10113 Object* n = name(); | 10117 Object* n = name(); |
10114 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); | 10118 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); |
10115 return String::cast(n); | 10119 return String::cast(n); |
10116 } | 10120 } |
10117 | 10121 |
10118 | 10122 |
(...skipping 4297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14416 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: | 14420 Dictionary<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: |
14417 DeleteProperty( | 14421 DeleteProperty( |
14418 Handle<Dictionary<SeededNumberDictionary, | 14422 Handle<Dictionary<SeededNumberDictionary, |
14419 SeededNumberDictionaryShape, | 14423 SeededNumberDictionaryShape, |
14420 uint32_t> >, | 14424 uint32_t> >, |
14421 int, | 14425 int, |
14422 JSObject::DeleteMode); | 14426 JSObject::DeleteMode); |
14423 | 14427 |
14424 template Handle<NameDictionary> | 14428 template Handle<NameDictionary> |
14425 HashTable<NameDictionary, NameDictionaryShape, Name*>:: | 14429 HashTable<NameDictionary, NameDictionaryShape, Name*>:: |
14426 New(Isolate*, int, MinimumCapacity, PretenureFlag); | |
14427 | |
14428 template Handle<NameDictionary> | |
14429 HashTable<NameDictionary, NameDictionaryShape, Name*>:: | |
14430 Shrink(Handle<NameDictionary>, Name* n); | 14430 Shrink(Handle<NameDictionary>, Name* n); |
14431 | 14431 |
14432 template Handle<SeededNumberDictionary> | 14432 template Handle<SeededNumberDictionary> |
14433 HashTable<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: | 14433 HashTable<SeededNumberDictionary, SeededNumberDictionaryShape, uint32_t>:: |
14434 Shrink(Handle<SeededNumberDictionary>, uint32_t); | 14434 Shrink(Handle<SeededNumberDictionary>, uint32_t); |
14435 | 14435 |
14436 template void Dictionary<NameDictionary, NameDictionaryShape, Name*>:: | 14436 template void Dictionary<NameDictionary, NameDictionaryShape, Name*>:: |
14437 CopyKeysTo( | 14437 CopyKeysTo( |
14438 FixedArray*, | 14438 FixedArray*, |
14439 int, | 14439 int, |
(...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16596 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16596 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16597 static const char* error_messages_[] = { | 16597 static const char* error_messages_[] = { |
16598 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16598 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16599 }; | 16599 }; |
16600 #undef ERROR_MESSAGES_TEXTS | 16600 #undef ERROR_MESSAGES_TEXTS |
16601 return error_messages_[reason]; | 16601 return error_messages_[reason]; |
16602 } | 16602 } |
16603 | 16603 |
16604 | 16604 |
16605 } } // namespace v8::internal | 16605 } } // namespace v8::internal |
OLD | NEW |