Version 3.9.9
Supported fast case for-in in Crankshaft.
Sped up heap snapshot serialization and dominators construction.
Randomized allocation addresses on windows. (Chromium issue 115151)
Fixed compilation with MinGW-w64. (issue 1943)
Fixed incorrect value of assignments to non-extensible properties.
Fixed a crash bug in generated code on ia32.
Performance and stability improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@10802 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/runtime.cc b/src/runtime.cc
index 15252ed..9597681 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -8590,10 +8590,22 @@
RUNTIME_FUNCTION(MaybeObject*, Runtime_OptimizeFunctionOnNextCall) {
HandleScope scope(isolate);
- ASSERT(args.length() == 1);
+ RUNTIME_ASSERT(args.length() == 1 || args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0);
+
if (!function->IsOptimizable()) return isolate->heap()->undefined_value();
function->MarkForLazyRecompilation();
+
+ Code* unoptimized = function->shared()->code();
+ if (args.length() == 2 &&
+ unoptimized->kind() == Code::FUNCTION) {
+ CONVERT_ARG_HANDLE_CHECKED(String, type, 1);
+ CHECK(type->IsEqualTo(CStrVector("osr")));
+ isolate->runtime_profiler()->AttemptOnStackReplacement(*function);
+ unoptimized->set_allow_osr_at_loop_nesting_level(
+ Code::kMaxLoopNestingMarker);
+ }
+
return isolate->heap()->undefined_value();
}
@@ -10359,30 +10371,6 @@
}
-// DefineAccessor takes an optional final argument which is the
-// property attributes (e.g. DONT_ENUM, DONT_DELETE). IMPORTANT: due
-// to the way accessors are implemented, it is set for both the getter
-// and setter on the first call to DefineAccessor and ignored on
-// subsequent calls.
-RUNTIME_FUNCTION(MaybeObject*, Runtime_DefineAccessor) {
- RUNTIME_ASSERT(args.length() == 4 || args.length() == 5);
- // Compute attributes.
- PropertyAttributes attributes = NONE;
- if (args.length() == 5) {
- CONVERT_SMI_ARG_CHECKED(value, 4);
- // Only attribute bits should be set.
- ASSERT((value & ~(READ_ONLY | DONT_ENUM | DONT_DELETE)) == 0);
- attributes = static_cast<PropertyAttributes>(value);
- }
-
- CONVERT_ARG_CHECKED(JSObject, obj, 0);
- CONVERT_ARG_CHECKED(String, name, 1);
- CONVERT_SMI_ARG_CHECKED(flag, 2);
- CONVERT_ARG_CHECKED(JSFunction, fun, 3);
- return obj->DefineAccessor(name, flag == 0, fun, attributes);
-}
-
-
RUNTIME_FUNCTION(MaybeObject*, Runtime_LookupAccessor) {
ASSERT(args.length() == 3);
CONVERT_ARG_CHECKED(JSObject, obj, 0);