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

Side by Side Diff: src/runtime.cc

Issue 21536003: Migrate instance of deprecated maps in HCheckMaps. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 7 years, 4 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 13462 matching lines...) Expand 10 before | Expand all | Expand 10 after
13473 13473
13474 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) { 13474 RUNTIME_FUNCTION(MaybeObject*, Runtime_FlattenString) {
13475 HandleScope scope(isolate); 13475 HandleScope scope(isolate);
13476 ASSERT(args.length() == 1); 13476 ASSERT(args.length() == 1);
13477 CONVERT_ARG_HANDLE_CHECKED(String, str, 0); 13477 CONVERT_ARG_HANDLE_CHECKED(String, str, 0);
13478 FlattenString(str); 13478 FlattenString(str);
13479 return isolate->heap()->undefined_value(); 13479 return isolate->heap()->undefined_value();
13480 } 13480 }
13481 13481
13482 13482
13483 RUNTIME_FUNCTION(MaybeObject*, Runtime_MigrateInstance) {
13484 HandleScope scope(isolate);
13485 ASSERT(args.length() == 1);
13486 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0);
13487 if (!object->IsJSObject()) return Smi::FromInt(0);
13488 Handle<JSObject> js_object = Handle<JSObject>::cast(object);
13489 if (!js_object->map()->is_deprecated()) return Smi::FromInt(0);
13490 JSObject::MigrateInstance(js_object);
13491 return *object;
13492 }
13493
13494
13483 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) { 13495 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFromCache) {
13484 SealHandleScope shs(isolate); 13496 SealHandleScope shs(isolate);
13485 // This is only called from codegen, so checks might be more lax. 13497 // This is only called from codegen, so checks might be more lax.
13486 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0); 13498 CONVERT_ARG_CHECKED(JSFunctionResultCache, cache, 0);
13487 Object* key = args[1]; 13499 Object* key = args[1];
13488 13500
13489 int finger_index = cache->finger_index(); 13501 int finger_index = cache->finger_index();
13490 Object* o = cache->get(finger_index); 13502 Object* o = cache->get(finger_index);
13491 if (o == key) { 13503 if (o == key) {
13492 // The fastest case: hit the same place again. 13504 // The fastest case: hit the same place again.
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
13953 // Handle last resort GC and make sure to allow future allocations 13965 // Handle last resort GC and make sure to allow future allocations
13954 // to grow the heap without causing GCs (if possible). 13966 // to grow the heap without causing GCs (if possible).
13955 isolate->counters()->gc_last_resort_from_js()->Increment(); 13967 isolate->counters()->gc_last_resort_from_js()->Increment();
13956 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13968 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13957 "Runtime::PerformGC"); 13969 "Runtime::PerformGC");
13958 } 13970 }
13959 } 13971 }
13960 13972
13961 13973
13962 } } // namespace v8::internal 13974 } } // 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