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

Side by Side Diff: src/objects.cc

Issue 422233010: Also mark as prototype when passing in while creating a function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Don't recopy Created 6 years, 4 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/factory.cc ('k') | no next file » | 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 // 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/allocation-site-scopes.h" 8 #include "src/allocation-site-scopes.h"
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 7270 matching lines...) Expand 10 before | Expand all | Expand 10 after
7281 } 7281 }
7282 7282
7283 Handle<Name> name = isolate->factory()->observed_symbol(); 7283 Handle<Name> name = isolate->factory()->observed_symbol();
7284 ConnectTransition(map, new_map, name, FULL_TRANSITION); 7284 ConnectTransition(map, new_map, name, FULL_TRANSITION);
7285 7285
7286 return new_map; 7286 return new_map;
7287 } 7287 }
7288 7288
7289 7289
7290 Handle<Map> Map::CopyAsPrototypeMap(Handle<Map> map) { 7290 Handle<Map> Map::CopyAsPrototypeMap(Handle<Map> map) {
7291 if (map->is_prototype_map()) return map;
7291 Handle<Map> result = Copy(map); 7292 Handle<Map> result = Copy(map);
7292 result->mark_prototype_map(); 7293 result->mark_prototype_map();
7293 return result; 7294 return result;
7294 } 7295 }
7295 7296
7296 7297
7297 Handle<Map> Map::Copy(Handle<Map> map) { 7298 Handle<Map> Map::Copy(Handle<Map> map) {
7298 Handle<DescriptorArray> descriptors(map->instance_descriptors()); 7299 Handle<DescriptorArray> descriptors(map->instance_descriptors());
7299 int number_of_own_descriptors = map->NumberOfOwnDescriptors(); 7300 int number_of_own_descriptors = map->NumberOfOwnDescriptors();
7300 Handle<DescriptorArray> new_descriptors = 7301 Handle<DescriptorArray> new_descriptors =
(...skipping 9749 matching lines...) Expand 10 before | Expand all | Expand 10 after
17050 #define ERROR_MESSAGES_TEXTS(C, T) T, 17051 #define ERROR_MESSAGES_TEXTS(C, T) T,
17051 static const char* error_messages_[] = { 17052 static const char* error_messages_[] = {
17052 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) 17053 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS)
17053 }; 17054 };
17054 #undef ERROR_MESSAGES_TEXTS 17055 #undef ERROR_MESSAGES_TEXTS
17055 return error_messages_[reason]; 17056 return error_messages_[reason];
17056 } 17057 }
17057 17058
17058 17059
17059 } } // namespace v8::internal 17060 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698