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

Side by Side Diff: src/objects.cc

Issue 6711027: [Isolates] Merge 7201:7258 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: 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
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 5620 matching lines...) Expand 10 before | Expand all | Expand 10 after
5631 initial_object_prototype(); 5631 initial_object_prototype();
5632 } else { 5632 } else {
5633 map()->set_non_instance_prototype(false); 5633 map()->set_non_instance_prototype(false);
5634 } 5634 }
5635 5635
5636 return SetInstancePrototype(construct_prototype); 5636 return SetInstancePrototype(construct_prototype);
5637 } 5637 }
5638 5638
5639 5639
5640 Object* JSFunction::RemovePrototype() { 5640 Object* JSFunction::RemovePrototype() {
5641 if (map() == context()->global_context()->function_without_prototype_map()) { 5641 Context* global_context = context()->global_context();
5642 Map* no_prototype_map = shared()->strict_mode()
5643 ? global_context->strict_mode_function_without_prototype_map()
5644 : global_context->function_without_prototype_map();
5645
5646 if (map() == no_prototype_map) {
5642 // Be idempotent. 5647 // Be idempotent.
5643 return this; 5648 return this;
5644 } 5649 }
5645 ASSERT(map() == context()->global_context()->function_map()); 5650
5646 Heap* heap = GetHeap(); 5651 ASSERT(!shared()->strict_mode() ||
5647 set_map(context()->global_context()->function_without_prototype_map()); 5652 map() == global_context->strict_mode_function_map());
5648 set_prototype_or_initial_map(heap->the_hole_value()); 5653 ASSERT(shared()->strict_mode() || map() == global_context->function_map());
5654
5655 set_map(no_prototype_map);
5656 set_prototype_or_initial_map(GetHeap()->the_hole_value());
5649 return this; 5657 return this;
5650 } 5658 }
5651 5659
5652 5660
5653 Object* JSFunction::SetInstanceClassName(String* name) { 5661 Object* JSFunction::SetInstanceClassName(String* name) {
5654 shared()->set_instance_class_name(name); 5662 shared()->set_instance_class_name(name);
5655 return this; 5663 return this;
5656 } 5664 }
5657 5665
5658 5666
(...skipping 4495 matching lines...) Expand 10 before | Expand all | Expand 10 after
10154 if (break_point_objects()->IsUndefined()) return 0; 10162 if (break_point_objects()->IsUndefined()) return 0;
10155 // Single beak point. 10163 // Single beak point.
10156 if (!break_point_objects()->IsFixedArray()) return 1; 10164 if (!break_point_objects()->IsFixedArray()) return 1;
10157 // Multiple break points. 10165 // Multiple break points.
10158 return FixedArray::cast(break_point_objects())->length(); 10166 return FixedArray::cast(break_point_objects())->length();
10159 } 10167 }
10160 #endif 10168 #endif
10161 10169
10162 10170
10163 } } // namespace v8::internal 10171 } } // namespace v8::internal
OLDNEW
« src/global-handles.cc ('K') | « src/messages.js ('k') | src/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698