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

Side by Side Diff: src/runtime.cc

Issue 11266011: Delivery logic for Object.observe (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Renamed and added comment Created 8 years, 1 month 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/v8.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 13227 matching lines...) Expand 10 before | Expand all | Expand 10 after
13238 MaybeObject* maybe = obj->map()->Copy(); 13238 MaybeObject* maybe = obj->map()->Copy();
13239 Map* map; 13239 Map* map;
13240 if (!maybe->To(&map)) return maybe; 13240 if (!maybe->To(&map)) return maybe;
13241 map->set_is_observed(is_observed); 13241 map->set_is_observed(is_observed);
13242 obj->set_map(map); 13242 obj->set_map(map);
13243 } 13243 }
13244 return isolate->heap()->undefined_value(); 13244 return isolate->heap()->undefined_value();
13245 } 13245 }
13246 13246
13247 13247
13248 RUNTIME_FUNCTION(MaybeObject*, Runtime_SetObserverDeliveryPending) {
13249 ASSERT(args.length() == 0);
13250 isolate->set_observer_delivery_pending(true);
13251 return isolate->heap()->undefined_value();
13252 }
13253
13254
13248 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) { 13255 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObservationState) {
13249 ASSERT(args.length() == 0); 13256 ASSERT(args.length() == 0);
13250 return isolate->heap()->observation_state(); 13257 return isolate->heap()->observation_state();
13251 } 13258 }
13252 13259
13253 13260
13254 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateObjectHashTable) { 13261 RUNTIME_FUNCTION(MaybeObject*, Runtime_CreateObjectHashTable) {
13255 ASSERT(args.length() == 0); 13262 ASSERT(args.length() == 0);
13256 return ObjectHashTable::Allocate(0); 13263 return ObjectHashTable::Allocate(0);
13257 } 13264 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
13367 // Handle last resort GC and make sure to allow future allocations 13374 // Handle last resort GC and make sure to allow future allocations
13368 // to grow the heap without causing GCs (if possible). 13375 // to grow the heap without causing GCs (if possible).
13369 isolate->counters()->gc_last_resort_from_js()->Increment(); 13376 isolate->counters()->gc_last_resort_from_js()->Increment();
13370 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13377 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13371 "Runtime::PerformGC"); 13378 "Runtime::PerformGC");
13372 } 13379 }
13373 } 13380 }
13374 13381
13375 13382
13376 } } // namespace v8::internal 13383 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698