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

Side by Side Diff: src/runtime.cc

Issue 213213002: Fix LoadFieldByIndex to take mutable heap-numbers into account. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nit Created 6 years, 8 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/x64/lithium-codegen-x64.h » ('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 14529 matching lines...) Expand 10 before | Expand all | Expand 10 after
14540 14540
14541 14541
14542 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyContextDisposed) { 14542 RUNTIME_FUNCTION(MaybeObject*, Runtime_NotifyContextDisposed) {
14543 HandleScope scope(isolate); 14543 HandleScope scope(isolate);
14544 ASSERT(args.length() == 0); 14544 ASSERT(args.length() == 0);
14545 isolate->heap()->NotifyContextDisposed(); 14545 isolate->heap()->NotifyContextDisposed();
14546 return isolate->heap()->undefined_value(); 14546 return isolate->heap()->undefined_value();
14547 } 14547 }
14548 14548
14549 14549
14550 RUNTIME_FUNCTION(MaybeObject*, Runtime_LoadMutableDouble) {
14551 HandleScope scope(isolate);
14552 ASSERT(args.length() == 2);
14553 CONVERT_ARG_HANDLE_CHECKED(JSObject, object, 0);
14554 CONVERT_ARG_HANDLE_CHECKED(Smi, index, 1);
14555 int idx = index->value() >> 1;
14556 if (idx < 0) {
14557 idx = -idx + object->map()->inobject_properties() - 1;
14558 }
14559 return *JSObject::FastPropertyAt(object, Representation::Double(), idx);
14560 }
14561
14562
14550 RUNTIME_FUNCTION(MaybeObject*, Runtime_TryMigrateInstance) { 14563 RUNTIME_FUNCTION(MaybeObject*, Runtime_TryMigrateInstance) {
14551 HandleScope scope(isolate); 14564 HandleScope scope(isolate);
14552 ASSERT(args.length() == 1); 14565 ASSERT(args.length() == 1);
14553 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); 14566 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
14554 if (!object->IsJSObject()) return Smi::FromInt(0); 14567 if (!object->IsJSObject()) return Smi::FromInt(0);
14555 Handle<JSObject> js_object = Handle<JSObject>::cast(object); 14568 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
14556 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0); 14569 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
14557 // This call must not cause lazy deopts, because it's called from deferred 14570 // This call must not cause lazy deopts, because it's called from deferred
14558 // code where we can't handle lazy deopts for lack of a suitable bailout 14571 // code where we can't handle lazy deopts for lack of a suitable bailout
14559 // ID. So we just try migration and signal failure if necessary, 14572 // ID. So we just try migration and signal failure if necessary,
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
15169 // Handle last resort GC and make sure to allow future allocations 15182 // Handle last resort GC and make sure to allow future allocations
15170 // to grow the heap without causing GCs (if possible). 15183 // to grow the heap without causing GCs (if possible).
15171 isolate->counters()->gc_last_resort_from_js()->Increment(); 15184 isolate->counters()->gc_last_resort_from_js()->Increment();
15172 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 15185 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
15173 "Runtime::PerformGC"); 15186 "Runtime::PerformGC");
15174 } 15187 }
15175 } 15188 }
15176 15189
15177 15190
15178 } } // namespace v8::internal 15191 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/lithium-codegen-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698