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

Side by Side Diff: src/runtime.cc

Issue 11659022: Generate the TransitionElementsStub using Crankshaft (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review feedback Created 7 years, 10 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/runtime.h ('k') | src/serialize.cc » ('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 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 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4370 4370
4371 return Runtime::SetObjectProperty(isolate, 4371 return Runtime::SetObjectProperty(isolate,
4372 object, 4372 object,
4373 key, 4373 key,
4374 value, 4374 value,
4375 attributes, 4375 attributes,
4376 strict_mode); 4376 strict_mode);
4377 } 4377 }
4378 4378
4379 4379
4380 RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsKind) {
4381 HandleScope scope(isolate);
4382 RUNTIME_ASSERT(args.length() == 2);
4383 CONVERT_ARG_HANDLE_CHECKED(JSArray, array, 0);
4384 CONVERT_ARG_HANDLE_CHECKED(Map, map, 1);
4385 JSObject::TransitionElementsKind(array, map->elements_kind());
4386 return *array;
4387 }
4388
4389
4380 RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsSmiToDouble) { 4390 RUNTIME_FUNCTION(MaybeObject*, Runtime_TransitionElementsSmiToDouble) {
4381 NoHandleAllocation ha; 4391 NoHandleAllocation ha;
4382 RUNTIME_ASSERT(args.length() == 1); 4392 RUNTIME_ASSERT(args.length() == 1);
4383 Handle<Object> object = args.at<Object>(0); 4393 Handle<Object> object = args.at<Object>(0);
4384 if (object->IsJSObject()) { 4394 if (object->IsJSObject()) {
4385 Handle<JSObject> js_object(Handle<JSObject>::cast(object)); 4395 Handle<JSObject> js_object(Handle<JSObject>::cast(object));
4386 ASSERT(!js_object->map()->is_observed()); 4396 ASSERT(!js_object->map()->is_observed());
4387 ElementsKind new_kind = js_object->HasFastHoleyElements() 4397 ElementsKind new_kind = js_object->HasFastHoleyElements()
4388 ? FAST_HOLEY_DOUBLE_ELEMENTS 4398 ? FAST_HOLEY_DOUBLE_ELEMENTS
4389 : FAST_DOUBLE_ELEMENTS; 4399 : FAST_DOUBLE_ELEMENTS;
(...skipping 9127 matching lines...) Expand 10 before | Expand all | Expand 10 after
13517 // Handle last resort GC and make sure to allow future allocations 13527 // Handle last resort GC and make sure to allow future allocations
13518 // to grow the heap without causing GCs (if possible). 13528 // to grow the heap without causing GCs (if possible).
13519 isolate->counters()->gc_last_resort_from_js()->Increment(); 13529 isolate->counters()->gc_last_resort_from_js()->Increment();
13520 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13530 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13521 "Runtime::PerformGC"); 13531 "Runtime::PerformGC");
13522 } 13532 }
13523 } 13533 }
13524 13534
13525 13535
13526 } } // namespace v8::internal 13536 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698