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

Side by Side Diff: src/runtime.cc

Issue 39128: Merge revisions 1412 and 1416 from bleeding_edge to trunk... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 11 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/parser.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 if (key->Equals(Heap::length_symbol())) return Smi::FromInt(n); 2157 if (key->Equals(Heap::length_symbol())) return Smi::FromInt(n);
2158 if (key->Equals(Heap::callee_symbol())) return frame->function(); 2158 if (key->Equals(Heap::callee_symbol())) return frame->function();
2159 2159
2160 // Lookup in the initial Object.prototype object. 2160 // Lookup in the initial Object.prototype object.
2161 return Top::initial_object_prototype()->GetProperty(*key); 2161 return Top::initial_object_prototype()->GetProperty(*key);
2162 } 2162 }
2163 2163
2164 2164
2165 static Object* Runtime_ToFastProperties(Arguments args) { 2165 static Object* Runtime_ToFastProperties(Arguments args) {
2166 ASSERT(args.length() == 1); 2166 ASSERT(args.length() == 1);
2167 CONVERT_ARG_CHECKED(JSObject, object, 0); 2167 Handle<Object> object = args.at<Object>(0);
2168 object->TransformToFastProperties(0); 2168 if (object->IsJSObject()) {
2169 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
2170 js_object->TransformToFastProperties(0);
2171 }
2169 return *object; 2172 return *object;
2170 } 2173 }
2171 2174
2172 2175
2173 static Object* Runtime_ToSlowProperties(Arguments args) { 2176 static Object* Runtime_ToSlowProperties(Arguments args) {
2174 ASSERT(args.length() == 1); 2177 ASSERT(args.length() == 1);
2175 CONVERT_ARG_CHECKED(JSObject, object, 0); 2178 Handle<Object> object = args.at<Object>(0);
2176 object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES); 2179 if (object->IsJSObject()) {
2180 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
2181 js_object->NormalizeProperties(CLEAR_INOBJECT_PROPERTIES);
2182 }
2177 return *object; 2183 return *object;
2178 } 2184 }
2179 2185
2180 2186
2181 static Object* Runtime_ToBool(Arguments args) { 2187 static Object* Runtime_ToBool(Arguments args) {
2182 NoHandleAllocation ha; 2188 NoHandleAllocation ha;
2183 ASSERT(args.length() == 1); 2189 ASSERT(args.length() == 1);
2184 2190
2185 return args[0]->ToBoolean(); 2191 return args[0]->ToBoolean();
2186 } 2192 }
(...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after
6123 } else { 6129 } else {
6124 // Handle last resort GC and make sure to allow future allocations 6130 // Handle last resort GC and make sure to allow future allocations
6125 // to grow the heap without causing GCs (if possible). 6131 // to grow the heap without causing GCs (if possible).
6126 Counters::gc_last_resort_from_js.Increment(); 6132 Counters::gc_last_resort_from_js.Increment();
6127 Heap::CollectAllGarbage(); 6133 Heap::CollectAllGarbage();
6128 } 6134 }
6129 } 6135 }
6130 6136
6131 6137
6132 } } // namespace v8::internal 6138 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698