Update V8 to r7079 as required by WebKit r80534.
Change-Id: I487c152e485d5a40b68997d7c0d2f1fba5da0834
diff --git a/src/handles.cc b/src/handles.cc
index d625d64..efef095 100644
--- a/src/handles.cc
+++ b/src/handles.cc
@@ -242,17 +242,21 @@
Handle<Object> SetProperty(Handle<JSObject> object,
Handle<String> key,
Handle<Object> value,
- PropertyAttributes attributes) {
- CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes), Object);
+ PropertyAttributes attributes,
+ StrictModeFlag strict_mode) {
+ CALL_HEAP_FUNCTION(object->SetProperty(*key, *value, attributes, strict_mode),
+ Object);
}
Handle<Object> SetProperty(Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes,
+ StrictModeFlag strict_mode) {
CALL_HEAP_FUNCTION(
- Runtime::SetObjectProperty(object, key, value, attributes), Object);
+ Runtime::SetObjectProperty(object, key, value, attributes, strict_mode),
+ Object);
}
@@ -261,7 +265,9 @@
Handle<Object> value,
PropertyAttributes attributes) {
CALL_HEAP_FUNCTION(
- Runtime::ForceSetObjectProperty(object, key, value, attributes), Object);
+ Runtime::ForceSetObjectProperty(
+ object, key, value, attributes),
+ Object);
}
@@ -304,10 +310,12 @@
Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object,
Handle<String> key,
Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes,
+ StrictModeFlag strict_mode) {
CALL_HEAP_FUNCTION(object->SetPropertyWithInterceptor(*key,
*value,
- attributes),
+ attributes,
+ strict_mode),
Object);
}
@@ -420,7 +428,8 @@
Handle<Object> SetElement(Handle<JSObject> object,
uint32_t index,
- Handle<Object> value) {
+ Handle<Object> value,
+ StrictModeFlag strict_mode) {
if (object->HasPixelElements() || object->HasExternalArrayElements()) {
if (!value->IsSmi() && !value->IsHeapNumber() && !value->IsUndefined()) {
bool has_exception;
@@ -429,16 +438,18 @@
value = number;
}
}
- CALL_HEAP_FUNCTION(object->SetElement(index, *value), Object);
+ CALL_HEAP_FUNCTION(object->SetElement(index, *value, strict_mode), Object);
}
Handle<Object> SetOwnElement(Handle<JSObject> object,
uint32_t index,
- Handle<Object> value) {
+ Handle<Object> value,
+ StrictModeFlag strict_mode) {
ASSERT(!object->HasPixelElements());
ASSERT(!object->HasExternalArrayElements());
- CALL_HEAP_FUNCTION(object->SetElement(index, *value, false), Object);
+ CALL_HEAP_FUNCTION(object->SetElement(index, *value, strict_mode, false),
+ Object);
}
@@ -834,49 +845,41 @@
}
-bool CompileLazy(Handle<JSFunction> function,
- ClearExceptionFlag flag) {
+static bool CompileLazyFunction(Handle<JSFunction> function,
+ ClearExceptionFlag flag,
+ InLoopFlag in_loop_flag) {
bool result = true;
if (function->shared()->is_compiled()) {
function->ReplaceCode(function->shared()->code());
function->shared()->set_code_age(0);
} else {
CompilationInfo info(function);
+ if (in_loop_flag == IN_LOOP) info.MarkAsInLoop();
result = CompileLazyHelper(&info, flag);
ASSERT(!result || function->is_compiled());
}
- if (result && function->is_compiled()) {
- PROFILE(FunctionCreateEvent(*function));
- }
return result;
}
+bool CompileLazy(Handle<JSFunction> function,
+ ClearExceptionFlag flag) {
+ return CompileLazyFunction(function, flag, NOT_IN_LOOP);
+}
+
+
bool CompileLazyInLoop(Handle<JSFunction> function,
ClearExceptionFlag flag) {
- bool result = true;
- if (function->shared()->is_compiled()) {
- function->ReplaceCode(function->shared()->code());
- function->shared()->set_code_age(0);
- } else {
- CompilationInfo info(function);
- info.MarkAsInLoop();
- result = CompileLazyHelper(&info, flag);
- ASSERT(!result || function->is_compiled());
- }
- if (result && function->is_compiled()) {
- PROFILE(FunctionCreateEvent(*function));
- }
- return result;
+ return CompileLazyFunction(function, flag, IN_LOOP);
}
-bool CompileOptimized(Handle<JSFunction> function, int osr_ast_id) {
+bool CompileOptimized(Handle<JSFunction> function,
+ int osr_ast_id,
+ ClearExceptionFlag flag) {
CompilationInfo info(function);
info.SetOptimizing(osr_ast_id);
- bool result = CompileLazyHelper(&info, KEEP_EXCEPTION);
- if (result) PROFILE(FunctionCreateEvent(*function));
- return result;
+ return CompileLazyHelper(&info, flag);
}