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

Unified Diff: src/handles.cc

Issue 6614010: [Isolates] Merge 6700:7030 from bleeding_edge to isolates. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/handles.h ('k') | src/handles-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/handles.cc
===================================================================
--- src/handles.cc (revision 7031)
+++ src/handles.cc (working copy)
@@ -261,20 +261,24 @@
Handle<Object> SetProperty(Handle<JSObject> object,
Handle<String> key,
Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes,
+ StrictModeFlag strict) {
CALL_HEAP_FUNCTION(object->GetHeap()->isolate(),
- object->SetProperty(*key, *value, attributes), Object);
+ object->SetProperty(*key, *value, attributes, strict),
+ Object);
}
Handle<Object> SetProperty(Handle<Object> object,
Handle<Object> key,
Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes,
+ StrictModeFlag strict) {
Isolate* isolate = Isolate::Current();
CALL_HEAP_FUNCTION(
isolate,
- Runtime::SetObjectProperty(isolate, object, key, value, attributes),
+ Runtime::SetObjectProperty(
+ isolate, object, key, value, attributes, strict),
Object);
}
@@ -322,14 +326,27 @@
}
+void SetLocalPropertyNoThrow(Handle<JSObject> object,
+ Handle<String> key,
+ Handle<Object> value,
+ PropertyAttributes attributes) {
+ ASSERT(!object->GetIsolate()->has_pending_exception());
+ CHECK(!SetLocalPropertyIgnoreAttributes(
+ object, key, value, attributes).is_null());
+ CHECK(!object->GetIsolate()->has_pending_exception());
+}
+
+
Handle<Object> SetPropertyWithInterceptor(Handle<JSObject> object,
Handle<String> key,
Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes,
+ StrictModeFlag strict) {
CALL_HEAP_FUNCTION(object->GetIsolate(),
object->SetPropertyWithInterceptor(*key,
*value,
- attributes),
+ attributes,
+ strict),
Object);
}
@@ -897,49 +914,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);
}
« no previous file with comments | « src/handles.h ('k') | src/handles-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698