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

Side by Side Diff: src/objects.cc

Issue 6602081: Stop using plain Arrays internally in built-in functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Changed header in bootstrapper.cc Created 9 years, 9 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/json.js ('k') | src/regexp.js » ('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 5534 matching lines...) Expand 10 before | Expand all | Expand 10 after
5545 Top::context()->global_context()->initial_object_prototype(); 5545 Top::context()->global_context()->initial_object_prototype();
5546 } else { 5546 } else {
5547 map()->set_non_instance_prototype(false); 5547 map()->set_non_instance_prototype(false);
5548 } 5548 }
5549 5549
5550 return SetInstancePrototype(construct_prototype); 5550 return SetInstancePrototype(construct_prototype);
5551 } 5551 }
5552 5552
5553 5553
5554 Object* JSFunction::RemovePrototype() { 5554 Object* JSFunction::RemovePrototype() {
5555 if (map() == context()->global_context()->function_without_prototype_map()) {
5556 // Be idempotent.
5557 return this;
5558 }
5555 ASSERT(map() == context()->global_context()->function_map()); 5559 ASSERT(map() == context()->global_context()->function_map());
5556 set_map(context()->global_context()->function_without_prototype_map()); 5560 set_map(context()->global_context()->function_without_prototype_map());
5557 set_prototype_or_initial_map(Heap::the_hole_value()); 5561 set_prototype_or_initial_map(Heap::the_hole_value());
5558 return this; 5562 return this;
5559 } 5563 }
5560 5564
5561 5565
5562 Object* JSFunction::SetInstanceClassName(String* name) { 5566 Object* JSFunction::SetInstanceClassName(String* name) {
5563 shared()->set_instance_class_name(name); 5567 shared()->set_instance_class_name(name);
5564 return this; 5568 return this;
(...skipping 4463 matching lines...) Expand 10 before | Expand all | Expand 10 after
10028 if (break_point_objects()->IsUndefined()) return 0; 10032 if (break_point_objects()->IsUndefined()) return 0;
10029 // Single beak point. 10033 // Single beak point.
10030 if (!break_point_objects()->IsFixedArray()) return 1; 10034 if (!break_point_objects()->IsFixedArray()) return 1;
10031 // Multiple break points. 10035 // Multiple break points.
10032 return FixedArray::cast(break_point_objects())->length(); 10036 return FixedArray::cast(break_point_objects())->length();
10033 } 10037 }
10034 #endif 10038 #endif
10035 10039
10036 10040
10037 } } // namespace v8::internal 10041 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/json.js ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698