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

Side by Side Diff: src/runtime.cc

Issue 57123002: Reland 21774: Generate KeyedLoadGeneric with Hydrogen (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Turn off by default Created 7 years 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 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 5469 matching lines...) Expand 10 before | Expand all | Expand 10 after
5480 boilerplate_object->GetElementsKind(), 5480 boilerplate_object->GetElementsKind(),
5481 transitioned_kind)) { 5481 transitioned_kind)) {
5482 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); 5482 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
5483 } 5483 }
5484 JSObject::TransitionElementsKind(object, transitioned_kind); 5484 JSObject::TransitionElementsKind(object, transitioned_kind);
5485 ASSERT(IsFastDoubleElementsKind(object->GetElementsKind())); 5485 ASSERT(IsFastDoubleElementsKind(object->GetElementsKind()));
5486 FixedDoubleArray* double_array = FixedDoubleArray::cast(object->elements()); 5486 FixedDoubleArray* double_array = FixedDoubleArray::cast(object->elements());
5487 HeapNumber* number = HeapNumber::cast(*value); 5487 HeapNumber* number = HeapNumber::cast(*value);
5488 double_array->set(store_index, number->Number()); 5488 double_array->set(store_index, number->Number());
5489 } else { 5489 } else {
5490 ASSERT(IsFastSmiElementsKind(elements_kind) || 5490 if (!IsFastObjectElementsKind(elements_kind)) {
5491 IsFastDoubleElementsKind(elements_kind)); 5491 ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind)
5492 ElementsKind transitioned_kind = IsFastHoleyElementsKind(elements_kind) 5492 ? FAST_HOLEY_ELEMENTS
5493 ? FAST_HOLEY_ELEMENTS 5493 : FAST_ELEMENTS;
5494 : FAST_ELEMENTS; 5494 JSObject::TransitionElementsKind(object, transitioned_kind);
5495 JSObject::TransitionElementsKind(object, transitioned_kind); 5495 ElementsKind boilerplate_elements_kind =
5496 if (IsMoreGeneralElementsKindTransition( 5496 boilerplate_object->GetElementsKind();
5497 boilerplate_object->GetElementsKind(), 5497 if (IsMoreGeneralElementsKindTransition(boilerplate_elements_kind,
5498 transitioned_kind)) { 5498 transitioned_kind)) {
5499 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind); 5499 JSObject::TransitionElementsKind(boilerplate_object, transitioned_kind);
5500 }
5500 } 5501 }
5501 FixedArray* object_array = FixedArray::cast(object->elements()); 5502 FixedArray* object_array = FixedArray::cast(object->elements());
5502 object_array->set(store_index, *value); 5503 object_array->set(store_index, *value);
5503 } 5504 }
5504 return *object; 5505 return *object;
5505 } 5506 }
5506 5507
5507 5508
5508 // Check whether debugger and is about to step into the callback that is passed 5509 // Check whether debugger and is about to step into the callback that is passed
5509 // to a built-in function such as Array.forEach. 5510 // to a built-in function such as Array.forEach.
(...skipping 9405 matching lines...) Expand 10 before | Expand all | Expand 10 after
14915 // Handle last resort GC and make sure to allow future allocations 14916 // Handle last resort GC and make sure to allow future allocations
14916 // to grow the heap without causing GCs (if possible). 14917 // to grow the heap without causing GCs (if possible).
14917 isolate->counters()->gc_last_resort_from_js()->Increment(); 14918 isolate->counters()->gc_last_resort_from_js()->Increment();
14918 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 14919 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
14919 "Runtime::PerformGC"); 14920 "Runtime::PerformGC");
14920 } 14921 }
14921 } 14922 }
14922 14923
14923 14924
14924 } } // namespace v8::internal 14925 } } // namespace v8::internal
OLDNEW
« src/hydrogen-instructions.cc ('K') | « src/objects.h ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698