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

Side by Side Diff: src/runtime.cc

Issue 11274014: Store Object.observe state per-isolate rather than per-context (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: More tests 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
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 13204 matching lines...) Expand 10 before | Expand all | Expand 10 after
13215 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION 13215 #undef ELEMENTS_KIND_CHECK_RUNTIME_FUNCTION
13216 13216
13217 13217
13218 RUNTIME_FUNCTION(MaybeObject*, Runtime_HaveSameMap) { 13218 RUNTIME_FUNCTION(MaybeObject*, Runtime_HaveSameMap) {
13219 ASSERT(args.length() == 2); 13219 ASSERT(args.length() == 2);
13220 CONVERT_ARG_CHECKED(JSObject, obj1, 0); 13220 CONVERT_ARG_CHECKED(JSObject, obj1, 0);
13221 CONVERT_ARG_CHECKED(JSObject, obj2, 1); 13221 CONVERT_ARG_CHECKED(JSObject, obj2, 1);
13222 return isolate->heap()->ToBoolean(obj1->map() == obj2->map()); 13222 return isolate->heap()->ToBoolean(obj1->map() == obj2->map());
13223 } 13223 }
13224 13224
13225
13226 RUNTIME_FUNCTION(MaybeObject*, Runtime_GetObjectObservationState) {
13227 ASSERT(args.length() == 0);
13228 return isolate->heap()->object_observation_state();
13229 }
13230
13225 // ---------------------------------------------------------------------------- 13231 // ----------------------------------------------------------------------------
13226 // Implementation of Runtime 13232 // Implementation of Runtime
13227 13233
13228 #define F(name, number_of_args, result_size) \ 13234 #define F(name, number_of_args, result_size) \
13229 { Runtime::k##name, Runtime::RUNTIME, #name, \ 13235 { Runtime::k##name, Runtime::RUNTIME, #name, \
13230 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size }, 13236 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size },
13231 13237
13232 13238
13233 #define I(name, number_of_args, result_size) \ 13239 #define I(name, number_of_args, result_size) \
13234 { Runtime::kInline##name, Runtime::INLINE, \ 13240 { Runtime::kInline##name, Runtime::INLINE, \
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
13301 // Handle last resort GC and make sure to allow future allocations 13307 // Handle last resort GC and make sure to allow future allocations
13302 // to grow the heap without causing GCs (if possible). 13308 // to grow the heap without causing GCs (if possible).
13303 isolate->counters()->gc_last_resort_from_js()->Increment(); 13309 isolate->counters()->gc_last_resort_from_js()->Increment();
13304 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags, 13310 isolate->heap()->CollectAllGarbage(Heap::kNoGCFlags,
13305 "Runtime::PerformGC"); 13311 "Runtime::PerformGC");
13306 } 13312 }
13307 } 13313 }
13308 13314
13309 13315
13310 } } // namespace v8::internal 13316 } } // namespace v8::internal
OLDNEW
« src/object-observe.js ('K') | « src/runtime.h ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698