Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: src/objects.cc

Issue 239113002: Handlifying clients of StringTable, step 1. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« src/heap.cc ('K') | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 10086 matching lines...) Expand 10 before | Expand all | Expand 10 after
10097 return true; 10097 return true;
10098 } 10098 }
10099 if (filter[filter.length() - 1] == '*' && 10099 if (filter[filter.length() - 1] == '*' &&
10100 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) { 10100 name->IsUtf8EqualTo(filter.SubVector(0, filter.length() - 1), true)) {
10101 return true; 10101 return true;
10102 } 10102 }
10103 return false; 10103 return false;
10104 } 10104 }
10105 10105
10106 10106
10107 MaybeObject* Oddball::Initialize(Heap* heap, 10107 void Oddball::Initialize(Isolate* isolate,
10108 const char* to_string, 10108 Handle<Oddball> oddball,
10109 Object* to_number, 10109 const char* to_string,
10110 byte kind) { 10110 Handle<Object> to_number,
10111 String* internalized_to_string; 10111 byte kind) {
10112 { MaybeObject* maybe_string = 10112 Handle<String> internalized_to_string =
10113 heap->InternalizeUtf8String( 10113 isolate->factory()->InternalizeUtf8String(CStrVector(to_string));
10114 CStrVector(to_string)); 10114 oddball->set_to_string(*internalized_to_string);
10115 if (!maybe_string->To(&internalized_to_string)) return maybe_string; 10115 oddball->set_to_number(*to_number);
10116 } 10116 oddball->set_kind(kind);
10117 set_to_string(internalized_to_string);
10118 set_to_number(to_number);
10119 set_kind(kind);
10120 return this;
10121 } 10117 }
10122 10118
10123 10119
10124 String* SharedFunctionInfo::DebugName() { 10120 String* SharedFunctionInfo::DebugName() {
10125 Object* n = name(); 10121 Object* n = name();
10126 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name(); 10122 if (!n->IsString() || String::cast(n)->length() == 0) return inferred_name();
10127 return String::cast(n); 10123 return String::cast(n);
10128 } 10124 }
10129 10125
10130 10126
(...skipping 6474 matching lines...) Expand 10 before | Expand all | Expand 10 after
16605 #define ERROR_MESSAGES_TEXTS(C, T) T, 16601 #define ERROR_MESSAGES_TEXTS(C, T) T,
16606 static const char* error_messages_[] = { 16602 static const char* error_messages_[] = {
16607 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 16603 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
16608 }; 16604 };
16609 #undef ERROR_MESSAGES_TEXTS 16605 #undef ERROR_MESSAGES_TEXTS
16610 return error_messages_[reason]; 16606 return error_messages_[reason];
16611 } 16607 }
16612 16608
16613 16609
16614 } } // namespace v8::internal 16610 } } // namespace v8::internal
OLDNEW
« src/heap.cc ('K') | « src/objects.h ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698