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

Side by Side Diff: src/runtime.cc

Issue 218633014: Replace CopyMap(constructor->initial_map()) by Map::Create(constructor) (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
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-heap.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 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 if (key->IsInternalizedString()) { 202 if (key->IsInternalizedString()) {
203 keys->set(index++, key); 203 keys->set(index++, key);
204 } 204 }
205 } 205 }
206 ASSERT(index == number_of_string_keys); 206 ASSERT(index == number_of_string_keys);
207 } 207 }
208 *is_result_from_cache = true; 208 *is_result_from_cache = true;
209 return isolate->factory()->ObjectLiteralMapFromCache(context, keys); 209 return isolate->factory()->ObjectLiteralMapFromCache(context, keys);
210 } 210 }
211 *is_result_from_cache = false; 211 *is_result_from_cache = false;
212 return isolate->factory()->CopyMap( 212 return Map::Create(handle(context->object_function()), number_of_properties);
213 Handle<Map>(context->object_function()->initial_map()),
214 number_of_properties);
215 } 213 }
216 214
217 215
218 static Handle<Object> CreateLiteralBoilerplate( 216 static Handle<Object> CreateLiteralBoilerplate(
219 Isolate* isolate, 217 Isolate* isolate,
220 Handle<FixedArray> literals, 218 Handle<FixedArray> literals,
221 Handle<FixedArray> constant_properties); 219 Handle<FixedArray> constant_properties);
222 220
223 221
224 static Handle<Object> CreateObjectLiteralBoilerplate( 222 static Handle<Object> CreateObjectLiteralBoilerplate(
(...skipping 15006 matching lines...) Expand 10 before | Expand all | Expand 10 after
15231 } 15229 }
15232 } 15230 }
15233 15231
15234 15232
15235 void Runtime::OutOfMemory() { 15233 void Runtime::OutOfMemory() {
15236 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true); 15234 Heap::FatalProcessOutOfMemory("CALL_AND_RETRY_LAST", true);
15237 UNREACHABLE(); 15235 UNREACHABLE();
15238 } 15236 }
15239 15237
15240 } } // namespace v8::internal 15238 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698