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

Side by Side Diff: src/runtime.cc

Issue 23976010: Handlify JSObject::NormalizeProperties method. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Toon Verwaest. Created 7 years, 3 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') | 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 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 5903 matching lines...) Expand 10 before | Expand all | Expand 10 after
5914 } 5914 }
5915 return function; 5915 return function;
5916 } 5916 }
5917 5917
5918 // Lookup in the initial Object.prototype object. 5918 // Lookup in the initial Object.prototype object.
5919 return isolate->initial_object_prototype()->GetProperty(*key); 5919 return isolate->initial_object_prototype()->GetProperty(*key);
5920 } 5920 }
5921 5921
5922 5922
5923 RUNTIME_FUNCTION(MaybeObject*, Runtime_ToFastProperties) { 5923 RUNTIME_FUNCTION(MaybeObject*, Runtime_ToFastProperties) {
5924 SealHandleScope shs(isolate); 5924 HandleScope scope(isolate);
5925 ASSERT(args.length() == 1); 5925 ASSERT(args.length() == 1);
5926 Object* object = args[0]; 5926 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
5927 return (object->IsJSObject() && !object->IsGlobalObject()) 5927 if (object->IsJSObject() && !object->IsGlobalObject()) {
5928 ? JSObject::cast(object)->TransformToFastProperties(0) 5928 JSObject::TransformToFastProperties(Handle<JSObject>::cast(object), 0);
5929 : object; 5929 }
5930 return *object;
5930 } 5931 }
5931 5932
5932 5933
5933 RUNTIME_FUNCTION(MaybeObject*, Runtime_ToBool) { 5934 RUNTIME_FUNCTION(MaybeObject*, Runtime_ToBool) {
5934 SealHandleScope shs(isolate); 5935 SealHandleScope shs(isolate);
5935 ASSERT(args.length() == 1); 5936 ASSERT(args.length() == 1);
5936 5937
5937 return isolate->heap()->ToBoolean(args[0]->BooleanValue()); 5938 return isolate->heap()->ToBoolean(args[0]->BooleanValue());
5938 } 5939 }
5939 5940
(...skipping 8859 matching lines...) Expand 10 before | Expand all | Expand 10 after
14799 // Handle last resort GC and make sure to allow future allocations 14800 // Handle last resort GC and make sure to allow future allocations
14800 // to grow the heap without causing GCs (if possible). 14801 // to grow the heap without causing GCs (if possible).
14801 isolate->counters()->gc_last_resort_from_js()->Increment(); 14802 isolate->counters()->gc_last_resort_from_js()->Increment();
14802 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14803 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14803 "Runtime::PerformGC"); 14804 "Runtime::PerformGC");
14804 } 14805 }
14805 } 14806 }
14806 14807
14807 14808
14808 } } // namespace v8::internal 14809 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698