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

Side by Side Diff: src/objects.cc

Issue 6815029: Merge (7180:7265] from bleeding_edge to the experimental/gc branch.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 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.h ('k') | src/objects-inl.h » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 5524 matching lines...) Expand 10 before | Expand all | Expand 10 after
5535 Top::context()->global_context()->initial_object_prototype(); 5535 Top::context()->global_context()->initial_object_prototype();
5536 } else { 5536 } else {
5537 map()->set_non_instance_prototype(false); 5537 map()->set_non_instance_prototype(false);
5538 } 5538 }
5539 5539
5540 return SetInstancePrototype(construct_prototype); 5540 return SetInstancePrototype(construct_prototype);
5541 } 5541 }
5542 5542
5543 5543
5544 Object* JSFunction::RemovePrototype() { 5544 Object* JSFunction::RemovePrototype() {
5545 if (map() == context()->global_context()->function_without_prototype_map()) { 5545 Context* global_context = context()->global_context();
5546 Map* no_prototype_map = shared()->strict_mode()
5547 ? global_context->strict_mode_function_without_prototype_map()
5548 : global_context->function_without_prototype_map();
5549
5550 if (map() == no_prototype_map) {
5546 // Be idempotent. 5551 // Be idempotent.
5547 return this; 5552 return this;
5548 } 5553 }
5549 ASSERT(map() == context()->global_context()->function_map()); 5554
5550 set_map(context()->global_context()->function_without_prototype_map()); 5555 ASSERT(!shared()->strict_mode() ||
5556 map() == global_context->strict_mode_function_map());
5557 ASSERT(shared()->strict_mode() || map() == global_context->function_map());
5558
5559 set_map(no_prototype_map);
5551 set_prototype_or_initial_map(Heap::the_hole_value()); 5560 set_prototype_or_initial_map(Heap::the_hole_value());
5552 return this; 5561 return this;
5553 } 5562 }
5554 5563
5555 5564
5556 Object* JSFunction::SetInstanceClassName(String* name) { 5565 Object* JSFunction::SetInstanceClassName(String* name) {
5557 shared()->set_instance_class_name(name); 5566 shared()->set_instance_class_name(name);
5558 return this; 5567 return this;
5559 } 5568 }
5560 5569
(...skipping 4487 matching lines...) Expand 10 before | Expand all | Expand 10 after
10048 if (break_point_objects()->IsUndefined()) return 0; 10057 if (break_point_objects()->IsUndefined()) return 0;
10049 // Single beak point. 10058 // Single beak point.
10050 if (!break_point_objects()->IsFixedArray()) return 1; 10059 if (!break_point_objects()->IsFixedArray()) return 1;
10051 // Multiple break points. 10060 // Multiple break points.
10052 return FixedArray::cast(break_point_objects())->length(); 10061 return FixedArray::cast(break_point_objects())->length();
10053 } 10062 }
10054 #endif 10063 #endif
10055 10064
10056 10065
10057 } } // namespace v8::internal 10066 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698